Skip to content

Commit 670014f

Browse files
committed
Added unittest to check for inertia with a URDF robot containing fixed links
1 parent 687d345 commit 670014f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_ERobot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ def test_invdyn(self):
152152
tau = robot.rne(q, z, np.array([1, 1]))
153153
nt.assert_array_almost_equal(tau, np.r_[d11 + d12, d21 + d22])
154154

155+
def test_URDF_inertia(self):
156+
robot = rtb.models.URDF.UR10()
157+
try:
158+
robot.inertia(robot.q)
159+
except TypeError:
160+
self.fail("inertia() with a robot containing fixed links raised an error")
161+
155162

156163
class TestERobot2(unittest.TestCase):
157164
def test_plot(self):

0 commit comments

Comments
 (0)