Skip to content

Commit 3c5a0b8

Browse files
authored
fix(crosswalk): check all elements in traffic signal (#5169)
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
1 parent de83f25 commit 3c5a0b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

planning/behavior_velocity_crosswalk_module/src/scene_crosswalk.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,10 @@ bool CrosswalkModule::isRedSignalForPedestrians() const
962962
continue;
963963
}
964964

965-
if (lights.front().color == TrafficSignalElement::RED) {
966-
return true;
965+
for (const auto & element : lights) {
966+
if (
967+
element.color == TrafficSignalElement::RED && element.shape == TrafficSignalElement::CIRCLE)
968+
return true;
967969
}
968970
}
969971

0 commit comments

Comments
 (0)