Skip to content

Commit 6752bdb

Browse files
authored
fix(out_of_lane): prevent crash when current footprint is empty (#4351)
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
1 parent 9dad706 commit 6752bdb

File tree

1 file changed

+1
-1
lines changed
  • planning/behavior_velocity_out_of_lane_module/src

1 file changed

+1
-1
lines changed

planning/behavior_velocity_out_of_lane_module/src/debug.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void add_current_overlap_marker(
6464
debug_marker.points.clear();
6565
for (const auto & p : current_footprint)
6666
debug_marker.points.push_back(tier4_autoware_utils::createMarkerPosition(p.x(), p.y(), z));
67-
debug_marker.points.push_back(debug_marker.points.front());
67+
if (!debug_marker.points.empty()) debug_marker.points.push_back(debug_marker.points.front());
6868
if (current_overlapped_lanelets.empty())
6969
debug_marker.color = tier4_autoware_utils::createMarkerColor(0.1, 1.0, 0.1, 0.5);
7070
else

0 commit comments

Comments
 (0)