This chapter provides the detailed explanation of ROS 2 Control, including how the controller configuration, ros2_control interfaces, Gazebo integration, and wheel joints work together. The practical implementation of these concepts is covered in Chapter 28.
Until now the Bumperbot could be seen and simulated, but nothing could turn its wheels. This chapter adds ros2_control. The new code is small. The hard part is that the files point at each other, so this page builds the picture one step at a time, in the order the work is done.
Each step shows one file, explains every line of it, and only then shows how it connects to the files already seen. Every connection can be clicked to see the two lines side by side.
One new package, one new xacro file, and four existing files with a few added lines. The links and joints of the URDF, and all the physics settings, are untouched.
Thirteen steps, in the order the work is done. Each one starts with where things stand, shows one piece of code with every line explained, shows how it connects to what came before, and ends with a small lab to play with.
Now that every file has been met, here is the whole picture. Pick a connection to see the files it joins, the lines involved, and the rule they have to obey.
Each scenario changes one thing in one file. The page shows what else had to agree with it, and what the startup log would look like. Messages vary between versions, so the symptoms are described as typical.