mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-02-16 22:01:38 -05:00
add comment for stopping the simulation
This commit is contained in:
@@ -135,6 +135,7 @@ def closed_loop_prediction(cx, cy, cyaw, speed_profile, goal):
|
||||
|
||||
if target_ind % 1 == 0 and animation: # pragma: no cover
|
||||
plt.cla()
|
||||
# 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(cx, cy, "-r", label="course")
|
||||
|
||||
Reference in New Issue
Block a user