Ask Your Question
0

How to extract images from a bagfile properly [closed]

asked 2018-03-20 02:04:38 -0600

Teddy_NTU gravatar image

Currently I have a bag file which recorded a camera view topic. Now I want to extract the image date with its corresponding time stamp. I am able to get the png form of the image data using the official way provided by ROS wiki, but some frames are missing even if I change the sec_per_frame parameter to be lower than 0.03. I am wondering what is the proper way to extract the image data.

To get the Bag Time, I simply rosplay the bag file and copy the information comes out from the terminal manually. It is okay for short-time recording, but definitely not a possible way for a long-time one. Is there a way I can save the bag time stamp into a text file directly? Is it possible to get the extracted images along with its corresponding time stamp?

Regards.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Teddy_NTU
close date 2018-03-21 21:31:17.410753

1 Answer

Sort by » oldest newest most voted
2

answered 2018-03-20 10:40:05 -0600

Not sure if there is a tool included or available, but if not, the rosbag API can help you to write a little tool in Python or C++.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-03-20 02:04:38 -0600

Seen: 518 times

Last updated: Mar 20 '18