Skip to content

Commit

Permalink
fix(motion_velocity_smoother): fix overwriteStopPoint using backward …
Browse files Browse the repository at this point in the history
…point (tier4#816)

* fix(motion_velocity_smoother): fix overwriteStopPoint using backward point

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

* Modify overwriteStopPoint input and output

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 authored and boyali committed Oct 3, 2022
1 parent 870240f commit 16b527f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 16b527f

Please sign in to comment.