Skip to content

Commit

Permalink
fix(start_planner): fix backward drving path cutting (#5098)
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 authored Sep 24, 2023
1 parent 1ada567 commit ec99b2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,11 @@ void StartPlannerModule::setDrivableAreaInfo(BehaviorModuleOutput & output) cons

DrivableAreaInfo current_drivable_area_info;
current_drivable_area_info.drivable_lanes = target_drivable_lanes;
output.drivable_area_info = utils::combineDrivableAreaInfo(
current_drivable_area_info, getPreviousModuleOutput().drivable_area_info);
output.drivable_area_info =
status_.back_finished
? utils::combineDrivableAreaInfo(
current_drivable_area_info, getPreviousModuleOutput().drivable_area_info)
: current_drivable_area_info;
}
}

Expand Down
4 changes: 3 additions & 1 deletion planning/behavior_path_planner/src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,9 @@ void generateDrivableArea(

// make bound longitudinally monotonic
// TODO(Murooka) Fix makeBoundLongitudinallyMonotonic
if (enable_expanding_hatched_road_markings || enable_expanding_intersection_areas) {
if (
is_driving_forward &&
(enable_expanding_hatched_road_markings || enable_expanding_intersection_areas)) {
makeBoundLongitudinallyMonotonic(path, planner_data, true); // for left bound
makeBoundLongitudinallyMonotonic(path, planner_data, false); // for right bound
}
Expand Down

0 comments on commit ec99b2f

Please sign in to comment.