ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

dynamic reconfigure and the parameter server (which getParam uses) are designed to solve different problems. The parameter server is useful for situations where you know the value of parameters before a node starts, and know that those parameters will never change. Dynamic reconfigure is for situations where you might not know the values of parameters before a node starts, or those parameters might change while a node is running. Dynamic reconfigure require a little extra development effort in creating the cfg file where all the parameters and their types are declared, and requires a callback in the reconfigurable node which is called when the configuration changes.

The choice between using the parameter server and dynamic reconfigure does not have to do with performance, it has to do with whether or not parameters will change while a node is running. Dynamic reconfigure may impose a slight performance penalty since it will need an extra thread for its callback, but it's probably not significant.