Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HKUST-Aerial-Robotics/Vins-Fusion/llms.txt

Use this file to discover all available pages before exploring further.

Docker provides a sandboxed environment that makes VINS-Fusion environment-independent, removing the need to manually install Ceres Solver and ROS dependencies on the host machine. The provided Dockerfile builds on ros:kinetic-perception, installs Ceres 1.12.0, and compiles VINS-Fusion using catkin build. The companion run.sh script in docker/ handles launching roscore, RViz, and the correct VINS nodes based on the flags you pass, while mounting your local VINS-Fusion source directory into the container so code changes take effect immediately without rebuilding the image.

Prerequisites

  • Docker installed and running. See the Docker CE installation guide for Ubuntu.
  • ROS installed on the host (the run.sh script starts roscore and RViz on the host, not inside the container).
  • Your user account added to the docker group (see Permission fix below).

Building the Docker Image

Navigate to the docker/ subdirectory and run make build. This builds the image tagged as ros:vins-fusion using the Dockerfile located one directory up:
cd ~/catkin_ws/src/VINS-Fusion/docker
make build
The build process installs system dependencies, clones and compiles Ceres Solver 1.12.0, then compiles VINS-Fusion with catkin build -DCMAKE_BUILD_TYPE=Release. Depending on your machine and network connection, this step can take 15–30 minutes. To remove the image when you no longer need it:
make clean

Running VINS-Fusion with run.sh

After the image is built, use run.sh to start an estimation session. The script:
  1. Starts roscore on the host.
  2. Opens RViz with the bundled config/vins_rviz_config.rviz layout.
  3. Runs a Docker container with --net=host and mounts your local VINS-Fusion directory into the container at /root/catkin_ws/src/VINS-Fusion/, so any edits you make on the host are immediately visible inside the container.
  4. Inside the container, runs catkin build (using cached configuration) and then launches the appropriate ROS node.

Flags

FlagModeNodes launched inside container
(none)EuRoC mono or stereorosrun vins vins_node <config>
-lLoop fusion enabledloop_fusion_node + vins_node
-kKITTI odometryrosrun vins kitti_odom_test <config> <dataset>
-klKITTI + loop fusionloop_fusion_node + kitti_odom_test
-kgKITTI + GPS global fusionglobal_fusion_node + kitti_gps_test
-gGlobal fusion (KITTI GPS)rosrun global_fusion global_fusion_node
-hHelpPrints usage and exits

Usage Examples

EuRoC monocular camera + IMU:
./run.sh ~/catkin_ws/src/VINS-Fusion/config/euroc/euroc_mono_imu_config.yaml
After the container starts, open a separate terminal and play your bag:
rosbag play YOUR_DATASET_FOLDER/MH_01_easy.bag
EuRoC stereo + IMU with loop fusion:
./run.sh -l ~/catkin_ws/src/VINS-Fusion/config/euroc/euroc_mono_imu_config.yaml
KITTI odometry (stereo, no GPS):
./run.sh -k ~/catkin_ws/src/VINS-Fusion/config/kitti_odom/kitti_config00-02.yaml \
            YOUR_DATASET_FOLDER/sequences/00/
KITTI odometry + loop fusion:
./run.sh -kl ~/catkin_ws/src/VINS-Fusion/config/kitti_odom/kitti_config00-02.yaml \
             YOUR_DATASET_FOLDER/sequences/00/
KITTI GPS fusion (stereo + GPS):
./run.sh -kg ~/catkin_ws/src/VINS-Fusion/config/kitti_raw/kitti_10_03_config.yaml \
             YOUR_DATASET_FOLDER/2011_10_03_drive_0027_sync/

Permission Fix

If you see a Permission denied error when running make build or ./run.sh, your user is not yet in the docker group. Fix this with:
sudo usermod -aG docker $USER
Then log out and log back in (or open a new terminal session) for the group change to take effect. Simply sourcing your shell profile is not sufficient — you need a full re-login.

Iterating on Code

Because run.sh mounts your local VINS-Fusion source tree directly into the container, you do not need to rebuild the Docker image after making code changes. The container re-runs catkin build each time run.sh is invoked, picking up any modifications. Simply re-run the appropriate ./run.sh command after editing source files.

Build docs developers (and LLMs) love