Skip to content

Commit 20eaef8

Browse files
committed
fix cut and paste error in DHRobot.alpha method
1 parent dc0f9e3 commit 20eaef8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

roboticstoolbox/robot/DHRobot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def alpha(self):
461461
"""
462462
v = []
463463
for i in range(self.n):
464-
v.append(self.links[i].theta)
464+
v.append(self.links[i].alpha)
465465
return v
466466

467467
@property

tests/test_DHRobot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import roboticstoolbox as rp
99
import spatialmath as sm
1010
import unittest
11+
import math
1112

1213

1314
class TestDHRobot(unittest.TestCase):
@@ -1485,7 +1486,7 @@ def test_alpha(self):
14851486
r0 = rp.models.DH.Puma560()
14861487

14871488
nt.assert_array_almost_equal(
1488-
r0.alpha, [0., 0., 0., 0., 0., 0.])
1489+
r0.alpha, np.r_[1, 0, -1, 1, -1, 0] * math.pi / 2)
14891490

14901491
def test_ets(self):
14911492
panda = rp.models.DH.Panda()

0 commit comments

Comments
 (0)