Skip to content

Commit 3d49cd1

Browse files
committed
add error handling
1 parent 976bcb6 commit 3d49cd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PathPlanning/RRTStarDubins/rrt_star_dubins.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def Planning(self, animation=True):
6666
# generate coruse
6767
lastIndex = self.get_best_last_index()
6868
# print(lastIndex)
69+
70+
if lastIndex is None:
71+
return None
72+
6973
path = self.gen_final_course(lastIndex)
7074
return path
7175

0 commit comments

Comments
 (0)