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 provides a global_fusion package that combines VIO odometry with GPS measurements to produce a globally consistent trajectory. GPS corrects the slow positional drift of VIO, while VIO provides smooth, high-rate motion estimates between GPS fixes.

Architecture

The GlobalOptimization class maintains two pose maps and optimizes the alignment transform WGPS_T_WVIO between the VIO world frame and the GPS (ENU) world frame:
void inputGPS(double t, double latitude, double longitude, double altitude, double posAccuracy);
void inputOdom(double t, Eigen::Vector3d OdomP, Eigen::Quaterniond OdomQ);
void getGlobalOdom(Eigen::Vector3d &odomP, Eigen::Quaterniond &odomQ);
GPS coordinates are converted from geodetic (lat/lon/alt) to local Cartesian using GeographicLib::LocalCartesian.

Running GPS fusion

GPS fusion requires three nodes running simultaneously:
# Terminal 1 — RViz
roslaunch vins vins_rviz.launch

# Terminal 2 — VIO estimator
rosrun vins kitti_gps_test \
  ~/catkin_ws/src/VINS-Fusion/config/kitti_raw/kitti_10_03_config.yaml \
  YOUR_DATASET_FOLDER/2011_10_03_drive_0027_sync/

# Terminal 3 — Global fusion node
rosrun global_fusion global_fusion_node
In RViz, the green path is VIO odometry and the blue path is the GPS-fused global trajectory.

Key design points

  • The global_fusion_node subscribes to /vins_estimator/odometry for VIO poses and to a GPS topic for position measurements
  • GPS position accuracy (posAccuracy) is used to weight GPS residuals — less accurate GPS fixes have lower influence on the optimization
  • The optimization runs in a background thread and does not block the real-time VIO estimator
GPS fusion is demonstrated on KITTI raw sequences. To use it with your own hardware, your GPS driver must publish in a compatible message format and you may need to adapt globalOptNode.cpp.
For indoor or GPS-denied environments, use visual loop closure instead for drift correction.

Build docs developers (and LLMs) love