Rosbag record buffer exceeded

While recording sensor data using rosbag record command (for e.g. rosbag record -a -O all_topics.bag), I get the following error-
“rosbag record buffer exceeded. Dropping oldest queued message”

The robot is Husky MI which has a lidar, thermal camera, imu and GPS. I could collect all published messages for 5 minutes (~100GB) then the system shows the error and stops recording.

What could be the reason? Is there any way to record data for an extended period of time?

1 Like

Hi @ehsan,

It might be due to memory being insufficient. There are a few ways to deal with this:

  1. Reduce, disable, or separately record the point cloud data as that is causing the inflation of data being stored.
  2. Split the recording via rosbag record --split --size=1024 or rosbag record --split --duration=1h -a
  3. Create ROS multimachine and directly view the data via Ethernet.

ROS Multi-machine

After setting up a static connection with the robot’s PC and being able to ping it.

Add the following to the .bashrc in the Husky’s PC. As well as in the mbs_startup ros package’s setup.bash file.

# Server PC 
export ROS_MASTER_URI=http://192.168.131.1:11311 
export ROS_HOSTNAME=192.168.131.1 
export ROS_IP=192.168.131.1 

Add the following to the .bashrc in your PC.

# Client PC 
export ROS_MASTER_URI=http://192.168.131.1:11311 
export ROS_HOSTNAME=192.168.131.124 
export ROS_IP=192.168.131.124

The IP 192.168.131.124 should be replaced with your IP which can be found out with ifconfig e.g. 192.168.131.124 in this case.

Now you can clone and launch the Husky packages from your own PC provided you have the same Ubuntu as well as ROS versions.

Note: Remember to stop the startup service to avoid open the same launch files twice.

Thank you for the reply. The split option works just fine.

As for reducing point cloud data, is it possible to limit the azimuth angle/ field of view of the lidar to specific angles such as 0 to 180 so that we can get rid of unused points before recording?

I think in third_party/ouster-ros/launch/sensor.launch there is a configuration file for resolution and rate, that could help. For driver-specific angle limiters, you would have to check the ouster ros git. Otherwise, you could use the mbs_pcl_utilities to filter out the point cloud in specific angles and republish it into the same topic name space.