Skip to content

Commit

Permalink
feat(behavior_velocity_traffic_light): don't use the time to red if i…
Browse files Browse the repository at this point in the history
…t is unavailable

Signed-off-by: Tomohito Ando <[email protected]>
  • Loading branch information
TomohitoAndo committed Mar 6, 2024
1 parent 2a38077 commit 495be7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions planning/behavior_velocity_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ void BehaviorVelocityPlannerNode::onTrafficSignalsRawV2I(
std::lock_guard<std::mutex> lock(mutex_);

for (const auto & car_light : msg->car_lights) {
// If the time to red is not available, skip it
if (!car_light.has_max_rest_time || !car_light.has_min_rest_time) {
continue;
}

for (const auto & state : car_light.states) {
TrafficSignalTimeToRedStamped time_to_red;
time_to_red.stamp = msg->header.stamp;
Expand Down

0 comments on commit 495be7d

Please sign in to comment.