This is the dockerized SVIn pipeline, which makes the ROS2 packages compatible with any host system. It currently supports Linux x86_64/MacOS x86_64 & arm64/Windows x86_64.
The following features are contained:
- Convert GoPro raw videos to ROS2 bags.
- Perform SVIn SLAM and then save trajectory and pointcloud.
- Extract keyframes from saved ROS2 bag and trajectory.
Before proceeding, ensure docker and docker compose are installed.
git clone https://github.com/Alexander-guo/SVIn_Pipeline.git
cd SVIn_Pipeline
chmod +x compose-up.sh
./compose-up.sh # automatically detect the system and cpu architecture, use the correct one during build or run.To enter the docker container:
docker exec -it svin_pipeline_ros2 bashBind volume path for dataset can be modified in docker-compose.yml.
Both storage backends, MCAP(.mcap) and SQLite3(.db3), are supported and automatically identified by the suffix of <bag_file> for rosbag argument. To save GoPro video with IMU measurements to ros2 bag:
ros2 launch gopro_ros2 gopro_to_rosbag.xml \
gopro_video:=<gopro_video_file> \
rosbag:=<bag_file>If you have multiple files from a single session, put all videos in same folder you can use the following command to concatenate into a single rosbag:
ros2 launch gopro_ros2 gopro_to_rosbag.xml \
gopro_folder:=<folder_with_gopro_video_files> \
multiple_files:=true rosbag:=<bag_file>Put your config files under src/SVIn/okvis_ros/okvis/config and src/SVIn/pose_graph/config, then rebuild before use it with
colcon build --packages-select okvis_ros pose_graph --symlink-install --event_handlers console_direct+Launch SVIn:
ros2 launch okvis_ros svin_gopro2_uw.xmlThen in another terminal play the ROS2 bag, SVIn automatically subscribes from it:
ros2 bag play <bag_path> --clock --start-offset=<second>- Save pointclouds:
Saved results can be found at src/SVIn/pose_graph/reconstruction_results.
ros2 service call /save_pointcloud std_srvs/srv/Trigger- Save Trajectory:
Saved results can be found at src/SVIn/pose_graph/svin_results.
ros2 service call /save_trajectory std_srvs/srv/TriggerThe ROS2 bag and the trajectory saved from SVIn are needed. Config files can be put under src/utils_ros2/config/.
ros2 launch utils_ros2 write_keyframe_images.xml \
bag_file:=bag_file \
image_dir:=dir_to_save_images \
traj_file:=VIO_trajectory_file \
config_file:=camera config file