Playing with ROS nodes

As we explained in the Nodes and nodelets section, nodes are executable programs and, once built, these executables can be found in the devel space. To practise and learn about nodes, we are going to use a typical package called turtlesim.

If you have installed the desktop installation, you will have the turtlesim package preinstalled; if not, install it with the following command:

    $ sudo apt-get install ros-kinetic-ros-tutorials  

Before starting this tutorial, it is important that you open a terminal and start roscore using the following command:

    $ roscore  

To get information on nodes, we have the rosnode tool. To see what parameters are provided, type the following command:

    $ rosnode  

You will obtain a list of ...

Get ROS Programming: Building Powerful Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.