Skip to content

Commit ee82014

Browse files
committed
fix comments for clarity
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
1 parent 518cda6 commit ee82014

File tree

1 file changed

+7
-3
lines changed
  • planning/behavior_velocity_traffic_light_module/src

1 file changed

+7
-3
lines changed

planning/behavior_velocity_traffic_light_module/src/scene.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -281,21 +281,25 @@ bool TrafficLightModule::isStopSignal()
281281
{
282282
updateTrafficSignal();
283283

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
285286
if (!planner_data_->has_received_signal_) {
286287
return false;
287288
}
288289

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
290293
if (!traffic_signal_stamp_) {
291294
return true;
292295
}
293296

294-
// If the signal data is timeout, the ego stops.
297+
// Stop if the traffic signal information has timed out
295298
if (isTrafficSignalTimedOut()) {
296299
return true;
297300
}
298301

302+
// Check if the current traffic signal state requires stopping
299303
return traffic_light_utils::isTrafficSignalStop(lane_, looking_tl_state_);
300304
}
301305

0 commit comments

Comments
 (0)