First, At the top level of the tutorials, add a section that explains two key ROS2 principles: ROS2 uses colcon to handle package management and simplify the installation of ROS2 based projects. The second thing that needs to be explained is that ROS2 is NOT strictly a messaging protocol. It is the basis for an entire operating system (to accommodate machines that do not have an OS already). This operating system operates based on callbacks where the assumed behavior is that everything happens as a reaction to stimulus. When an external stimulus is lacking, timers are provided to generate that external stimulus.
Second, Provide and document the ros message processors (ros_idl_generator_xxx) as separate standalone utilities, and setup the early tutorials to use these instead of the colcon build system.
Third, Provide further tutorial demonstrate how to integrate the simple examples into a full fledged ROS build using colcon.
I would be happy to at least review any new tutorials, and when my current project finishes up, I could probably help write some of them as well.
I think that sounds like a useful Advanced tutorial.
Very much disagree. The discussion above on Ament / Colcon does not change the fundamentals that they are the default and widely accepted toolset for ROS2. >90% of developers will be working with them. I believe that your and @actinium226 issues are very genuine and should be properly addressed with advanced documentation and examples without them however that is atypical for the majority of users. Having some note in the very early tutorials with links what you both describe would give folks like yourselves the opportunity to go down the road-less-traveled makes alot of sense. However, education conventions usually stipulates a concept needs to be brought up at least 3 times before its solidified in a studentsâ mind. The importance of additional exposure for new ROS users (and new linux/programmers) to the toolset cannot be overstated.
Please donât use sarcasm in forum posts. They are easily misunderstood. The tone that you intend is often lost when translated to text and is especially hard to understand for non-native language readers.
Indeed they are designed to work well together. But that doesnât mean that theyâre not useful separately.
This distinction may seem academic to you but this distinction is quite important. There are many use cases where we leverage this distinction. The first and actually most common one is that things like all the debian packages build and used every day simply use the pure build system and donât invoke any build tool. I believe that all the other packaging mechanisms for distribution also leverage the build system directly and donât use a build tool. All of these mechanisms effectively have their own infrastructure that replaces the need for a build tool. When youâre compiling from source having the build tool is much more important to deal with all the different elements on your system and enable you to keep your workspace up to date. We donât have the documentation of how to use the build system without the build tool in our core tutorials as it greatly increases the complexity of what we need to teach. That doesnât mean there arenât active use cases.
As an aside I donât think itâs useful to go into detail here about what actually ament_cmake is. Please see the linked documentation. But itâs really just a cmake library to make writing CMakeLists.txt more compact. Youâre just invoking CMake to build the packages.
The other place where the separation of the build tool and the build system is important is when youâre crossing languages. We support packages using multiple languages with their own build system. The build tool iterates over each of the packages and invokes itâs build system in the right sequence. To that end if we didnât have the separation between the build system and the build tool then we couldnât integrate packages across multiple languages.
You look to be taking this out of context. This is in reply to a comment that said that the external project to be integrated with had a system thatâs unable to be integrated. If you start with that as a premise, this would be the only approach and it would work.
And in practice this is exactly how almost every system is actually built. You got through a sequence of tools and buildsystems to install layer on top of layer onto your system until you have all the features that you want.
As I pointed out above the build tool is optional and there are active use cases which are working not using it. In addition to the use cases I highlighed above there are also projects that are simply importing and building ROS packages using just the CMake/ament_cmake functionality.
Iâm not sure what gave you this impression about the setup scripts, but itâs incorrect. Setup files are generated for each package by the build system, ament_cmake, if you test out a single package by doing your usual cmake; make; make install that there will be setup files generated. However the convenient workspace level setup files that aggregate all the packages in the correct topological order are generated by the build tool because itâs the only thing that knows the topological order. And if you donât want to use a build tool, then you need to have something else to replace that aggregation logic yourself.
I think that jumping from learning how to package software at the same time as learning the new API is more complicated that doing one and then the other to âa potential rethink of the packaging systemâ is a bit of a non-sequitor.
I agree that we could do some of our basic tutorials outside the concept of a package with the goal of teaching separate elements simultaneously. This can allow you to keep the tutorials more focused. As has been pointed out earlier in this thread though thereâs a cost to teaching people outside the standard development practices in that youâll teach them one way to start and then later tell them, âdonât do it the way that we just taught youâ because itâs bad practice. That will get people into bad practices.
You assert that the âpackage and build system/tool get in the way of writing codeâ. This is not connected to your previous line of though, itâs jumping from learning these two things together is potentially confusing, to stating that packaging gets in the way of developing code. I strongly disagree with this. Packaging is a very important tool for good software engineering. Purely writing lines of code is great, but what makes the ROS ecosystem vibrant is how much and how easily people can share code. And the first priority for making software shareable is to provide enough metadata for other users to be able to reuse the code. This is exactly the metadata that you need to give to the package. Likewise the package infrastructure makes you think about your dependency structure and what sort of modularity you can support. And we have a lot of tools for testing, linting, and distributing packages.
In your development youâre welcome to do anything you want in your CMakeLists.txt and youâre welcome to not create and setup a package.xml if you just want to leverage the functionality that ROS provides. But as soon as you want to share your code with others. Youâll want to export the appropriate .cmake files to support downstream users. And declaring your dependencies appropriately in your package.xml will make it much easier for users to verify that they have all the necessary dependencies satisfied.
You mention that ROS has a working system thatâs popular, but then imply that the packaging is getting in the way of the system. However small modular packages are generally preferred due to their siginifcantly easier maintenance. This was highlighted in the recent guidelines for architecting ROS Guidelines on how to architect ROS-based systems
Thereâs always space for improvement in any system. Many times people learning a system can get frustrated and upset and believe that there must be a better way to do something. And as I just stated there usually is. But in these projects thereâs a lot of history and built up functionality and experiences that have shaped the system over many times years of development. Proposing a general ârethinkâ of the system is not particularly helpful. If there are particular pain points that can be improved we can focus on improving those. If we run into blockers then maybe we need to consider structural changes. It would really help to focus on what you want to happen instead of general complaints that the current system doesnât work for you.
Indeed thereâs always multiple ways to use any tool and we want to make sure to focus on the one that we recommend most people use. There will always be power users who divert from the beaten path, but itâs counter productive to try to teach new users all of the power options before they understand how to put together a whole system. This approach is much more rewarding and helps with getting people engaged quickly which is what they need to have a good experience and come back to learn more.
Iâm sorry that you spent all that time working on this tutorial. As is called out at the top of that tutorial youâve gotten ahead of our documentation, the tutorial starts with,
INCOMPLETE: this is a draft of an upcoming tutorial for creating and using custom ROS interfaces. Disclaimer: The code provided is to support the explanation, it is likely outdated and should not be expected to compile as is"
This explains why youâve likely been having an issue getting it to compile on your system. Since that tutorial is incomplete itâs likely more productive to find an example package as close to what you want to do to follow. In this case Iâd recommend looking at a small representative package such as example_intefaces and examples
If others run into these sort of disclaimers in the future please take a moment to search and if nothing found ask on https://answers.ros.org to see if there might be another example you could follow or if thereâs more up to date resources or an example you could follow. We have a large helpful community that can answer well crafted questions quite quickly. There are dozens of packages that declare their own messages that we could point you to as examples in the mean time until we have time to fill in that tutorial.