Using rosbag play and record another synchronized bag file?

asked 2020-11-17 18:15:24 -0500

knsjoon gravatar image

So my issue is that I have a rosbag that has groundtruth pose of a robot. I want to do "rosbag play" so that the robot can follow the exactly same trajectory as the ground truth pose whenever I do "rosbag play".

While I do rosbag play, I want to "rosbag record" one topic (in a separate bagfile) in a way that in a csv file, it has same timestamp as groundtruth pose csv.

So if the robot was at position 0, 0, 0 at timestamp 110, then I want to record an image taken at that position with timestamp 110. This is important for me because I need to capture two different versions of images taken at the same location at the same time (so that I can use both images by finding them by timestamp)

Is there a way to achieve this?

edit retag flag offensive close merge delete