XSD schema for validating ROS2 XML launch files.
Catch syntax errors before runtime and get IDE support.
Why
For the package.xml we have had it for years, a scheme.
But we found my muscle memory often typing type= instead of exec=.
Or $(find my_pkg) instead of $(find-pkg-share my_pkg).
And we could unit-test the node all we wanted, these errors only popped up in integration tests or even on the robot itself.
Would it not be nice if your editor already warned about you it?
Found and reported a few issues. But otherwise it works great!
For those using IntelliJ IDEs like PyCharm which do not support xml-model, use this (it should be more universal than xml-model, but it would be great if someone with VSCode confirms it works too).
I can’t imagine I didn’t pass over it in the last 6 years . I’ve been meaning to join the ROSGraph working group but didn’t get to that yet .
I do like last suggestion of Emerson to parse it from the implementation. That prevents issues like running out-of-sync.
Probably yes, but ideally I’d like to get some miles on it first. And if the launch_ros implementation would lean towards parsing it out of the implementation that would be better and this would be redundant.
“Een beetje van mezelf en een beetje van maggie”
It’s a hand-made implementation based on all launchfiles I had available. Then I had copilot help me find some niches in the implementation.
Well thank you for your enthousiasm!
Personally I didn’t like the noNamespaceSchemaLocation implementation as it leads to even more verbose template code. And it’s deviating from what we do in package.xml files.
How does your editor cope with the package.xml syntax?
PS your encoding is deprecated.