Skip to content

Commit 54c872a

Browse files
committed
Use correct name
1 parent 82c55d4 commit 54c872a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PathTracking/pure_pursuit/pure_pursuit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ def calc_target_index(state, cx, cy):
9292
ind = d.index(min(d))
9393
old_nearest_point_index = ind
9494
else:
95-
index = old_nearest_point_index
95+
ind = old_nearest_point_index
9696
distance_this_index = calc_distance(state, cx[index], cy[index])
9797
while True:
9898
index = index + 1 if (index + 1) < len(cx) else index
9999
distance_next_index = calc_distance(state, cx[index], cy[index])
100100
if distance_this_index < distance_next_index:
101101
break
102102
distance_this_index = distance_next_index
103-
old_nearest_point_index = index
103+
old_nearest_point_index = ind
104104

105105
L = 0.0
106106

0 commit comments

Comments
 (0)