File tree 1 file changed +7
-3
lines changed
planning/behavior_velocity_traffic_light_module/src
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -281,21 +281,25 @@ bool TrafficLightModule::isStopSignal()
281
281
{
282
282
updateTrafficSignal ();
283
283
284
- // If it never receives traffic signal, it will PASS.
284
+ // Pass through if no traffic signal information has been received yet
285
+ // This is to prevent stopping on the planning simulator
285
286
if (!planner_data_->has_received_signal_ ) {
286
287
return false ;
287
288
}
288
289
289
- // If the signal data is not received, the ego stops.
290
+ // Stop if there is no upcoming traffic signal information
291
+ // This is to safely stop in cases such that traffic light recognition is not working properly or
292
+ // the map is incorrect
290
293
if (!traffic_signal_stamp_) {
291
294
return true ;
292
295
}
293
296
294
- // If the signal data is timeout, the ego stops.
297
+ // Stop if the traffic signal information has timed out
295
298
if (isTrafficSignalTimedOut ()) {
296
299
return true ;
297
300
}
298
301
302
+ // Check if the current traffic signal state requires stopping
299
303
return traffic_light_utils::isTrafficSignalStop (lane_, looking_tl_state_);
300
304
}
301
305
You can’t perform that action at this time.
0 commit comments