Skip to content

Commit 118f552

Browse files
committed
fixed example
1 parent 86884e4 commit 118f552

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roboticstoolbox/examples/swift_recording.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
env = swift.Swift()
2020

2121
# Launch the sim in chrome as only chrome supports webm videos
22-
env.launch("google-chrome")
22+
env.launch(browser="google-chrome", realtime=True)
2323

2424
# Create a Panda robot object
2525
panda = rtb.models.Panda()
@@ -39,7 +39,7 @@
3939
env.start_recording("panda_swift_recording", 1 / dt)
4040

4141
# To export as a gif replace the above line with
42-
# env.start_recording('panda_swift_recording', 1 / dt, format='gif')
42+
# env.start_recording("panda_swift_recording", 1 / dt, format="gif")
4343

4444
# To export as a tar folder of jpg captures replace with
4545
# env.start_recording('panda_swift_recording', 1 / dt, format='jpg')
@@ -119,3 +119,6 @@
119119

120120
# Stop recording and save the video (to the downloads folder)
121121
env.stop_recording()
122+
123+
# Hold is required for gifs which take extra time to process
124+
# env.hold()

0 commit comments

Comments
 (0)