-
Notifications
You must be signed in to change notification settings - Fork 1
ROS2 and rosbags
Damien LaRocque edited this page Nov 8, 2023
·
6 revisions
Now that we installed ROS 2, it can be complicated to process ROS1 bags
pip3.10 install rosbags
rosbags-convert foo.bag --dst /path/to/bar
rosbags-convert foo.bag --dst ./imudata-rosbag --include-topic /imu/data --include-topic /imu/data_raw
If you need to use melodic to process old ROS1 data, you can use Docker :
$ docker run -v /path/to/data/directory:/mnt/mydata -it ros:melodic
Your data will be inside /mnt/mydata
in the container
You can have the following error message when using common commands with malformed ROS 2 rosbags
Error: database disk image is malformed
Follow these steps to recover them :
sudo apt install sqlite3
# Check for issues
sqlite3 /path/to/bag/bag.db3 "PRAGMA integrity_check;"
# Make a backup and open the database
cp bag/bag.db3 bag/bag.db.bak
sqlite3 bag/bag.db3
Commands in SQLITE3 :
.mode insert
.output bag/dump_all.sql
.dump
.exit
Use grep
to extract the relevant transactions and load the content back into a new database:
cat bag/dump_all.sql | grep -v TRANSACTION | grep -v ROLLBACK | grep -v COMMIT > bag/dump_all_notrans.sql
sqlite3 bag/bag.db3 ".read bag/dump_all_notrans.sql"
# OR
cat dump_all_notrans.sql | sqlite3 database.db
You should now be able to reindex the bag
ros2 bag reindex bag/
- Warthog Teach and Repeat (ROS1)
- Warthog Teach and Repeat (ROS2)
- Time Synchronization
- Deployment of Robotic Total Stations (RTS)
- Deployment of the backpack GPS
- Warthog Emlid GPS
- Atlans-C INS
- How to use a CB Radio when going in the forest
- IP forwarding
- Lessons Learned
- Robots' 3D Models
- Order Management
- Fast track Master → PhD
- Intellectual Property
- Repository Guidelines
- TF Cheatsheet
- Montmorency Forest Wintertime Dataset
- RTS-GT Dataset 2023
- Deschenes2021 Dataset
- TIGS Dataset
- DRIVE Datasets
- BorealHDR
- TimberSeg 1.0
- DARPA Subterranean Challenge - Urban Dataset
- How to upload a dataset to VALERIA
- ROS1 Bridge
- Migrating a repository to ROS2 (Humble)
- ROS2 and rosbags
- MCAP rosbags
- DDS Configuration (work in progress)
- Using a USB Microphone with ROS2
- ROS2 in VSCode
- ROS2 Troubleshooting