File tree 1 file changed +6
-2
lines changed
planning/behavior_velocity_traffic_light_module/src
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,9 @@ bool TrafficLightModule::modifyPathVelocity(PathWithLaneId * path, StopReason *
225
225
226
226
first_ref_stop_path_point_index_ = stop_line_point_idx;
227
227
228
+ // Check if stop is coming.
229
+ setSafe (!isStopSignal ());
230
+
228
231
const auto rest_time_to_red_signal =
229
232
planner_data_->getRestTimeToRedSignal (traffic_light_reg_elem_.id ());
230
233
if (
@@ -246,8 +249,6 @@ bool TrafficLightModule::modifyPathVelocity(PathWithLaneId * path, StopReason *
246
249
return true ;
247
250
}
248
251
249
- // Check if stop is coming.
250
- setSafe (!isStopSignal ());
251
252
if (isActivated ()) {
252
253
is_prev_state_stop_ = false ;
253
254
return true ;
@@ -291,6 +292,9 @@ bool TrafficLightModule::updateTrafficSignal()
291
292
292
293
if (!found_signal) {
293
294
// Don't stop when UNKNOWN or TIMEOUT as discussed at #508
295
+ // Reset looking_tl_state
296
+ looking_tl_state_.elements .clear ();
297
+ looking_tl_state_.traffic_signal_id = 0 ;
294
298
return false ;
295
299
}
296
300
You can’t perform that action at this time.
0 commit comments