Skip to content

Commit

Permalink
fix: crosswalk pedestrian lights (#898)
Browse files Browse the repository at this point in the history
* fix(crosswalk_traffic_light_estimator): change the shape of pedestrian light to CIRCLE (autowarefoundation#5168)

Signed-off-by: Tomohito Ando <[email protected]>

* fix(crosswalk): check all elements in traffic signal (autowarefoundation#5169)

Signed-off-by: Tomohito Ando <[email protected]>

---------

Signed-off-by: Tomohito Ando <[email protected]>
  • Loading branch information
TomohitoAndo authored and t4-x2 committed Oct 5, 2023
1 parent 92198e2 commit f551bbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions perception/crosswalk_traffic_light_estimator/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ void CrosswalkTrafficLightEstimatorNode::setCrosswalkTrafficSignal(
TrafficSignal output_traffic_signal;
TrafficSignalElement output_traffic_signal_element;
output_traffic_signal_element.color = color;
output_traffic_signal_element.shape = TrafficSignalElement::CIRCLE;
output_traffic_signal_element.confidence = 1.0;
output_traffic_signal.elements.push_back(output_traffic_signal_element);
output_traffic_signal.traffic_signal_id = tl_reg_elem->id();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,10 @@ bool CrosswalkModule::isRedSignalForPedestrians() const
continue;
}

if (lights.front().color == TrafficSignalElement::RED) {
return true;
for (const auto & element : lights) {
if (
element.color == TrafficSignalElement::RED && element.shape == TrafficSignalElement::CIRCLE)
return true;
}
}

Expand Down

0 comments on commit f551bbb

Please sign in to comment.