Skip to content

Commit ae32cb3

Browse files
committed
fix early termination bug. fix AtsushiSakai#223
1 parent 4264bde commit ae32cb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PathPlanning/RRT/rrt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def planning(self, animation=True):
7474
if animation and i % 5 == 0:
7575
self.draw_graph(rnd_node)
7676

77-
if self.calc_dist_to_goal(new_node.x, new_node.y) <= self.expand_dis:
77+
if self.calc_dist_to_goal(self.node_list[-1].x, self.node_list[-1].y) <= self.expand_dis:
7878
print("Goal!!")
7979
return self.generate_final_course(len(self.node_list) - 1)
8080

0 commit comments

Comments
 (0)