Skip to content

Commit

Permalink
fix(autoware_planning_evaluator): fix unreadVariable (#8352)
Browse files Browse the repository at this point in the history
* fix:unreadVariable

Signed-off-by: kobayu858 <[email protected]>

* fix:unreadVariable

Signed-off-by: kobayu858 <[email protected]>

---------

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Aug 8, 2024
1 parent 645af11 commit 022bd17
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ size_t getIndexAfterDistance(const Trajectory & traj, const size_t curr_id, cons
const TrajectoryPoint & curr_p = traj.points.at(curr_id);

size_t target_id = curr_id;
double current_distance = 0.0;
for (size_t traj_id = curr_id + 1; traj_id < traj.points.size(); ++traj_id) {
current_distance = calcDistance2d(traj.points.at(traj_id), curr_p);
double current_distance = calcDistance2d(traj.points.at(traj_id), curr_p);
if (current_distance >= distance) {
target_id = traj_id;
break;
Expand Down

0 comments on commit 022bd17

Please sign in to comment.