urdfparser_py fails on valid new transmission element

Bug #1487180 reported by Guillaume W.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
urdfdom (Ubuntu)
New
Undecided
Unassigned

Bug Description

Description: Ubuntu 14.04.3 LTS
Release: 14.04

trusty version of the lib packaged by ROS

ros-indigo-urdfdom-py:
  Installed: 0.3.0-2trusty-20150424-0403-+0000
  Candidate: 0.3.0-2trusty-20150424-0403-+0000
  Version table:
 *** 0.3.0-2trusty-20150424-0403-+0000 0
        400 http://packages.ros.org/ros/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Details :

What should happen : urdfparser_py should parse without errors a valid example of a transmission (new type) given in the reference http://wiki.ros.org/urdf/XML/Transmission

What happened : urdfparser_py fails to parse the valid new type of transmission. It requires a hardwareInterface to be there where this is not mandatory (but could exist)

Traceback (most recent call last):
  File "./test_urdf.py", line 48, in <module>
    robot = URDF.from_xml_file(urdf_filename)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/urdf_parser_py/xml_reflection/core.py", line 491, in from_xml_file
    return cls.from_xml_string(xml_string)
  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

Revision history for this message
Jose Luis Rivero (j-rivero) wrote :

Thanks for the report Guillaume:

This bug tracker is specific for the urdfdom package delivered from Ubuntu. You problem comes probably from ROS packages. I would recommend to report the bug in one of both:

 * Upstream: https://github.com/ros/urdfdom/issues
 * ROS answers: http://answers.ros.org/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.