Problem with python parser URDF
Hi everyone,
I'm having some troubles extracting the information of a URDF file from the parameter server. In the launch file I load the robot in the parameter server with no problem or warning, in the usual way. The problem comes when I use the next instruction in my Python script:
self.urdf = URDF.from_parameter_server(key='robot_description')
Then in the terminal raises the following exception and the node dies:
[INFO] [WallTime: 1437558450.270437] [0.000000] Starting [jt_cartesian_controller] node
Material has neither a color nor textureMaterial has neither a color nor textureMaterial has neither a color nor textureMaterial has neither a color nor textureMaterial has neither a color nor textureMaterial has neither a color nor textureTraceback (most recent call last):
File "/home/joaquin/CERN/TFM_WS/src/youbot-phantom-omni/cartesian_controllers/scripts/jt_cartesian_controller.py", line 101, in <module>
jtc = JTCartesianController()
File "/home/joaquin/CERN/TFM_WS/src/youbot-phantom-omni/cartesian_controllers/scripts/jt_cartesian_controller.py", line 34, in __init__
self.urdf = URDF.from_parameter_server(key='robot_description')
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/urdf.py", line 450, in from_parameter_server
return cls.from_xml_string(rospy.get_param(key))
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 486, in from_xml_string
return cls.from_xml(node)
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 481, in from_xml
return cur_type.from_xml(node)
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 171, in from_xml
obj.read_xml(node)
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 474, in read_xml
self.XML_REFL.set_from_xml(self, node)
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 406, in set_from_xml
element.add_from_xml(obj, child)
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 312, in add_from_xml
value = self.value_type.from_xml(node)
File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 220, in from_xml
raise Exception(out)
Exception: Could not perform duck-typed parsing.
Value Type: <class 'urdf_parser_py.urdf.Transmission'>
Exception: Required element not set in XML: hardwareInterface
Value Type: <class 'urdf_parser_py.urdf.PR2Transmission'>
Exception: Required attribute not set in XML: type
I have checked the URDF file, and also the xacro files where transmission is defined. And everything seems to be correct. Which could be the problem with the parsing of the robot?
Note: I'm using Ubuntu 14.04.02 and ROS Indigo. The robot loaded is the Schunk LWA4P, whose package can be found in these repositories: schunk_robots schunk_modular_robotics
Thank you in advance.