Skip to content

Commit

Permalink
Update planning/freespace_planner/src/freespace_planner/freespace_pla…
Browse files Browse the repository at this point in the history
…nner_node.cpp

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
  • Loading branch information
alanmengg and kosuke55 authored Sep 15, 2022
1 parent ef1b2d5 commit f98bc4c
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,7 @@ Trajectory createStopTrajectory(const PoseStamped & current_pose)

Trajectory createStopTrajectory(const Trajectory & trajectory)
{
Trajectory stop_trajectory;
stop_trajectory.header = trajectory.header;
stop_trajectory.header.stamp = rclcpp::Clock().now();

stop_trajectory.points.reserve(trajectory.points.size());
for (size_t i = 0; i < trajectory.points.size(); ++i) {
stop_trajectory.points.push_back(trajectory.points.at(i));
}
Trajectory stop_trajectory = trajectory;
for (size_t i = 0; i < trajectory.points.size(); ++i) {
stop_trajectory.points.at(i).longitudinal_velocity_mps = 0.0;
}
Expand Down

0 comments on commit f98bc4c

Please sign in to comment.