ros / urdfdom

URDF parser
http://ros.org/wiki/urdf
Other
96 stars 132 forks source link

Usage of `version` attribute in `robot` xml-node #163

Closed hwiedPro closed 3 years ago

hwiedPro commented 3 years ago

Hi guys,

currently a URDF starts with something like this:

<?xml version="1.0" ?>
<robot name="robot_name" version="1.0">
...

Does the version attribute to the robot node describe the version of the URDF format or the version of the robot?

As there might be versioning of the robot description and as the attribute is placed in the robot node - at least to me - it seems that it describes the version of the robot (description). But as the version attribute is very restircted (has to be "1.0") I guess you meant to describe the format version.

Why isn't this attribute then called something like urdf_version e.g.:

 <?xml version="1.0" ?>
-<robot name="robot_name" version="1.0">
+<robot name="robot_name" urdf_version="1.0" version="$robot_version"> 

Also it would be possible to handle this like it's done for xml?

-<?xml version="1.0" ?>
+<?urdf version="1.0" ?> 
<robot name="robot_name" version="$robot_version">
...

I'm looking forward to your reply. :) Best wishes and thanks for this great package!

clalancette commented 3 years ago

Does the version attribute to the robot node describe the version of the URDF format or the version of the robot?

It's the version of the URDF format.

As for your other suggestions: in short, I guess we could have done all of those other things, but the version tag has been in the schema for many years now. While the things you suggest might be slightly better, changing the schema and all downstream users would be extremely painful for a small amount of improvement.

If you really want to version the robot, I'd suggest doing the opposite: propose adding a robot_version field. That's backwards compatible and something that we could consider.

hwiedPro commented 3 years ago

Thanks for your answer. We will do so!