Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki example with PR2 not working #75

Open
Cryptum169 opened this issue Mar 14, 2022 · 0 comments
Open

Wiki example with PR2 not working #75

Cryptum169 opened this issue Mar 14, 2022 · 0 comments

Comments

@Cryptum169
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant