Skip to main content

Recording

The record.sh script in the session folder records rosbag files during flights. Proper configuration ensures you capture the data you need without overwhelming the storage.

Running the Recording

With the tmux session and all sensors running, start the recording script:

cd ~/example_session
./record.sh

Checking Recording Rate

After starting the recording, monitor the data rate. The target thresholds are:

RateStatus
< 10 MB/sGood
10-100 MB/sReview and optimize
> 100 MB/sProblematic - will fill storage quickly

Check the rate with:

# Watch the rosbag file size grow
ls -lh ~/example_session/bag_files/

Reducing Recording Rate

If the recording rate is too high, edit record.sh to exclude high-bandwidth topics.

Rule of Thumb

Always exclude image_raw topics. Raw camera images are by far the biggest bandwidth consumers and will fill storage in minutes. If you need to debug camera issues, record a short dedicated bag separately.

Common High-Bandwidth Topics to Exclude

Topic patternTypical rateAction
*/image_raw30-100+ MB/s per cameraAlways exclude
*/image_compressed5-15 MB/s per cameraExclude unless needed
*/depth/image_raw10-30 MB/sExclude
*/points (full point clouds)10-50 MB/sExclude or downsample

How to Edit record.sh

The record.sh script has an exclude array at the top where you add regex patterns for topics to skip. The default exclusions should always include camera images:

exclude=(

# IN GENERAL, DON'T RECORD CAMERAS
#
# If you want to record cameras, create a copy of this script
# and place it at your tmux session.
#
# Please, seek an advice of a senior researcher about
# what can be recorded. Recording too much data can lead to
# ROS communication hiccups, which can lead to eland, failsafe
# or just a CRASH.

'(.*)compressedDepth(.*)'
'(.*)image_raw'
'(.*)theora(.*)'

)

To exclude additional topics (e.g., full point clouds), add more patterns to the array:

exclude=(

'(.*)compressedDepth(.*)'
'(.*)image_raw'
'(.*)theora(.*)'

# Custom exclusions
'(.*)points$' # full point clouds
'(.*)image_compressed(.*)'

)
warning

After editing record.sh, always re-run it and check the recording rate to confirm the changes had the expected effect.

tip

Before shipping a UAV, remember to delete the bag_files/ folder to avoid including test recordings in the backup. This is part of the backup checklist.

Final Verification

With all sensors configured, static transforms set, monitoring active in MRS UAV Status, and recording running:

  1. Verify all sensor data is being displayed correctly
  2. Check the recording rate is within acceptable limits
  3. The UAV's software stack is now ready for test flights