From c6b78a7ae75706ee99563c98c2a30cf013e2dae5 Mon Sep 17 00:00:00 2001 From: Takayuki Murooka Date: Fri, 27 Dec 2024 10:50:49 +0900 Subject: [PATCH] fix Signed-off-by: Takayuki Murooka --- .../src/scene.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/planning/behavior_velocity_planner/autoware_behavior_velocity_detection_area_module/src/scene.cpp b/planning/behavior_velocity_planner/autoware_behavior_velocity_detection_area_module/src/scene.cpp index e47157d5aeec9..4d358554f3e8d 100644 --- a/planning/behavior_velocity_planner/autoware_behavior_velocity_detection_area_module/src/scene.cpp +++ b/planning/behavior_velocity_planner/autoware_behavior_velocity_detection_area_module/src/scene.cpp @@ -106,11 +106,15 @@ bool DetectionAreaModule::modifyPathVelocity(PathWithLaneId * path) } // Check state - last_obstacle_found_time_ = {}; - if (!planner_param_.suppress_pass_judge_when_stopping || !is_stopped) { - state_ = State::GO; + const bool is_safe = detection_area::can_clear_stop_state( + last_obstacle_found_time_, clock_->now(), planner_param_.state_clear_time); + if (is_safe) { + last_obstacle_found_time_ = {}; + if (!planner_param_.suppress_pass_judge_when_stopping || !is_stopped) { + state_ = State::GO; + } + return true; } - return true; // Force ignore objects after dead_line if (planner_param_.use_dead_line) {