ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Edit a rosbag

asked 2012-05-24 03:05:26 -0500

NStiurca gravatar image

I am interested in interactively editing a bag. Specifically, I have some bags which consist mainly of image data, and I want to delete some frames for various uninteresting reasons.

I don't fathom it would be crazy difficult to roll my own program which opens a bag, reads and displays each frame using OpenCV and ask the user to write that frame to a new bag (non-image data is always kept). Has anybody done anything like this before?

Alternatively, could I use the rxbag plugin API to delete messages directly from within rxbag (eg, selecting them in the timeline and deleting)?

I have very little experience with bags besides record/play and a quick glance at the API seems to suggest that editing isn't on the menu. If anybody has done any editing of rosbags, I would certainly appreciate any help you could give me.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-05-24 03:59:22 -0500

DimitriProsser gravatar image

Check out the rosbag API and the rosbag cookbook. The cookbook has some samples of ways to modify a bag file.

edit flag offensive delete link more
1

answered 2012-05-24 03:39:12 -0500

Lorenz gravatar image

I don't think you can edit a bag easily. What you can do is re-export some parts into a new bag. As far as I know, rxbag has support for doing that, but a simple python program that does exactly the same using the rosbag API shouldn't be hard either.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-05-24 03:05:26 -0500

Seen: 9,716 times

Last updated: May 24 '12