From f6611870d2c7f4de9d1c2140d686ca0e4e2d0842 Mon Sep 17 00:00:00 2001 From: Sheng Zhong Date: Thu, 29 Aug 2024 16:51:29 -0400 Subject: [PATCH] Fix ur5 URDF pathing --- tests/test_kinematics.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_kinematics.py b/tests/test_kinematics.py index bd03aa4..f70acbc 100644 --- a/tests/test_kinematics.py +++ b/tests/test_kinematics.py @@ -281,12 +281,13 @@ def test_fk_partial_batched(): def test_ur5_fk(): - pk_chain = pk.build_serial_chain_from_urdf(open('ur5.urdf').read(), 'ee_link', 'base_link') + urdf = os.path.join(TEST_DIR, "ur5.urdf") + pk_chain = pk.build_serial_chain_from_urdf(open(urdf).read(), 'ee_link', 'base_link') th = [0.0, -math.pi / 4.0, 0.0, math.pi / 2.0, 0.0, math.pi / 4.0] try: import ikpy.chain - ik_chain = ikpy.chain.Chain.from_urdf_file('ur5.urdf', + ik_chain = ikpy.chain.Chain.from_urdf_file(urdf, active_links_mask=[False, True, True, True, True, True, True, False]) ik_ret = ik_chain.forward_kinematics([0, *th, 0]) except ImportError: