In this section you have seen how to use ROS 2 Topics to communicate between your nodes.

Now, you can already create more complex applications!

To recap, a topic is:

To implement topics in your ROS 2 application:

Note: your topic names should start with a letter (“98.7” is not a valid topic name, it was just used to introduce the concept with a real life analogy).

By using nodes, you can easily separate your code into different independent modules, one for each part of your application. And with topics, you can make them communicate.


And now, after Topics, the next logical step is to look at ROS 2 Services. That’s what we’ll see in the next section.


___________________________________


Download the complete code for this section (this is the code from all previous sections + the current one).