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 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.