[ros-users] [Discourse.ros.org] [Next Generation ROS] Why do we have package.xml instead of package.yaml in ROS2?

ruffsl ros.discourse at gmail.com
Sun Mar 4 08:48:34 UTC 2018



Another benefit of XML over YAML is the ability to define a schema to check the format of the input structure before parsing, thus avoiding the need to monkey patch the interpreter for every corner case or ill formatted files by the users. The user can also get constructive feedback from the schema validator as to exactly what they did wrong, and how to comply. Additionally if you make an interpreter in a different implementation or programming language, everyone has common definition of the format structure that is perhaps more rigorous then written paragraph docs or less ambiguous than just several stock examples. 

I don't think catkin or ament are using schema vacation presently, but the community has defined a XSD to express the package schema.

https://github.com/ros-infrastructure/rep/blob/master/xsd/package_format2.xsd

I personally prefer/enjoy using yaml for lightweight and informal configuration formats, but have found defaulting back to XML for anything more extensive or formal as beneficial in clarity and maintainability. Plus if you have a reasonable text editor with syntax highlighting and auto complete, the extra markup just kind of fades into the background.





---
[Visit Topic](https://discourse.ros.org/t/why-do-we-have-package-xml-instead-of-package-yaml-in-ros2/3970/3) or reply to this email to respond.




More information about the ros-users mailing list