Hi ROS Devs…
I’m sure you’re aware of YAML which is more concise than XML. It also has ways to prevent code repetition like what Xacro does.
Do you think future versions of ROS should allow writing in YAML for URDF?
ROS Resources: ROS Homepage | Media and Trademarks | Documentation | ROS Index | How to Get Help | Q&A Help Site | Discussion Forum | Service Status |
Hi ROS Devs…
I’m sure you’re aware of YAML which is more concise than XML. It also has ways to prevent code repetition like what Xacro does.
Do you think future versions of ROS should allow writing in YAML for URDF?
If we’re discussing the future of URDF honestly I would like to see better support for closed kinematic chains e.g. parallel linkages, palletizing robots; URDF is currently incapable of describing those.
That doesn’t seem feasible. The urdfdom library seems to be too much wired into various parts of ROS and Gazebo.
However, you can write a program similar to xacro, but converting yaml to urdf. That should be doable and it would allow you to write the consice files you desire.
In my experience YAML tends to use a lot more whitespace (if including attributes in xml tags) and can be harder to read for long lists (no closing tag makes scope less clear) which I’m not a big fan of. In any case, @dheera’s point is a lot higher priority IMO.
You do realise that xacros is a huge advantage of .xml, because you can split huge .urdf.xml files into several? xacros ensure that you don’t have a huge 5000 line urdf but several files of < 1000 line files that describe the robot. For example, if you have a robot with several sensors, joints, links, plugins for the various Ros tools and ros2 control hardware interfaces, at some point you no longer want to manage this with just one file. This is possible with xacros.
Why not use lua files for configuration files like an urdf, like neovim does? This would have the huge advantage of still having the programmatic parts, as with .xml, and at the same time having a real programming language that can do more than .xml. If I really think about it, this could also be a good alternative for launch files. hm.