[ros-users] Recovering data from corrupted bag files?

Andrew Chambers achamber at gmail.com
Sat Nov 13 00:03:09 UTC 2010


I captured a large bag file (8GB) onto a flash drive and I'm having
some problems with the bag file. I'm hoping someone has some thoughts
about how to recover the data.

After doing a rosbag check on the file, I'm prompted to reindex. After
reindexing, I can play and get info on the bag file but the duration
of the file is much shorter than it should be.

Here is the output from rosbag info:

path:        2010-11-11-13-37-15.orig.bag
version:     2.0
duration:    4:12s (252s)
start:       Nov 11 2010 13:37:16.53 (1289500636.53)
end:         Nov 11 2010 13:41:29.10 (1289500889.10)
size:        8.6 GB
messages:    61630
compression: none [1263/1263 chunks]
types:       airrobot/airrobotStatus [0e57b2e36051c68a9631c54edf913cc9]
             nav_msgs/Odometry       [cd5e73d190d741a2f92e81eda573aca7]
             roslib/Log              [acffd30cd6b6de30f120938c17c593fb]
             sensor_msgs/CameraInfo  [1b5cf7f984c229b6141ceb3a955aa18f]
             sensor_msgs/Image       [060021388200f6f0f447d0fcd9c64743]
             sensor_msgs/Imu         [6a62c6daae103f4ff57a132d6f95cec2]
             sensor_msgs/LaserScan   [90c7ef2dc6895d81024acba2ac42f369]
topics:      /airrobot_gps_data            1528 msgs @   6.6 Hz :
nav_msgs/Odometry
             /airrobot_imu_data            3057 msgs @  13.3 Hz :
sensor_msgs/Imu
             /airrobot_status              1529 msgs @   6.6 Hz :
airrobot/airrobotStatus
             /imu_data                    20008 msgs @ 154.8 Hz :
sensor_msgs/Imu
             /optilogic_laserscan         27914 msgs @ 111.5 Hz :
sensor_msgs/LaserScan
             /rosout                         12 msgs @  25.9 Hz :
roslib/Log              (4 connections)
             /rosout_agg                      1 msg             :
roslib/Log
             /unicap_camera/camera_info    3792 msgs @  15.0 Hz :
sensor_msgs/CameraInfo
             /unicap_camera/image_raw      3789 msgs @  15.0 Hz :
sensor_msgs/Image


You can see the size is 8GB but the duration is only 252 seconds.
Normally when recording bag files on this system, we get about 5MB/sec
but here it is 341 MB/sec. I was using bviplus
(http://bviplus.sourceforge.net/) to look at the raw data in the bag
file.

Here is a link to the file:
http://www.frc.ri.cmu.edu/~achamber/2010-Nov-11/2010-11-11-13-37-15.bag

Thanks,
Andrew



More information about the ros-users mailing list