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

rosbag file freezes while playing

asked 2011-10-12 02:16:16 -0500

Runje gravatar image

updated 2011-10-12 07:55:02 -0500

joq gravatar image

Hey,

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
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
5

answered 2012-02-28 05:35:11 -0500

phil0stine gravatar image

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.

edit flag offensive delete link more

Comments

1

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.

Mac gravatar image Mac  ( 2012-02-28 05:41:50 -0500 )edit
3

answered 2012-02-28 06:10:48 -0500

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.

edit flag offensive delete link more
0

answered 2020-08-19 09:24:24 -0500

UserK gravatar image

Had a similar issue with a 1.5Gb bag file. Tried :

  • selectively playing topics back
  • slowing the rate down to a tenth

But at the end it was caused by empty messages in the bag.

Solved using:

rosbag play --skip-empty=1 fat_file.bag
edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-10-12 02:16:16 -0500

Seen: 2,478 times

Last updated: Aug 19 '20