Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in Dynamics and puma_fdyn #336

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions roboticstoolbox/examples/puma_fdyn.py
Expand Up @@ -7,13 +7,13 @@
p560 = p560.nofriction()

# print the kinematic & dynamic parameters
p560.printdyn()
# p560.printdyn() not working

# simulate motion over 5s with zero torque input
d = p560.fdyn(5, p560.qr, dt=0.05)

# show the joint angle trajectory
rtb.tools.trajectory.qplot(d.q)
rtb.tools.xplot(d.q)

# animate it
p560.plot(d.q) # movie='falling_puma.gif')
6 changes: 3 additions & 3 deletions roboticstoolbox/robot/Dynamics.py
Expand Up @@ -1036,7 +1036,7 @@ def coriolis_x(
if Mx is None:
Mx = self.inertia_x(q[0, :], Ji=Ji)
if Jd is None:
Jd = self.jacob_dot(q[0, :], qd[0, :], J0=Ja)
Jd = self.jacob0_dot(q[0, :], qd[0, :], J0=Ja)
return Ji.T @ (C - Mx @ Jd) @ Ji
else:
# trajectory case
Expand All @@ -1053,7 +1053,7 @@ def coriolis_x(

C = self.coriolis(qk, qdk)
Mx = self.inertia_x(qk, Ji=Ji)
Jd = self.jacob_dot(qk, qdk, J0=J)
Jd = self.jacob0_dot(qk, qdk, J0=J)

Ct[k, :, :] = Ji.T @ (C - Mx @ Jd) @ Ji

Expand Down Expand Up @@ -1262,7 +1262,7 @@ def accel_x(

# need Jacobian dot
qdk = Ji @ xdk
Jd = self.jacob_dot(qk, qdk, J0=J)
Jd = self.jacob0_dot(qk, qdk, J0=J)

xdd[k, :] = T @ (Jd @ qdk + J @ qdd)

Expand Down