Skip to content

Commit 18a25a6

Browse files
committed
fixed example
1 parent deb416f commit 18a25a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

roboticstoolbox/examples/swift_recording.py

Lines changed: 4 additions & 4 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("google-chrome")
2323

2424
# Create a Panda robot object
2525
panda = rtb.models.Panda()
@@ -36,7 +36,7 @@
3636
# Start recording with a framerate of 1/dt and
3737
# call the video panda_swift_recording
3838
# Export video as a webm file (this only works in Chrome)
39-
env.start_recording('panda_swift_recording', 1 / dt)
39+
env.start_recording("panda_swift_recording", 1 / dt)
4040

4141
# To export as a gif replace the above line with
4242
# env.start_recording('panda_swift_recording', 1 / dt, format='gif')
@@ -68,7 +68,7 @@
6868

6969
# Calulate the required end-effector spatial velocity for the robot
7070
# to approach the goal. Gain is set to 1.0
71-
v, arrived = rtb.p_servo(Te, Tep, 1.0)
71+
v, arrived = rtb.p_servo(Te, Tep, np.ones(6))
7272

7373
# Gain term (lambda) for control minimisation
7474
Y = 0.01
@@ -83,7 +83,7 @@
8383
Q[n:, n:] = (1 / e) * np.eye(6)
8484

8585
# The equality contraints
86-
Aeq = np.c_[panda.jacobe(panda.q), np.eye(6)]
86+
Aeq = np.c_[panda.jacob0(panda.q), np.eye(6)]
8787
beq = v.reshape((6,))
8888

8989
# The inequality constraints for joint limit avoidance

0 commit comments

Comments
 (0)