From dc9282d0b90f89165aeb03b0bcbee2506f0c7694 Mon Sep 17 00:00:00 2001 From: Takayuki Murooka Date: Tue, 6 Jun 2023 01:55:03 +0900 Subject: [PATCH] feat(obstacle_cruise_planner): suppress sudden slow down (#3905) * feat(obstacle_cruise_planner): suppress flickering to entry slow down Signed-off-by: Takayuki Murooka * fix Signed-off-by: Takayuki Murooka * update config Signed-off-by: Takayuki Murooka * feat(obstacle_cruise_planner): suppress sudden slow down Signed-off-by: Takayuki Murooka --------- Signed-off-by: Takayuki Murooka --- planning/obstacle_cruise_planner/src/planner_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/obstacle_cruise_planner/src/planner_interface.cpp b/planning/obstacle_cruise_planner/src/planner_interface.cpp index 5f948c3295f8c..e0480a4f89a9e 100644 --- a/planning/obstacle_cruise_planner/src/planner_interface.cpp +++ b/planning/obstacle_cruise_planner/src/planner_interface.cpp @@ -607,7 +607,7 @@ PlannerInterface::calculateDistanceToSlowDownWithConstraints( if (prev_output) { return prev_output->target_vel; } - return slow_down_vel; + return std::max(planner_data.ego_vel, slow_down_vel); } if (planner_data.ego_vel < slow_down_vel) { return slow_down_vel;