Dynamic reconfigure default parameters
I am writing a node which accepts certain parameters. I would like to be able to pass them through a launch file, as well as make them dynamically reconfigurable.
What are the best practices regarding this? In particular:
- What happens if the value in the launch file is not the same as the default value in the
.cfg
file? - Does it matter whether I register the dynamic reconfigure services before or after getting the parameters from the nodehandle using
getParam()
?
Doesn't dynamic_reconfigure initialize the values from the param server automatically?
It would, but in configurations with "use_sim_time" and "rosbag play foo.bag --clock --pause" and then stepping through the bag file for debugging you potentially run into problems because no spinning seems to take place on sim_time, so no ros::spin()-based callbacks are called.