Overwriting a parameter in config file during runtime
Hi,
I'm writing a node that reads a parameter from a config file (.yaml) to set the initial value of a variable (using ros::param::get). During runtime this variable is constantly updated. Before shutdown, I want to overwrite the parameter in the config file so that it takes the final value of my variable. Unfortunately ros::param:set doesn't work as it only updates the parameter in the server but not in the file (that will be read a the next launch).
Is there a simple way to overwrite a parameter in a config file during runtime ? Or is dynamic_reconfigure the way to go ? It seems a bit overkill for the task I want to do ...
Thanks for your help !