Merge pull request #204 from Flandoe/master

Once find the path, stop RRT*
This commit is contained in:
Atsushi Sakai
2019-06-19 22:09:56 +09:00
committed by GitHub

View File

@@ -63,12 +63,14 @@ class RRT():
if animation and i % 5 == 0:
self.DrawGraph(rnd)
# generate coruse
lastIndex = self.get_best_last_index()
if lastIndex is None:
return None
path = self.gen_final_course(lastIndex)
return path
# generate coruse
lastIndex = self.get_best_last_index()
if lastIndex is None:
continue
path = self.gen_final_course(lastIndex)
return path
return None
def choose_parent(self, newNode, nearinds):
if not nearinds: