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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.