ROS 2 launch: Python vs XML
Hi,
As a ROS teacher, I am in the process of adapting my lectures / labs to ROS 2 for the next intake in September. My target audience (master students / professionals) has two features:
- does not know ROS at all
- has heard / read that ROS will let them easily do complex stuff with their robots
Now that I am planning to create a few example / labs packages (and continue adapting my ROS 1 ones) with Noetic + Foxy, I really wonder about the Python vs XML choice for launch files.
ROS 1 users are used to XML format, its syntax and limitations. Most of it seems to be supported in ROS 2 - so we can do in ROS 2 XML what we used to do in ROS 1 (except, probably, parsing a xacro file, which was common practice).
ROS 2 proposes much more, just citing Composition and Life Cycle. I am not sure, from reading ROS 2 XML architecture and various discussions, what is currently supported in XML.
As a C++ teacher, I believe the first chapter of a C++ course is not a C summary. Similarly, I think the first chapter of a ROS 2 course should not be a ROS summary.
Hence, I have no issue in not talking about XML launch files at all (at least on the beginning), if they cannot express concepts such as composition / life cycle which are important in ROS 2. However, I find the Python syntax to be quite bloated, and I already feel my audience (students / professionals) sigh when facing their first Python launch file (my audience use robots to do stuff, they do not care about doing stuff do use robots)
So, my question is simple: should one take the XML approach, hoping that more and more concepts of ROS 2 get supported, or should they favor the Python approach, being able to do much more at the cost of a higher code length even for simple things?