Skip to content

Commit

Permalink
fix(static_avoidance): add optional check (#9782)
Browse files Browse the repository at this point in the history
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
  • Loading branch information
zulfaqar-azmi-t4 authored Dec 25, 2024
1 parent 2465d07 commit aaad09f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ AvoidOutlines ShiftLineGenerator::generateAvoidOutline(
AvoidOutlines outlines;
for (auto & o : data.target_objects) {
if (!o.avoid_margin.has_value()) {
if (data.red_signal_lane.value().id() == o.overhang_lanelet.id()) {
if (
data.red_signal_lane.has_value() &&
data.red_signal_lane.value().id() == o.overhang_lanelet.id()) {
o.info = ObjectInfo::LIMIT_DRIVABLE_SPACE_TEMPORARY;
} else {
o.info = ObjectInfo::INSUFFICIENT_DRIVABLE_SPACE;
Expand Down

0 comments on commit aaad09f

Please sign in to comment.