Triggering rosbag
Is there any way of triggering the recording of signals via rosbag with a signal made available as ROS topic? Typically rosbag takes quite a bit of time to subscribe to the different topics when being started. So is there any way of making sure rosbag starts recording exactly at the moment a trigger is send over one of the topics without additional delay for connecting to topics? We would need this functionality to synchronize the rosbag recording with recordings that can only be made outside of ROS.
Not that I know of. Depending on how much data you need, you could just send a trigger message, record that also and then later filter the log file to only include messages after that.
There is also a C++ API to rosbag to create and log data programmatically. It may be of use in your case.