Default Robot class is generated without the version attribute
The robot class is generated without the version attribute and if I run:
import urdf_parser_py
import xml
xml.etree.ElementTree.tostring(urdf_parser_py.urdf.URDF("robot_name").to_xml())
I got this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/urdf_parser_py/xml_reflection/core.py", line 588, in to_xml
File "build/bdist.linux-x86_64/egg/urdf_parser_py/xml_reflection/core.py", line 581, in write_xml
File "build/bdist.linux-x86_64/egg/urdf_parser_py/xml_reflection/core.py", line 554, in add_to_xml
File "build/bdist.linux-x86_64/egg/urdf_parser_py/xml_reflection/core.py", line 336, in add_to_xml
AttributeError: 'Robot' object has no attribute 'version'
Is it possible to set the default robot class with version attribute equal to 1.0?
In this way I can avoid to specify every time the robot version.
import urdf_parser_py
import xml
xml.etree.ElementTree.tostring(urdf_parser_py.urdf.URDF("robot_name", 1.0).to_xml())
I did these tests on melodic-devel branch
This is definitely a problem; thanks for pointing it out. Please see https://github.com/ros/urdf_parser_py/pull/62 for a fix.
This is definitely a problem; thanks for pointing it out. Please see #62 for a fix.
Thank you @clalancette I checked the PR and I confirm that it solves the problem
Since we merged in #62 ages ago, closing this out.