Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(control_validator): resolve the bug causing inappropriate diagnostic messages. (#4846) #824

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions control/control_validator/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ void insertPointInPredictedTrajectory(

TrajectoryPoints reverseTrajectoryPoints(const TrajectoryPoints & trajectory_points)
{
TrajectoryPoints reversed_trajectory_points(trajectory_points.size());
TrajectoryPoints reversed_trajectory_points;
reversed_trajectory_points.reserve(trajectory_points.size());
std::reverse_copy(
trajectory_points.begin(), trajectory_points.end(),
std::back_inserter(reversed_trajectory_points));
Expand Down Expand Up @@ -106,7 +107,7 @@ Trajectory alignTrajectoryWithReferenceTrajectory(
// predicted_trajectory:     p1-----p2-----p3----//------pN
// trajectory: t1--------//------tN
// ↓
// predicted_trajectory:      tNew--p3----//------pN
// predicted_trajectory:      pNew--p3----//------pN
// trajectory: t1--------//------tN
auto predicted_trajectory_point_removed = removeFrontTrajectoryPoint(
trajectory_points, modified_trajectory_points, predicted_trajectory_points);
Expand Down
Loading