From 2023ab29a71ceb53b6d1f8fa6acd3a580765f4fb Mon Sep 17 00:00:00 2001 From: Berkay Karaman Date: Thu, 11 Jan 2024 02:08:30 +0300 Subject: [PATCH] fix(motion_velocity_smoother): make stopping_distance and stopping_velocity be able to work (#6037) Signed-off-by: Berkay Karaman --- .../src/motion_velocity_smoother_node.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/planning/motion_velocity_smoother/src/motion_velocity_smoother_node.cpp b/planning/motion_velocity_smoother/src/motion_velocity_smoother_node.cpp index 5e3924796f95f..deaa1d3b1e494 100644 --- a/planning/motion_velocity_smoother/src/motion_velocity_smoother_node.cpp +++ b/planning/motion_velocity_smoother/src/motion_velocity_smoother_node.cpp @@ -453,6 +453,9 @@ void MotionVelocitySmootherNode::onCurrentTrajectory(const Trajectory::ConstShar return; } + // Set 0 at the end of the trajectory + input_points.back().longitudinal_velocity_mps = 0.0; + // calculate prev closest point if (!prev_output_.empty()) { current_closest_point_from_prev_output_ = calcProjectedTrajectoryPointFromEgo(prev_output_);