Skip to content

Commit

Permalink
fix(obstacle_cruise_planner): use absolute value in lateraloffset to …
Browse files Browse the repository at this point in the history
…filter on obstacles (tier4#1083)

* use-absolute-value-in-lateraloffset-to-filter-on-Obstacles

Signed-off-by: jack.song <jack.song@autocore.ai>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and boyali committed Sep 28, 2022
1 parent b150dcd commit fd185dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion planning/obstacle_cruise_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,9 @@ std::vector<TargetObstacle> ObstacleCruisePlannerNode::filterObstacles(
const double dist_from_obstacle_to_traj = [&]() {
return tier4_autoware_utils::calcLateralOffset(decimated_traj.points, object_pose.position);
}();
if (dist_from_obstacle_to_traj > obstacle_filtering_param_.rough_detection_area_expand_width) {
if (
std::fabs(dist_from_obstacle_to_traj) >
obstacle_filtering_param_.rough_detection_area_expand_width) {
RCLCPP_INFO_EXPRESSION(
get_logger(), is_showing_debug_info_,
"Ignore obstacles since it is far from the trajectory.");
Expand Down

0 comments on commit fd185dd

Please sign in to comment.