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

dynamic reconfigure callback happens automatically when a node is launched without rqt client

asked 2016-12-15 12:37:41 -0600

ajain gravatar image

updated 2016-12-15 12:38:18 -0600

I am using dynamic_reconfigure in my node to adjust some params dynamically. I found that the first callback for dynamic reconfigure happens when the node is launched, specifically when I define the callback for dynamic reconfigure in my constructor. This causes my node to reject param values defined in my launch file and take in default values defined in cfg file for dynamic reconfigure.

I would expect the callback to happen only when I launch rqt_dynamic_reconfigure which sets up a client, not when I set up the server in my node. At least a regular ROS server and client works this way, not callback on server side until a client makes calls to that server. In the implementation of dynamic reconfigure, is there a way to not have the callback happen when server is set up and only change param values when I launch rqt_dynamic_reconfigure?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-12-15 13:28:19 -0600

Thomas D gravatar image

My strategy is to always create the dynamic reconfigure server before reading values from the parameter server. That way any launch file parameters will overwrite the default dynamic reconfigure values.It's definitely a gotcha, but once I was aware of it then has not been a problem.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-12-15 12:37:41 -0600

Seen: 16,997 times

Last updated: Dec 15 '16