VINS-Fusion is distributed as a set of ROS packages built with catkin, the standard ROS build system. You clone the repository into theDocumentation 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.
src/ directory of a catkin workspace and run catkin_make from the workspace root. All four packages — the main estimator, loop closure, GPS fusion, and camera calibration — are built in a single pass.
Packages built
vins_estimator
The main VIO node. Runs the sliding-window nonlinear optimizer and publishes odometry. This is the only required package.
loop_fusion
Optional loop closure node. Uses DBoW2 to detect previously visited places and correct accumulated drift in the pose graph.
global_fusion
Optional GPS fusion node. Fuses VIO odometry with GPS measurements to produce a globally consistent position estimate.
camera_models
Camera calibration tool. Supports pinhole, mei (fisheye), and equidistant models. Use this to calibrate your cameras before running the estimator on your own device.
Build instructions
Create a catkin workspace
If you already have a catkin workspace you want to use, skip to the next step.
Clone VINS-Fusion into the workspace
VINS-Fusion/ directory inside src/ containing all four ROS packages.Build all packages
Run catkin resolves inter-package dependencies automatically and compiles
catkin_make from the workspace root, not from inside the package directory:vins_estimator, loop_fusion, global_fusion, and camera_models in the correct order.Source the workspace
After a successful build, source the workspace overlay so that ROS can find the newly built packages:Add this line to your
~/.bashrc to source the workspace automatically in every new terminal session:Common build failures
The most frequent causes of build failure are:- Wrong Ceres version or missing Ceres — VINS-Fusion requires Ceres Solver to be installed system-wide before running
catkin_make. See Prerequisites for installation steps. - ROS environment not sourced — make sure
/opt/ros/<distro>/setup.bashis sourced before runningcatkin_make. - Conflicting system OpenCV — a manually installed OpenCV that conflicts with the ROS-bundled version can cause linker errors. The cleanest solution is to use only the OpenCV that ships with ROS.
The VINS-Fusion Docker image (
docker/Dockerfile) is the canonical reference for a known-working build environment. It uses ros:kinetic-perception as the base image, installs Ceres 1.12.0 from source, and builds with catkin_make. If you encounter environment-specific issues, comparing against the Dockerfile often reveals the missing step.Next steps
Once the build succeeds and the workspace is sourced, you are ready to run the estimator.EuRoC example
Run VINS-Fusion on the EuRoC MAV dataset to verify the installation with known-good data
KITTI example
Evaluate stereo odometry on the KITTI benchmark or run GPS fusion on raw sequences
Configuration
Write a config file for your own cameras and IMU
Camera calibration
Use the bundled camera_models tool to calibrate your sensor setup