Repository navigation
First release of gopro_ros: extract time-synchronized images and IMU measurements from GoPro
videos into ROS 1 bags, ROS 2 bags (MCAP or SQLite3) or the EuRoC/ASL format, from one package
that builds for ROS 1 and ROS 2.
Highlights
- ROS 1 and ROS 2 from the same sources: ROS 1 Noetic, ROS 2 Humble and ROS 2 Jazzy
- 5-6x faster conversion with GPU video decoding (NVIDIA NVDEC or VAAPI) and parallel frame
encoding, with automatic fallback to the CPU - Docker images for every supported distro, with
docker composeand optional GPU access - No more dropped frames at chapter boundaries of multi-chapter recordings
- Ctrl+C stops a conversion immediately
Supported platforms
| ROS | Distro | Ubuntu |
|---|---|---|
| ROS 1 | Noetic | 20.04 |
| ROS 2 | Humble | 22.04 |
| ROS 2 | Jazzy | 24.04 |
Performance
| Video (1080p HEVC, 45 Mbps) | Before | New (CPU) | New (GPU, NVDEC) |
|---|---|---|---|
| 11.9 min | 201 s | 187 s | 31 s |
| 14.5 min, 2 chapters | 246 s | 226 s | 42 s |
What's new
- ROS 1 / ROS 2 build selected automatically (catkin or ament), conditional
package.xml - ROS 2 bags in MCAP (default,
zstd_fastcompression) or SQLite3 (storage_id:=.db3) gopro_to_asl(EuRoC/ASL export) available on both ROS versionshardware_decodingparameter (on by default)- ROS 2
.launch.pyand ROS 1.launchfiles with the same arguments - Live progress output under
ros2 launch - Dockerfiles for Noetic, Humble and Jazzy,
docker-compose.ymlanddocker-compose.nvidia.yml - GitHub workflows that build every image and run a validation test
- One code style and a new layout: ROS-agnostic core, ROS 1 / ROS 2 bag writers
Fixes
- The last frames of every video chapter were dropped, leaving a 0.5 s gap at each chapter
boundary of multi-chapter recordings - Ctrl+C was ignored until launch killed the node after 15 s, leaving a corrupt bag
- Build failure on ROS 2 Humble (
cv_bridgeheader) - Invalid
opencvrosdep key; FFmpeg is now found via pkg-config
Getting started
git clone https://github.com/AutonomousFieldRoboticsLab/gopro_ros2.git
cd gopro_ros2
docker compose build gopro_ros_jazzy
docker compose run --rm gopro_ros_jazzy ros2 launch gopro_ros gopro_to_rosbag.launch.py \
gopro_video:=/gopro_ws/data/GX010001.MP4 rosbag:=/gopro_ws/data/gopro_runSee the README for building
from source, all parameters and GPU decoding in Docker.