Best way to add a topic to an existing rosbag?
What would be the best way to add a topic to an existing rosbag?
Play the bag and publish the topic while doing a rosbag record -a?
Thanks!
What would be the best way to add a topic to an existing rosbag?
Play the bag and publish the topic while doing a rosbag record -a?
Thanks!
Use the rosbag API to open the bag, and write it out while adding the new messages for the topic.
Edit: if you already have a bag that has the other topic(s) (or can easily create one), you could attempt a merge instead. No official tools afaik, but there have been some people that implemented similar things. See #q122761 fi.
I believe "misleading" is a bit strong: only very few storage formats that support streaming interfaces / infrastructure will allow you to append data to the end and still have everything work correctly (ie: stream the contents in chronological order). It's simply not something that ..
For the answer, it seems simpler to write the details of the method in addition to linking vs. just linking with ambiguous phrasing. This suggests the links could hold the answer. I know how to re-write... and I was hoping to append, so I expected to be enlightened.
So that's what I meant by misleading. The answer isn't wrong, it just dangled hope before me but when I looked at the links I realized it's what I've already been doing (and could have been spared time reading). Python can append to files, so it's reasonable to think bags might allow it, too.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2017-08-28 08:45:00 -0600
Seen: 2,131 times
Last updated: Aug 28 '17
Extracting compressed image data from bag file results in doubled up or dropped frames
How to visualize/read string messages from Rosbag
Can I use the Python Ros bag API without making a workspace?
Bagfile (containing depth and RGB data) to picture frames
Best practices for logging messages and parameters
Extract robot position from rosbag
How do I parse rostopics from a ros bag in C++?
Add to an bag you just created in
w
mode or add to a file by opening and appending? The latter is not possible