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:
| Rate | Status |
|---|---|
| < 10 MB/s | Good |
| 10-100 MB/s | Review and optimize |
| > 100 MB/s | Problematic - 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 pattern | Typical rate | Action |
|---|---|---|
*/image_raw | 30-100+ MB/s per camera | Always exclude |
*/image_compressed | 5-15 MB/s per camera | Exclude unless needed |
*/depth/image_raw | 10-30 MB/s | Exclude |
*/points (full point clouds) | 10-50 MB/s | Exclude 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(.*)'
)
After editing record.sh, always re-run it and check the recording rate to confirm the changes had the expected effect.
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:
- Verify all sensor data is being displayed correctly
- Check the recording rate is within acceptable limits
- The UAV's software stack is now ready for test flights