Skip to content

Commit

Permalink
fix(behavior_velocity_traffic_light): stop when the signal is timed out
Browse files Browse the repository at this point in the history
Signed-off-by: Y.Hisaki <[email protected]>
  • Loading branch information
yhisaki committed Jan 30, 2025
1 parent 1a1b932 commit 201e06b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ bool TrafficLightModule::modifyPathVelocity(PathWithLaneId * path)

first_ref_stop_path_point_index_ = stop_line.value().first;

// Check if stop is coming.
const bool is_stop_signal = isStopSignal();

// Use V2I if available
if (planner_param_.v2i_use_rest_time) {
if (planner_param_.v2i_use_rest_time && !is_stop_signal) {
bool is_v2i_handled = handleV2I(signed_arc_length_to_stop_point, [&]() {
*path = insertStopPose(input_path, stop_line.value().first, stop_line.value().second);
});
Expand All @@ -124,9 +127,6 @@ bool TrafficLightModule::modifyPathVelocity(PathWithLaneId * path)
}
}

// Check if stop is coming.
const bool is_stop_signal = isStopSignal();

// Update stop signal received time
if (is_stop_signal) {
if (!stop_signal_received_time_ptr_) {
Expand Down

0 comments on commit 201e06b

Please sign in to comment.