Skip to content

Wiki example with PR2 not working #75

@Cryptum169

Description

@Cryptum169

Hi! I ran into some errors when parsing PR2 urdf files, and it seems the example from wiki http://wiki.ros.org/urdfdom_py is not working for me as well.

> rosrun urdfdom_py display_urdf `rospack find pr2_mechanism_model`/pr2.urdf

Unknown attribute "type" in /robot[@name='pr2']/link[@name='base_laser_link']
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='fl_caster_rotation_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='fr_caster_rotation_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='bl_caster_rotation_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='br_caster_rotation_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='torso_lift_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='head_pan_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='head_tilt_joint']/calibration
Unknown attribute "type" in /robot[@name='pr2']/link[@name='wide_stereo_optical_frame']
Unknown attribute "type" in /robot[@name='pr2']/link[@name='narrow_stereo_optical_frame']
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='laser_tilt_mount_joint']/calibration
Unknown attribute "type" in /robot[@name='pr2']/link[@name='laser_tilt_link']
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='r_shoulder_pan_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='r_shoulder_lift_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='r_upper_arm_roll_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='r_forearm_roll_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='r_elbow_flex_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='r_wrist_flex_joint']/calibration
Unknown attribute "reference_position" in /robot[@name='pr2']/joint[@name='r_wrist_roll_joint']/calibration
Unknown tag "verbose" in /robot[@name='pr2']/link[@name='r_wrist_roll_link']/collision[1]
Traceback (most recent call last):
  File "/home/perceptron/catkin_ws_calib/devel/lib/urdfdom_py/display_urdf", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/scripts/display_urdf", line 18, in <module>
    robot = URDF.from_xml_string(args.file.read())
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py", line 616, in from_xml_string
    return cls.from_xml(node, path)
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py", line 610, in from_xml
    return cur_type.from_xml(node, path)
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py", line 232, in from_xml
    obj.read_xml(node, path)
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py", line 598, in read_xml
    self.XML_REFL.set_from_xml(self, node, path)
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py", line 513, in set_from_xml
    element.add_from_xml(obj, child, element_path)
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py", line 390, in add_from_xml
    value = self.value_type.from_xml(node, path)
  File "/home/perceptron/catkin_ws_calib/src/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py", line 283, in from_xml
    raise ParseError(Exception(out), path)
urdf_parser_py.xml_reflection.core.ParseError: ParseError in /robot[@name='pr2']/transmission[@name='r_wrist_trans']:
Could not perform duck-typed parsing.
Value Type: <class 'urdf_parser_py.urdf.Transmission'>
Exception: ParseError in /robot[@name='pr2']/transmission[@name='r_wrist_trans']:
Required element not set in XML: type

This seems to be an instance of #36 and ros/urdfdom#36 (comment) but I'm not sure why the fix in that issue didn't help with this, any help or pointer is appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions