Commit b28222b 1 parent d7cc786 commit b28222b Copy full SHA for b28222b
File tree 1 file changed +8
-0
lines changed
perception/autoware_crosswalk_traffic_light_estimator/src
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,15 @@ void CrosswalkTrafficLightEstimatorNode::setCrosswalkTrafficSignal(
292
292
for (const auto & tl_reg_elem : tl_reg_elems) {
293
293
auto id = tl_reg_elem->id ();
294
294
// if valid prediction exists, overwrite the estimation; else, use the estimation
295
+ bool valid_prediction = false ;
295
296
if (valid_id2idx_map.count (id)) {
297
+ size_t idx = valid_id2idx_map[id];
298
+ auto signal = msg.traffic_light_groups [idx];
299
+ if (output.traffic_light_groups [idx].elements [0 ].color != TrafficSignalElement::UNKNOWN){
300
+ valid_prediction = true ;
301
+ }
302
+ }
303
+ if (valid_prediction) {
296
304
size_t idx = valid_id2idx_map[id];
297
305
auto signal = msg.traffic_light_groups [idx];
298
306
updateFlashingState (signal ); // check if it is flashing
You can’t perform that action at this time.
0 commit comments