Skip to content

Commit

Permalink
fix(autonomous_emergency_braking): aeb strange mpc polygon (autowaref…
Browse files Browse the repository at this point in the history
…oundation#7740)

change resize to reserve

Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: palas21 <[email protected]>
  • Loading branch information
danielsanchezaran authored and palas21 committed Jul 12, 2024
1 parent 0f6dd49 commit e8964c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions control/autoware_autonomous_emergency_braking/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,11 @@ std::optional<Path> AEB::generateEgoPath(const Trajectory & predicted_traj)

// create path
Path path;
path.resize(predicted_traj.points.size());
path.reserve(predicted_traj.points.size());
for (size_t i = 0; i < predicted_traj.points.size(); ++i) {
geometry_msgs::msg::Pose map_pose;
tf2::doTransform(predicted_traj.points.at(i).pose, map_pose, transform_stamped);
path.at(i) = map_pose;
path.push_back(map_pose);

if (i * mpc_prediction_time_interval_ > mpc_prediction_time_horizon_) {
break;
Expand Down

0 comments on commit e8964c0

Please sign in to comment.