8000 fixed bug in jointdynamics, rne args are reversed in python version · yobzhuu/robotics-toolbox-python@6319cdd · GitHub
[go: up one dir, main page]

Skip to content {"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}

Commit 6319cdd

Browse files
committed
fixed bug in jointdynamics, rne args are reversed in python version
1 parent 63cfd8a commit 6319cdd

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

roboticstoolbox/robot/Dynamics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def jointdynamics(self, q, qd=None):
273273
zero = np.zeros((self.n))
274274
qdd = np.zeros((self.n))
275275
qdd[j] = 1
276-
M = self.rne(q, zero, qdd, grav=[0, 0, 0])
276+
M = self.rne(qdd, zero, q, grav=[0, 0, 0])
277277
J = link.Jm + M[j] / abs(link.G) ** 2
278278

279279
# compute friction

tests/test_SerialLink.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,16 +371,13 @@ def test_payload(self):
371371
nt.assert_array_almost_equal(panda.links[6].m, m)
372372

373373
def test_jointdynamics(self):
374-
# TODO
375-
self.skipTest("error jointdynamics not complete")
376-
# error in the J value
377374
puma = rp.models.DH.Puma560()
378375
jd = puma.jointdynamics(puma.qn)
376+
# numbers come from MATLAB
379377
nt.assert_array_almost_equal(jd[0], [0.001133478453251, 0.001480000000000])
380378
nt.assert_array_almost_equal(jd[1], [0.579706964030143e-3, 0.817000000000000e-3])
381379
nt.assert_array_almost_equal(jd[2], [0.000525146448377, 0.001380000000000])
382380

383-
384381
def test_twists(self):
385382
# TODO
386383
panda = rp.models.DH.Panda()

0 commit comments

Comments
 (0)
0