Merge pull request #155 from tks10/master

Fixed a bug of calculating parameters in pure pursuit module
This commit is contained in:
Atsushi Sakai
2019-01-15 20:09:39 +09:00
committed by GitHub

View File

@@ -85,7 +85,7 @@ def calc_target_index(state, cx, cy):
# search look ahead target point index
while Lf > L and (ind + 1) < len(cx):
dx = cx[ind + 1] - cx[ind]
dy = cx[ind + 1] - cx[ind]
dy = cy[ind + 1] - cy[ind]
L += math.sqrt(dx ** 2 + dy ** 2)
ind += 1