mirror of
https://github.com/zhm-real/PathPlanning.git
synced 2026-08-30 17:10:48 +08:00
update RRT
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user