Rosanswers logo


i want to work with a uncompressed 3.9 GB bag file. (72s long)

The file is played with the --clock option and the use_sim_time parameter is set to true. When i just start a roscore and play back the file, it s not freezing, that is the time at the display is running till the end without lags. The messages are published as they should, but if i now start another node, rviz for example, the time at the display freezes, even after rviz is started or even if i first start rviz and then start the bag file. And the messages are no longer published, even the clock topic doesn't publish messages any more for the most time. Randomly it is publishing a few messages.

Did anyone have the same problem? Or do you have any idea what the problem could be?

I am working with ros-electric the latest version and ubuntu 10.04.

I tried also a smaller bag file(380MB) and got smaller lags. Do you think the problem is only that the bag file is too big?

Here ist the rosbag info output:

version:     2.0
duration:    1:12s (72s)
start:       Jul 28 2011 20:13:19.65 (1311876799.65)
end:         Jul 28 2011 20:14:32.63 (1311876872.63)
size:        3.9 GB
messages:    141043
compression: none [3643/3643 chunks]
types:       nav_msgs/Odometry              [cd5e73d190d741a2f92e81eda573aca7]
             sensor_msgs/CameraInfo         [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/Image              [060021388200f6f0f447d0fcd9c64743]
             sensor_msgs/Imu                [6a62c6daae103f4ff57a132d6f95cec2]
             sensor_msgs/LaserScan          [90c7ef2dc6895d81024acba2ac42f369]
             std_msgs/Float64               [fdb28210bfa9d7c91146260178d9a584]
             stereo_msgs/DisparityImage     [04a177815f75271039fa21f16acad8c9]
             tf/tfMessage                   [94810edda583a504dfda3829e70d7eec]
             visualization_msgs/MarkerArray [f10fe193d6fac1bf68fad5d31da421a7]
topics:      /camera/depth/camera_info    1209 msgs    : sensor_msgs/CameraInfo        
             /camera/depth/disparity      1208 msgs    : stereo_msgs/DisparityImage    
             /camera/depth/image          1209 msgs    : sensor_msgs/Image             
             /camera/rgb/camera_info      1225 msgs    : sensor_msgs/CameraInfo        
             /camera/rgb/image_color      1225 msgs    : sensor_msgs/Image             
             /cortex_marker_array        21853 msgs    : visualization_msgs/MarkerArray
             /cur_tilt_angle             35823 msgs    : std_msgs/Float64              
             /imu                        35825 msgs    : sensor_msgs/Imu               
             /pose                         723 msgs    : nav_msgs/Odometry             
             /scan                         679 msgs    : sensor_msgs/LaserScan         
             /tf                         40064 msgs    : tf/tfMessage

Originally posted by Runje on ROS Answers with karma: 41 on 2011-10-12

Post score: 4


2 Answers 2


Rosanswers logo

Ive had this happen on larger bags, if the bags have lots of data throughput. It looks like the bag is a nomral size, but depending on your hardware, maybe its the issue.

Try to set the rosbag playback rate down and see if it plays.

Originally posted by phil0stine with karma: 682 on 2012-02-28

This answer was ACCEPTED on the original site

Post score: 5

Original comments

Comment by Mac on 2012-02-28:
I second this. The bagfile itself isn't too big; I've worked with much larger bagfiles without a problem. On the other hand, it looks like your bagfile is fairly data-intensive (three image topics), and (particularly if the frame rate is high) that's going to hurt. Setting -r0.5 or 0.25 might help.


Rosanswers logo

Here are some things I suggest:

Increase the --queue parameter Also, if you don't care about the time scale, decrease the --rate parameter. You can do a combination of both - high queue and low rate will alleviate the strain on the system, as far as I can tell.

Another thing to try is to load the bag using rxbag and play it from the "play" control in the GUI. This worked better for me when I was using huge (>4GB) bags. I assume its because rxbag loads everything in the memory at once, whereas rosbag reads it sequentially from disk, but that's a guess.

Here's a somewhat similar thread.

Originally posted by Ivan Dryanovski with karma: 4954 on 2012-02-28

This answer was NOT ACCEPTED on the original site

Post score: 3


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.