MiniVIO is a minimal, single-step debuggable Visual-Inertial Odometry (VIO) system designed for learning and research. Built on top of VINS-Course by Yijia He, MiniVIO keeps the lightweight ROS-free architecture, and further adds robustness fixes, engineering refactoring, and Docker-based deployment.
| Pain point | How MiniVIO solves it |
|---|---|
| VINS-Mono / VINS-Fusion are heavy and tightly coupled to ROS | ROS-free, pure C++ implementation β easy to step through and study |
| VINS-Course back-end crashes on noisy data | Fixes forbad features / negative inverse depth / NaN-Inf / ill-conditioned matrices and other failures |
| Painful build environment setup | Provides aone-click Docker image, ready to run in 10 minutes |
| Inconsistent code style and high reading barrier | Refactored underGoogle C++ Style β clean naming, decoupled modules |
MiniVIO completely resolves the following fatal issues in the VINS back-end optimizer:
- β Crashes / freezes caused by bad features and negative inverse depth
- β Pose update halts caused by NaN / Inf values
- β Permanent prior pollution caused by ill-conditioned matrices
- β LM solver divergence and runaway
π¬ MiniVIO is intentionally lightweight and very approachable β a great entry point for anyone who wants to truly understand how a VIO system works internally.
- Docker
- An X11 server (for Pangolin visualization)
The build takes about 10 minutes:
git clone https://github.com/luohongk/MiniVIO
cd MiniVIO
docker build -f docker/Dockerfile -t minivio:latest .xhost +local:root && \
docker run -it \
--gpus all \
--network=host \
--privileged \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$DISPLAY \
-e HOME=/root \
-v <YOUR_MINIVIO_PATH>:/root/workspace/MiniVIO \
-v <YOUR_DATA_PATH>:/root/data \
--name MiniVIO_work \
-w /root/workspace/MiniVIO \
minivio:latestReplace
<YOUR_MINIVIO_PATH>with the path to your local MiniVIO repo, and<YOUR_DATA_PATH>with your dataset directory.
For example:
xhost +local:root && \
docker run -it \
--gpus all \
--network=host \
--privileged \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$DISPLAY \
-e HOME=/root \
-v /home/lhk/workspace/MiniVIO/:/root/workspace/MiniVIO \
-v /home/lhk/data:/root/data \
--name MiniVIO_work \
-w /root/workspace/MiniVIO \
minivio:latestcd ~/workspace/MiniVIO
mkdir -p build && cd build
# Release mode (recommended)
cmake .. -DCMAKE_BUILD_TYPE=Release
# Debug mode (for single-step debugging)
# cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j8Download the example dataset: V1_01_easy.zip
Edit config/euroc_config.yaml and update the dataset paths to your own:
# common parameters
imu_topic: "/imu0"
image_topic: "/cam0/image_raw"
output_path: "/home/lhk/output"
# dataset parameters
imu_data_file: "V101_imu0.txt" # IMU data file (relative to config path)
image_data_file: "V101_cam0.txt" # image timestamp file (relative to config path)
image_subdir: "cam0/data/" # image subdirectory (relative to data path)Launch:
cd build/bin
./run_euroc ~/data/slam_data/V2_02_medium/mav0/ ../../config/Replace
~/data/slam_data/V2_02_medium/mav0/with the path to your own EuRoC dataset.
Full demo video: image/5ζ29ζ₯.mp4
| Dependency | Version | Notes |
|---|---|---|
| Ubuntu | 20.04 (64-bit) | 18.04 / 22.04 also work; OpenCV must be built from source |
| Pangolin | 0.6 | GitHub |
| OpenCV | 4.2.0 | Installable via apt on Ubuntu 20.04 |
| Eigen | - | sudo apt install libeigen3-dev |
| Ceres Solver | 2.1.0 | Used for SfM in initialization;GitHub |
Pangolin 0.6:
git clone --depth 1 --branch v0.6 https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF
make -j4 && sudo make installOpenCV 4.2.0 (Ubuntu 20.04):
sudo apt-get install libopencv-devUbuntu 18.04 / 22.04 users should build from the official OpenCV repo.
Eigen:
sudo apt-get install libeigen3-devCeres 2.1.0:
git clone --depth 1 --branch 2.1.0 https://github.com/ceres-solver/ceres-solver.git
cd ceres-solver && mkdir build && cd build
cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_CXX_STANDARD=14
make -j4 && sudo make installgit clone https://github.com/luohongk/MiniVIO
cd MiniVIO
mkdir -p build && cd build
# Release mode
cmake .. -DCMAKE_BUILD_TYPE=Release
# Debug mode (optional)
# cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j8cd build/bin
./curve_fittingcd build/bin
./run_euroc ~/data/cuvslam_data/V2_02_medium/mav0/ ../../config/Compare against EuRoC ground truth using EVO:
evo_ape euroc euroc_mh05_groundtruth.csv pose_output.txt -a -pMiniVIO is released under the GNU General Public License v3.0.
Reliability of the codebase is still being improved. For technical questions or collaboration:
Project contact: Hongkun Luo β luohongkun0715@gmail.com
MiniVIO stands on the shoulders of these outstanding open-source projects:
- VINS-Mono β The classic visual-inertial SLAM work from Prof. Shaojie Shen's group at HKUST
- VINS-Course β Yijia He's ROS-free educational version, the direct foundation of this project
- Ceres Solver β Non-linear optimization library
- Pangolin β Visualization library
Special thanks to the authors above for making SLAM learning so much more accessible to the community.


