Dear all,
my problem is the following:
I want to save a rosbag file and dump at the same time the content of the parameter server on a file.
I want the file and the rosbag to have exactly the same time appendix. This is a similar problem to [this](http://answers.ros.org/question/213145/use-rosparam-get-in-launch-file/) but not quite the same because it doesn't involve setting the timestamps into parameter server values.
I couldn't find a way to save the timestamp string into an `arg`, however the following code kind of works for the parameters:
The output says something like:
running rosparam dump robot_description_`date +'%Y-%m-%d-%H-%M-%S'`.yaml /robot_description
but the filename is correct.
However,
when it comes to the rosbag part, the command is not understood, and in particular it believes `+'%Y-%m-%d-%H-%M-%S'` is a topic to log instead of the argument of `date`.
I know I could exploit the automatic appending of the string from rosbag, but there is a tiny chance the two string would be different.
I've tried to execute a fake node with a bash script inside that sets up an environment variable to be captured with `$(env ...)` but it didn't work out.
I've tried to use python and `$(eval ...)`, but I couldn't get to work because I cant import and use `time` in the same line.
I understood that `param` are inaccessible from a launchfile (you can only set them but not get) unless you do dirty tricks with `launch-prefix`.
Is there another way (please don't tell me the only way is to create a Python script to run the rosbag)?
↧