Hello All,
I apologize if this is not the right forum for this, but I recently started on a project that will use ROS2 for IPC and inter-container communication.
For a little background, I have been a C++ developer for 20 years, and a C developer for 10 years before that. I have used MQTT on other projects, and fully appreciate what ROS2 offers.
My first impressions of ROS2 have not been good. Don’t get me wrong, I understand what ROS does, how it does it, and believe it is the right tool for the job, and in spite of the on-going difficulty in using ROS2, we are committed to using it.
Our trouble stems form the build environment that ROS2 dashing has. I have built the basic tutorials at https://index.ros.org/doc/ros2/Tutorials/, and after some trouble, they compile and all is well. The next step in my journey is to incorporate custom messages, and here is where the story has become unhappy. I started following the tutorial at: https://index.ros.org/doc/ros2/Tutorials/Rosidl-Tutorial/, and the rails came undone. This tutorial fails to build with cryptic errors. One of our partners put me in touch with their ROS/ROS2 expert, and he is helping me work through the build environment issues. We will solve these issues, but this is pain I can do without. My first MQTT project worked in 30 minutes from start to hello world (with my own custom payload). I have so far invested 2 days of my time and at least a few hours of others time, and still do not have a working basic example of a custom payload with ROS2, in fact, we have so-far been unable to get the above tutorial to run on my development machine.
From a new dev perspective, I have a few simple suggestions to hopefully help others who may follow in my steps:
First, The existing build environment is far over complicated for a simple tutorial. As noted, I can’t get the example programs to run because the build environment is broken. This is almost certainly not related to anything that is core to ROS2, and could easily have been avoided. The tutorials should include only a few files, and perform the command line compile by hand (avoid automated build tools: that’s like taking a bazooka to a fly). For a good example of how a tutorial should be: see https://cumulocity.com/guides/device-sdk/mqtt-examples/#hello-mqtt-c. Notice that this tutorial requires only gcc, and nothing else, it distills the example down to its most basic form. A similar tutorial for ROS2 would require only the gcc compiler and the translation script that generates the C and C++ header files for the custom messages.
Second, document the translation scripts as standalone programs so that people who wish to use their own build environment do not have to reverse engineer yours just to extract the custom message translation mechanism. You have a good build system for complex projects (at least I assume it is good as I don’t have it working yet), but it is grossly overkill for most projects, especially learning projects for people who are new to ROS, but have lots of experience as developers. I am in no way suggesting that your build system should be changed, just that the option to skip the build system be supported for those that don’t need/want it, and for the sake of simple tutorials.