code clean up

This commit is contained in:
Atsushi Sakai
2019-02-02 09:50:58 +09:00
parent 58b13e4253
commit 9c626d3f45
10 changed files with 124 additions and 100 deletions

View File

@@ -357,14 +357,14 @@ def reeds_shepp_path_planning(sx, sy, syaw,
paths = calc_paths(sx, sy, syaw, gx, gy, gyaw, maxc, step_size)
if len(paths) == 0:
if not paths:
# print("No path")
# print(sx, sy, syaw, gx, gy, gyaw)
return None, None, None, None, None
minL = float("Inf")
best_path_index = -1
for i in range(len(paths)):
for i, _ in enumerate(paths):
if paths[i].L <= minL:
minL = paths[i].L
best_path_index = i