rosbag c++ API for stop recording
hi, I'm trying to make data record node by using rosbag record c++ api. But I cannot find the stop recording function at the rosbag::Recorder class. As I know, rosbag::Recorder class support only doTrigger(), run(), subscribe() functions.
Could you share me some idea to stop recording without shutdown the node?
Thanks in advance.
Hi @taehan,
Maybe you can use the functions startWriting, stopWriting. Listen to an input to "activate" or "deactivate" the read/write tasks.
Thanks for your information. Actually, as you know, startWriting, stopWriting functions are private, so I cannot access them. I think ROS record c++ API does not have stop function yet.
Currently, I solved the problem above to make another recordWrapper node, and recordWrapper node control start/stop recording tasks. I think it is not a nice solution, but it is working now. If you have another idea, please let us know.
Ok,
And why not closing the bag every time you want to stop and open it whenever you want to write?
I think I am missing a point here because I do not really know why you want to stop recording without shutting down the rosbag.
is this and xy problem, what do you want to achieve with that behavior?