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 912f8129da738..cb51e52254bb1 100644 --- a/planning/motion_velocity_smoother/src/motion_velocity_smoother_node.cpp +++ b/planning/motion_velocity_smoother/src/motion_velocity_smoother_node.cpp @@ -545,13 +545,13 @@ bool MotionVelocitySmootherNode::smoothVelocity( RCLCPP_WARN(get_logger(), "Fail to solve optimization."); } + // Set 0 velocity after input-stop-point + overwriteStopPoint(clipped, traj_smoothed); + traj_smoothed.insert( traj_smoothed.begin(), traj_resampled->begin(), traj_resampled->begin() + *traj_resampled_closest); - // Set 0 velocity after input-stop-point - overwriteStopPoint(*traj_resampled, traj_smoothed); - // For the endpoint of the trajectory if (!traj_smoothed.empty()) { traj_smoothed.back().longitudinal_velocity_mps = 0.0;