Skip to content

Commit

Permalink
fix(out_of_lane): use bigger stop lines to cut predicted paths (autow…
Browse files Browse the repository at this point in the history
…arefoundation#6630)

Signed-off-by: Maxime CLEMENT <[email protected]>
  • Loading branch information
maxime-clem committed Apr 8, 2024
1 parent e881803 commit c01980c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ void cut_predicted_path_beyond_red_lights(
const PlannerData & planner_data, const double object_front_overhang)
{
const auto stop_line = find_next_stop_line(predicted_path, planner_data);
if (stop_line) cut_predicted_path_beyond_line(predicted_path, *stop_line, object_front_overhang);
if (stop_line) {
// we use a longer stop line to also cut predicted paths that slightly go around the stop line
auto longer_stop_line = *stop_line;
const auto diff = stop_line->back() - stop_line->front();
longer_stop_line.front() -= diff * 0.5;
longer_stop_line.back() += diff * 0.5;
cut_predicted_path_beyond_line(predicted_path, longer_stop_line, object_front_overhang);
}
}

autoware_auto_perception_msgs::msg::PredictedObjects filter_predicted_objects(
Expand Down

0 comments on commit c01980c

Please sign in to comment.