update RRT

This commit is contained in:
zhm-real
2020-06-24 19:41:29 -07:00
parent 09fe3e787f
commit 6a637809f1
9 changed files with 181 additions and 81 deletions
+3 -1
View File
@@ -70,12 +70,14 @@ class Plotting:
@staticmethod
def plot_visited(nodelist, animation):
if animation:
count = 0
for node in nodelist:
count += 1
if node.parent:
plt.plot([node.parent.x, node.x], [node.parent.y, node.y], "-g")
plt.gcf().canvas.mpl_connect('key_release_event',
lambda event: [exit(0) if event.key == 'escape' else None])
plt.pause(0.001)
if count % 5 == 0: plt.pause(0.001)
else:
for node in nodelist:
if node.parent: