Skip to content

Commit

Permalink
fix(obstacle_avoidance_planner): fix lat_dist_to_front_bound comparis…
Browse files Browse the repository at this point in the history
…on (autowarefoundation#2594)

* fix(obstacle_avoidance_planner): fix lat_dist_to_front_bound comparison

Signed-off-by: Mehmet Dogru <42mehmetdogru42@gmail.com>

* fix: update comment

Signed-off-by: Mehmet Dogru <42mehmetdogru42@gmail.com>

Signed-off-by: Mehmet Dogru <42mehmetdogru42@gmail.com>
  • Loading branch information
mehmetdogru authored Jan 6, 2023
1 parent 316f5e9 commit 132c154
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planning/obstacle_avoidance_planner/src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,10 @@ bool isOutsideDrivableArea(
const auto left_start_point = getStartPoint(left_bound, right_bound.front());
const auto right_start_point = getStartPoint(right_bound, left_bound.front());

// ignore point in front of the front line
// ignore point behind of the front line
const std::vector<geometry_msgs::msg::Point> front_bound = {left_start_point, right_start_point};
const double lat_dist_to_front_bound = motion_utils::calcLateralOffset(front_bound, point);
if (lat_dist_to_front_bound > min_dist) {
if (lat_dist_to_front_bound < -min_dist) {
return false;
}

Expand Down

0 comments on commit 132c154

Please sign in to comment.