mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-02-10 19:55:27 -05:00
exit on key
This commit is contained in:
@@ -395,6 +395,8 @@ def test():
|
||||
|
||||
if show_animation: # pragma: no cover
|
||||
plt.cla()
|
||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
plt.plot(px, py, label="final course " + str(mode))
|
||||
|
||||
# plotting
|
||||
|
||||
Reference in New Issue
Block a user