Skip to content

Commit 2a3eaee

Browse files
authored
fix(autoware_obstacle_cruise_planner): fix shadowVariable warning in generateSlowDownTrajectory (#7659)
Signed-off-by: Koichi Imai <kotty.0704@gmail.com>
1 parent d563f1d commit 2a3eaee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

planning/autoware_obstacle_cruise_planner/src/planner_interface.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,9 @@ std::vector<TrajectoryPoint> PlannerInterface::generateSlowDownTrajectory(
623623
}();
624624

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

0 commit comments

Comments
 (0)