Skip to content

Commit

Permalink
fix(autoware_obstacle_cruise_planner): fix shadowVariable warning in …
Browse files Browse the repository at this point in the history
…generateSlowDownTrajectory (#7659)

Signed-off-by: Koichi Imai <[email protected]>
  • Loading branch information
Koichi98 authored Jun 24, 2024
1 parent d563f1d commit 2a3eaee
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,9 @@ std::vector<TrajectoryPoint> PlannerInterface::generateSlowDownTrajectory(
}();

// insert slow down velocity between slow start and end
for (size_t i = (slow_down_start_idx ? *slow_down_start_idx : 0); i <= *slow_down_end_idx;
++i) {
auto & traj_point = slow_down_traj_points.at(i);
for (size_t j = (slow_down_start_idx ? *slow_down_start_idx : 0); j <= *slow_down_end_idx;
++j) {
auto & traj_point = slow_down_traj_points.at(j);
traj_point.longitudinal_velocity_mps =
std::min(traj_point.longitudinal_velocity_mps, static_cast<float>(stable_slow_down_vel));
}
Expand Down

0 comments on commit 2a3eaee

Please sign in to comment.