dual_panda_example_urdf.py
Go to the documentation of this file.
1 import sys
2 import subprocess
3 from .urdf_test_case import UrdfTestCase, PKG
4 from urdf_parser_py.urdf import URDF, Mesh, Cylinder, Sphere
5 
6 file = 'dual_panda/dual_panda_example.urdf.xacro'
7 
9 
11  urdf = self.xacro(file) # does not throw
12 
14  arm_id = 'foo'
15  urdf = self.xacro(file, args='arm_id_1:=%s' % arm_id)
16  for link in ['%s_link%s' % (arm_id, i) for i in range(0, 9)]:
17  self.assertContainsLink(urdf, link)
18 
20  arm_id = 'foo'
21  urdf = self.xacro(file, args='arm_id_1:=%s' % arm_id)
22  for joint in ['%s_joint%s' % (arm_id, i) for i in range(1, 9)]:
23  self.assertContainsJoint(urdf, joint)
24 
26  arm_id = 'foo'
27  urdf = self.xacro(file, args='arm_id_2:=%s' % arm_id)
28  for link in ['%s_link%s' % (arm_id, i) for i in range(0, 9)]:
29  self.assertContainsLink(urdf, link)
30 
32  arm_id = 'foo'
33  urdf = self.xacro(file, args='arm_id_2:=%s' % arm_id)
34  for joint in ['%s_joint%s' % (arm_id, i) for i in range(1, 9)]:
35  self.assertContainsJoint(urdf, joint)
36 
37 
38 if __name__ == '__main__':
39  import rosunit
40  rosunit.unitrun(PKG, 'dual_panda_example.urdf.xacro', TestPandaArmExampleURDF)
test.dual_panda_example_urdf.TestPandaArmExampleURDF
Definition: dual_panda_example_urdf.py:8
test.urdf_test_case.UrdfTestCase.assertContainsJoint
def assertContainsJoint(self, urdf, joint)
Definition: urdf_test_case.py:34
test.dual_panda_example_urdf.TestPandaArmExampleURDF.test_custom_arm_id_2_renames_joints
def test_custom_arm_id_2_renames_joints(self)
Definition: dual_panda_example_urdf.py:31
test.dual_panda_example_urdf.TestPandaArmExampleURDF.test_generate_urdf_without_args_is_possible
def test_generate_urdf_without_args_is_possible(self)
Definition: dual_panda_example_urdf.py:10
test.dual_panda_example_urdf.TestPandaArmExampleURDF.test_custom_arm_id_1_renames_links_0_up_to_8
def test_custom_arm_id_1_renames_links_0_up_to_8(self)
Definition: dual_panda_example_urdf.py:13
test.urdf_test_case.UrdfTestCase.assertContainsLink
def assertContainsLink(self, urdf, link)
Definition: urdf_test_case.py:25
test.urdf_test_case.UrdfTestCase.xacro
def xacro(self, file, args='')
Definition: urdf_test_case.py:9
test.dual_panda_example_urdf.TestPandaArmExampleURDF.test_custom_arm_id_2_renames_links_0_up_to_8
def test_custom_arm_id_2_renames_links_0_up_to_8(self)
Definition: dual_panda_example_urdf.py:25
test.urdf_test_case.UrdfTestCase
Definition: urdf_test_case.py:8
test.dual_panda_example_urdf.TestPandaArmExampleURDF.test_custom_arm_id_1_renames_joints_1_up_to_8
def test_custom_arm_id_1_renames_joints_1_up_to_8(self)
Definition: dual_panda_example_urdf.py:19


franka_description
Author(s): Franka Emika GmbH
autogenerated on Mon Sep 19 2022 02:33:19