Skip to content

Commit 9ca7d8f

Browse files
committed
add comment for stopping the simulation
1 parent 25cffd7 commit 9ca7d8f

File tree

53 files changed

+54
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+54
-0
lines changed

AerialNavigation/drone_3d_trajectory_following/Quadrotor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def __init__(self, x=0, y=0, z=0, roll=0, pitch=0, yaw=0, size=0.25, show_animat
2323
if self.show_animation:
2424
plt.ion()
2525
fig = plt.figure()
26+
# for stopping simulation with the esc key.
2627
fig.canvas.mpl_connect('key_release_event',
2728
lambda event: [exit(0) if event.key == 'escape' else None])
2829

AerialNavigation/rocket_powered_landing/rocket_powered_landing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ def plot_animation(X, U): # pragma: no cover
567567

568568
fig = plt.figure()
569569
ax = fig.gca(projection='3d')
570+
# for stopping simulation with the esc key.
570571
fig.canvas.mpl_connect('key_release_event',
571572
lambda event: [exit(0) if event.key == 'escape' else None])
572573

ArmNavigation/arm_obstacle_navigation/arm_obstacle_navigation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def astar_torus(grid, start_node, goal_node):
162162
for i in range(1, len(route)):
163163
grid[route[i]] = 6
164164
plt.cla()
165+
# for stopping simulation with the esc key.
165166
plt.gcf().canvas.mpl_connect('key_release_event',
166167
lambda event: [exit(0) if event.key == 'escape' else None])
167168
plt.imshow(grid, cmap=cmap, norm=norm, interpolation=None)

ArmNavigation/arm_obstacle_navigation/arm_obstacle_navigation_2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ def astar_torus(grid, start_node, goal_node):
193193
for i in range(1, len(route)):
194194
grid[route[i]] = 6
195195
plt.cla()
196+
# for stopping simulation with the esc key.
196197
plt.gcf().canvas.mpl_connect('key_release_event',
197198
lambda event: [exit(0) if event.key == 'escape' else None])
198199
plt.imshow(grid, cmap=cmap, norm=norm, interpolation=None)

ArmNavigation/n_joint_arm_to_point_control/NLinkArm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def update_points(self):
5151

5252
def plot(self): # pragma: no cover
5353
plt.cla()
54+
# for stopping simulation with the esc key.
5455
plt.gcf().canvas.mpl_connect('key_release_event',
5556
lambda event: [exit(0) if event.key == 'escape' else None])
5657

ArmNavigation/two_joint_arm_to_point_control/two_joint_arm_to_point_control.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def animation():
114114
def main(): # pragma: no cover
115115
fig = plt.figure()
116116
fig.canvas.mpl_connect("button_press_event", click)
117+
# for stopping simulation with the esc key.
117118
fig.canvas.mpl_connect('key_release_event',
118119
lambda event: [exit(0) if event.key == 'escape' else None])
119120
two_joint_arm()

Bipedal/bipedal_planner/bipedal_planner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def walk(self, T_sup=0.8, z_c=0.8, a=10, b=1, plot=False):
111111
if c > len(com_trajectory_for_plot):
112112
# set up plotter
113113
plt.cla()
114+
# for stopping simulation with the esc key.
114115
plt.gcf().canvas.mpl_connect('key_release_event',
115116
lambda event: [exit(0) if event.key == 'escape' else None])
116117
ax.set_zlim(0, z_c * 2)

Localization/ensemble_kalman_filter/ensemble_kalman_filter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def main():
213213

214214
if show_animation:
215215
plt.cla()
216+
# for stopping simulation with the esc key.
216217
plt.gcf().canvas.mpl_connect('key_release_event',
217218
lambda event: [exit(0) if event.key == 'escape' else None])
218219

Localization/extended_kalman_filter/extended_kalman_filter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def main():
191191

192192
if show_animation:
193193
plt.cla()
194+
# for stopping simulation with the esc key.
194195
plt.gcf().canvas.mpl_connect('key_release_event',
195196
lambda event: [exit(0) if event.key == 'escape' else None])
196197
plt.plot(hz[0, :], hz[1, :], ".g")

Localization/histogram_filter/histogram_filter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def main():
233233

234234
if show_animation:
235235
plt.cla()
236+
# for stopping simulation with the esc key.
236237
plt.gcf().canvas.mpl_connect('key_release_event',
237238
lambda event: [exit(0) if event.key == 'escape' else None])
238239
draw_heat_map(grid_map.data, mx, my)

0 commit comments

Comments
 (0)