Adding a topic to an existing rosbag file
Hi all, I have a bag file which includes topic /imu/data containing linear, angular velocity messages and their timestamps. How can I add a topic that has the transform calculated based on the velocity messages to my existing rosbag file? Thank you for your time.
Asked by jaden0747 on 2019-08-22 01:04:04 UTC
Answers
One way is what was mentioned in the first comment. Another way is to let this calculation and new topic be published and using the remap tag in lunch file to change the name of the old topic and simply record rosbag again using the new topic.
Asked by cassini.huygens on 2019-08-22 23:06:42 UTC
Comments
you are correct, but note that this might lead to some message missing, as the ROS publish/subscribe mechanism is not deterministic and thus cannot guarantee every message to be sent/received properly.
Asked by mgruhler on 2019-08-23 01:14:56 UTC
Comments
You can write a script using the rosbag API to do that. See the cookbook for examples.
Asked by mgruhler on 2019-08-22 04:38:07 UTC