Skip to content

Commit 3a346c7

Browse files
authored
fix(out_of_lane): use bigger stop lines to cut predicted paths (#6630)
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
1 parent 872cbdd commit 3a346c7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

planning/behavior_velocity_out_of_lane_module/src/filter_predicted_objects.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,14 @@ void cut_predicted_path_beyond_red_lights(
8585
const PlannerData & planner_data, const double object_front_overhang)
8686
{
8787
const auto stop_line = find_next_stop_line(predicted_path, planner_data);
88-
if (stop_line) cut_predicted_path_beyond_line(predicted_path, *stop_line, object_front_overhang);
88+
if (stop_line) {
89+
// we use a longer stop line to also cut predicted paths that slightly go around the stop line
90+
auto longer_stop_line = *stop_line;
91+
const auto diff = stop_line->back() - stop_line->front();
92+
longer_stop_line.front() -= diff * 0.5;
93+
longer_stop_line.back() += diff * 0.5;
94+
cut_predicted_path_beyond_line(predicted_path, longer_stop_line, object_front_overhang);
95+
}
8996
}
9097

9198
autoware_auto_perception_msgs::msg::PredictedObjects filter_predicted_objects(

0 commit comments

Comments
 (0)