Getting ready

Generally, we program a node where we initialize the variables with data values that can only be modified within the node. If it is required to modify these values dynamically from outside the running node, we can use the Parameter Server, services, or topics.

For example, if we are working with a node that uses the PID controller to control the optimum speed of the motor, it is often required to tune the PID parameters, k1, k2, and k3. However, ROS has the Dynamic Reconfigure utility to perform these functions more efficiently.

In the following section, we will learn how to enable this feature in a basic example node, which requires adding the necessary lines in the CMakeLists.txt and package.xml files.

Get Robot Operating System Cookbook now with O’Reilly online learning.

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