mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
add comment for stopping the simulation
This commit is contained in:
@@ -98,6 +98,7 @@ def potential_field_planning(sx, sy, gx, gy, ox, oy, reso, rr):
|
||||
|
||||
if show_animation:
|
||||
draw_heatmap(pmap)
|
||||
# for stopping simulation with the esc key.
|
||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
plt.plot(ix, iy, "*k")
|
||||
|
||||
Reference in New Issue
Block a user