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()
?
Originally posted by Ivan Dryanovski on ROS Answers with karma: 4954 on 2012-02-23
Post score: 9
Original comments
Comment by dornhege on 2012-02-23:
Doesn't dynamic_reconfigure initialize the values from the param server automatically?
Comment by Crusty on 2014-04-14:
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.