Skip to content

Commit

Permalink
fix(behavior_path_planner): fix offset sign expanding side shift driv…
Browse files Browse the repository at this point in the history
…able area (autowarefoundation#2196)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
  • Loading branch information
maxime-clem authored and HansRobo committed Dec 16, 2022
1 parent 1aaa387 commit c9f18f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ void SideShiftModule::adjustDrivableArea(ShiftedPath * path) const
const double left_offset = std::max(
*itr.second + (*itr.first > threshold ? margin : 0.0),
parameters_.drivable_area_left_bound_offset);
const double right_offset = std::min(
const double right_offset = -std::min(
*itr.first - (*itr.first < -threshold ? margin : 0.0),
parameters_.drivable_area_right_bound_offset);
-parameters_.drivable_area_right_bound_offset);

const auto extended_lanelets = util::expandLanelets(current_lanelets_, left_offset, right_offset);

Expand Down

0 comments on commit c9f18f9

Please sign in to comment.