Skip to content

Commit 54b6052

Browse files
author
Bao Sheng
committed
Once find the path, stop RRT*
1 parent f6ef266 commit 54b6052

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

PathPlanning/RRTstar/rrt_star.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ def Planning(self, animation=True):
6363
if animation and i % 5 == 0:
6464
self.DrawGraph(rnd)
6565

66-
# generate coruse
67-
lastIndex = self.get_best_last_index()
68-
if lastIndex is None:
69-
return None
70-
path = self.gen_final_course(lastIndex)
71-
return path
66+
# generate coruse
67+
lastIndex = self.get_best_last_index()
68+
if lastIndex is None:
69+
continue
70+
path = self.gen_final_course(lastIndex)
71+
return path
72+
73+
return None
7274

7375
def choose_parent(self, newNode, nearinds):
7476
if not nearinds:

0 commit comments

Comments
 (0)