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.

VINS-Fusion supports three sensor configurations selectable through the config file. The combination of imu and num_of_cam fields determines which projection factors are active and how the state vector is parameterized.

Supported configurations

imu: 1, num_of_cam: 2 — Recommended for best accuracy. Uses all three projection factor types and IMU pre-integration.
euroc_stereo_imu_config.yaml
imu: 1
num_of_cam: 2
imu_topic: "/imu0"
image0_topic: "/cam0/image_raw"
image1_topic: "/cam1/image_raw"

Projection factors

Three Ceres cost functions handle the different geometric relationships between features and cameras:
FactorWhen used
projectionTwoFrameOneCamFactorFeature observed in two different keyframes by the same camera
projectionTwoFrameTwoCamFactorFeature observed in two different keyframes by different cameras (stereo over time)
projectionOneFrameTwoCamFactorFeature observed simultaneously by both cameras in the same frame (stereo baseline constraint)

Online calibration

Spatial calibration (estimate_extrinsic: 1): The body_T_cam0 and body_T_cam1 transforms are refined during estimation. Set to 0 if you have accurate pre-calibrated extrinsics. Temporal calibration (estimate_td: 1): Estimates the time offset td between camera and IMU clocks online. The relationship is: image timestamp + td = IMU timestamp.

Runtime sensor switching

You can switch sensor modes at runtime without restarting the node by publishing to:
  • /vins_imu_switch (std_msgs/Bool): enable/disable IMU
  • /vins_cam_switch (std_msgs/Bool): switch between stereo and mono
These call Estimator::changeSensorType(use_imu, use_stereo) internally.

Build docs developers (and LLMs) love