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) (#236)

fix(obstacle_avoidance_planner): fix lat_dist_to_front_bound comparison (autowarefoundation#2594)

* fix(obstacle_avoidance_planner): fix lat_dist_to_front_bound comparison

Signed-off-by: Mehmet Dogru <[email protected]>

* fix: update comment

Signed-off-by: Mehmet Dogru <[email protected]>

Signed-off-by: Mehmet Dogru <[email protected]>

Signed-off-by: Mehmet Dogru <[email protected]>
Co-authored-by: Mehmet Dogru <[email protected]>
  • Loading branch information
tkimura4 and mehmetdogru authored Jan 6, 2023
1 parent db3104b commit 8590737
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 8590737

Please sign in to comment.