-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(behavior_velocity): consider dynamic object #9
feat(behavior_velocity): consider dynamic object #9
Conversation
…owarefoundation#591) * sync rc rc/v1.7.1 (autowarefoundation#2345) * add behavior_path_rviz_plugin (autowarefoundation#2343) * add behavior_path_rviz_plugin * edit README * fix for uncrustify * fix include guard * use autoware_lint_common Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> * Revert "use autoware_lint_common" This reverts commit 98c264d5f32d88fb19cd7953fc64a2052648af29. * fix for cpplint Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> * Fix format Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: kosuke55 <kosuke.tnp@gmail.com> Signed-off-by: kosuke55 <kosuke.tnp@gmail.com> * feat(tier4_planning_rviz_plugin): add PathWithLaneId rviz plugin Signed-off-by: kosuke55 <kosuke.tnp@gmail.com> Co-authored-by: autoware-iv-sync-ci[bot] <87871706+autoware-iv-sync-ci[bot]@users.noreply.github.com> Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
…-position (autowarefoundation#588) Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
* feat!: add blockage diagnostic Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * fix: typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * docs: add documentation Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * ci(pre-commit): autofix * fix: typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * ci(pre-commit): autofix * fix: typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * chore: add adjustable param Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * ci(pre-commit): autofix * feat!: add blockage diagnostic Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * fix: typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * docs: add documentation Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * ci(pre-commit): autofix * fix: typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * ci(pre-commit): autofix * fix: typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * chore: add adjustable param Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * ci(pre-commit): autofix * chore: rearrange header file Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * chore: fix typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * chore: rearrange header Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * fix: revert accident change Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * chore: fix typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * docs: add limits Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * chore: check overflow Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…oundation#593) Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
…arefoundation#574) * parametrize avoidance target type Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * add target type parameter in yaml Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * mototbike -> motorcycle Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * apply clang Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
…ugin (autowarefoundation#594) * feat(tier4_planning_rviz_plugin): add PathWithLaneIdFootprint rviz plugin Signed-off-by: kosuke55 <kosuke.tnp@gmail.com> * ci(pre-commit): autofix Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
* refactor(behavior_velocity): refactor codes Signed-off-by: tanaka3 <ttatcoder@outlook.jp> * refactor(behavior_velocity): fix typo Signed-off-by: tanaka3 <ttatcoder@outlook.jp> * refactor(behavior_velocity): refactor debuggings Signed-off-by: tanaka3 <ttatcoder@outlook.jp> * refactor(behavior_velocity): unite to generate Signed-off-by: tanaka3 <ttatcoder@outlook.jp> * refactor(behavior_velocity): apply clang tidy Signed-off-by: tanaka3 <ttatcoder@outlook.jp> * chore(behavior_velocity): retun to default settting Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy
found issue(s) with the introduced code (1/2)
} | ||
|
||
template <> | ||
inline void doTransform( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function template specialization tf2::doTransform<geometry_msgs::msg::Point_<std::allocator<void> > >
has a primary template declaration with different parameter names
boost::optional<Polygon2d> generateOccupiedPolygon( | ||
const Polygon2d & occupancy_poly, const Polygon2d & foot_print, const Point & position); | ||
//!< @brief generate occupied polygon from foot print | ||
void generateOccupiedImage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function behavior_velocity_planner::grid_utils::generateOccupiedImage
has a definition with different parameter names
origin, {ray_max_length * std::cos(max_theta), ray_max_length * std::sin(max_theta)}}; | ||
Polygon2d occlusion_poly; | ||
occlusion_poly.outer() = {min_theta_pos, max_theta_pos}; | ||
std::vector<Point2d> min_intersections, max_intersections; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple declarations in a single statement reduces readability
std::vector<Point2d> min_intersections, max_intersections; | |
std::vector<Point2d> min_intersections; | |
std::vector<Point2d> max_intersections; |
constexpr uint8_t free_space = occlusion_cost_value::FREE_SPACE; | ||
constexpr uint8_t occupied_space = occlusion_cost_value::OCCUPIED_IMAGE; | ||
// get transform | ||
tf2::Stamped<tf2::Transform> tf_grid2map, tf_map2grid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple declarations in a single statement reduces readability
tf2::Stamped<tf2::Transform> tf_grid2map, tf_map2grid; | |
tf2::Stamped<tf2::Transform> tf_grid2map; | |
tf2::Stamped<tf2::Transform> tf_map2grid; |
|
||
// convert lane polygons into cv type | ||
cv::Mat cv_image( | ||
occupancy_grid.info.width, occupancy_grid.info.height, CV_8UC1, cv::Scalar(free_space)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use of a signed integer operand with a binary bitwise operator
// std::cout << "tra: " << transformed_geom_pt.x << " , " << transformed_geom_pt.y << std::endl; | ||
} | ||
cv::Mat local_image( | ||
occupancy_grid.info.width, occupancy_grid.info.height, CV_8UC1, cv::Scalar(free_space)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use of a signed integer operand with a binary bitwise operator
{ | ||
const auto & label = obj.classification.at(0).label; | ||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant boolean literal in conditional return statement
if ( | |
return label == ObjectClassification::CAR || label == ObjectClassification::TRUCK || | |
label == ObjectClassification::BUS || label == ObjectClassification::TRAILER |
points.emplace_back(p); | ||
if (!isVehicle(obj)) return false; | ||
const auto & obj_vel = obj.kinematics.initial_twist_with_covariance.twist.linear.x; | ||
if (std::abs(obj_vel) > min_vel) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant boolean literal in conditional return statement
if (std::abs(obj_vel) > min_vel) return false; | |
return std::abs(obj_vel) <= min_vel |
return true; | ||
} | ||
|
||
bool isMovingVehicle(PredictedObject obj, const double min_vel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter obj
is copied for each invocation but only used as a const reference; consider making it a const reference
bool isMovingVehicle(PredictedObject obj, const double min_vel) | |
bool isMovingVehicle(const PredictedObject obj, const double min_vel) |
return true; | ||
} | ||
|
||
bool isMovingVehicle(PredictedObject obj, const double min_vel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter obj
is copied for each invocation but only used as a const reference; consider making it a const reference
bool isMovingVehicle(PredictedObject obj, const double min_vel) | |
bool isMovingVehicle(PredictedObject& obj, const double min_vel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy
found issue(s) with the introduced code (2/2)
{ | ||
if (!isVehicle(obj)) return false; | ||
const auto & obj_vel = obj.kinematics.initial_twist_with_covariance.twist.linear.x; | ||
if (std::abs(obj_vel) > min_vel) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant boolean literal in conditional return statement
if (std::abs(obj_vel) > min_vel) return false; | |
return std::abs(obj_vel) <= min_vel |
if (enable) RCLCPP_INFO_STREAM_THROTTLE(logger_, *clock_, 3000, x); | ||
#define DEBUG_PRINT(enable, n, x) \ | ||
if (enable) { \ | ||
const std::string time_msg = n + std::to_string(x); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macro argument should be enclosed in parentheses
const std::string time_msg = n + std::to_string(x); \ | |
const std::string time_msg = (n + std::to_string(x); \ |
if (enable) RCLCPP_INFO_STREAM_THROTTLE(logger_, *clock_, 3000, x); | ||
#define DEBUG_PRINT(enable, n, x) \ | ||
if (enable) { \ | ||
const std::string time_msg = n + std::to_string(x); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macro argument should be enclosed in parentheses
const std::string time_msg = n + std::to_string(x); \ | |
const std::string time_msg = n) + std::to_string(x); \ |
Description
Related links
Tests performed
Notes for reviewers
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.