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 uses IMU pre-integration to propagate the state between camera frames and to provide a high-rate motion prior for the visual back-end. The quality of this pre-integration depends directly on how accurately the noise characteristics of the IMU are modelled. Underestimating noise causes the optimizer to trust the IMU too much, making the system brittle to sensor imperfections; overestimating noise causes it to discount IMU measurements, losing the benefit of inertial sensing during fast motion. Getting these four numbers right — and setting the gravity magnitude correctly for your location — is one of the most impactful tuning tasks when deploying VINS-Fusion on a new platform.

Noise model

VINS-Fusion models each inertial axis as a continuous-time process with two independent noise sources: a white-noise measurement term and a random-walk bias term. The four parameters below characterise these sources for the accelerometer and gyroscope respectively. All four must be provided whenever imu: 1.
acc_n
number
default:"0.1"
Accelerometer measurement noise standard deviation in m/s² / √Hz (also written as m s⁻² Hz⁻½). This is the white-noise density of the accelerometer, read directly from the IMU datasheet’s “noise spectral density” or “velocity random walk” specification. Lower values tell the optimizer that individual accelerometer samples are more trustworthy.EuRoC value: 0.1
gyr_n
number
default:"0.01"
Gyroscope measurement noise standard deviation in rad/s / √Hz (also written as rad s⁻¹ Hz⁻½). This is the white-noise density of the gyroscope, read from the datasheet’s “angular random walk” or “noise spectral density” specification.EuRoC value: 0.01
acc_w
number
default:"0.001"
Accelerometer bias random walk noise standard deviation in m/s³ / √Hz (also written as m s⁻³ Hz⁻½). This characterises how quickly the accelerometer bias drifts over time. It corresponds to the “in-run bias stability” or “bias instability” figure on an IMU datasheet, though the exact definition varies between manufacturers.EuRoC value: 0.001
gyr_w
number
default:"0.0001"
Gyroscope bias random walk noise standard deviation in rad/s² / √Hz (also written as rad s⁻² Hz⁻½). This characterises how quickly the gyroscope bias drifts over time. Corresponds to the “rate random walk” or “bias instability” figure on an IMU datasheet.EuRoC value: 0.0001

Unit clarification

Datasheets express these quantities in different units depending on the manufacturer. The conversions most commonly needed are:
Datasheet unitMultiply byVINS-Fusion unit
μg / √Hz9.81 × 10⁻⁶m/s² / √Hz (acc_n)
mg / √Hz9.81 × 10⁻³m/s² / √Hz (acc_n)
°/s / √Hzπ / 180rad/s / √Hz (gyr_n)
°/hπ / (180 × 3600)rad/s (gyr_w, approx.)

Gravity magnitude

g_norm
number
default:"9.81007"
Local gravitational acceleration in m/s². Used during the visual-inertial alignment step to initialise the direction and magnitude of the gravity vector. The value varies by geographic location and altitude: it is approximately 9.780 at the equator at sea level and 9.832 at the poles. The EuRoC datasets were recorded in Zurich, Switzerland, where the measured value is 9.81007.Use the WGS84 gravity model or a local measurement for your deployment site. Errors of more than 0.05 m/s² in g_norm can cause observable scale error in the trajectory.

EuRoC example values in context

The EuRoC MAV dataset uses an ADIS16448 MEMS IMU. The following block is taken directly from euroc_stereo_imu_config.yaml:
#imu parameters       The more accurate parameters you provide, the better performance
acc_n: 0.1          # accelerometer measurement noise standard deviation.
gyr_n: 0.01         # gyroscope measurement noise standard deviation.
acc_w: 0.001        # accelerometer bias random work noise standard deviation.
gyr_w: 0.0001       # gyroscope bias random work noise standard deviation.
g_norm: 9.81007     # gravity magnitude
These values are appropriate for the ADIS16448 running at its default output rate. They are a reasonable starting point for other MEMS IMUs of similar grade, but should not be used as-is without verification against your own IMU’s datasheet or Allan variance curve.

Finding your IMU’s noise parameters

From the datasheet

Most IMU datasheets list noise spectral density and bias instability directly. Look for:
  • Noise density or velocity/angular random walkacc_n / gyr_n
  • In-run bias stability or bias instabilityacc_w / gyr_w (order of magnitude estimate only)

From Allan variance analysis

Allan variance analysis is the most reliable way to characterise a real sensor because it accounts for unit-specific manufacturing variation, temperature effects, and USB/serial jitter. The analysis requires recording a static IMU log of at least one hour.
The imu_utils ROS package by Gao Wenliang automates Allan variance computation from a ROS bag and outputs the four noise parameters in the exact units and format expected by VINS-Fusion. Record the IMU on a stable surface with no vibration for at least 2 hours, then run imu_utils to extract all four values directly.

Online temporal calibration

Camera and IMU clocks are rarely perfectly synchronised. Even a few milliseconds of offset causes the pre-integrated IMU rotation to be applied at a slightly wrong time relative to the image, introducing a correlated error that grows with angular velocity. VINS-Fusion can estimate and correct this offset online. The time offset td is defined so that:
image_timestamp + td = IMU_timestamp
A positive td means image timestamps are earlier than the IMU timestamps by td seconds.
estimate_td
number
default:"0"
Enable (1) or disable (0) online estimation of the camera-to-IMU time offset. When enabled, td is treated as an initial guess and refined in the sliding-window optimizer. The estimated offset is printed to stdout during operation.When imu: 0, this parameter is forced to 0 regardless of the value specified here.
td
number
default:"0.0"
Initial (or fixed) camera-to-IMU time offset in seconds. When estimate_td: 0, this fixed value is applied for the entire run. When estimate_td: 1, this is the starting point for online estimation. If you have a hardware-synchronised setup (e.g., trigger-based camera and IMU sharing the same clock), set td: 0.0 and estimate_td: 0.EuRoC value: 0.0 — the EuRoC rig uses hardware synchronisation.
#unsynchronization parameters
estimate_td: 0     # online estimate time offset between camera and imu
td: 0.0            # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)

Consequences of incorrect IMU parameters

ProblemLikely cause
Initialization fails repeatedlyacc_n or gyr_n too small; optimizer rejects IMU measurements as inconsistent
Large drift during fast rotationgyr_n too large; gyroscope integration is given too little weight
Bias diverges quickly after initializationacc_w or gyr_w too small; bias is not allowed to change fast enough to track real drift
Trajectory scale errorWrong g_norm for the recording location
Visible “jitter” correlated with rotation rateTime offset not calibrated; enable estimate_td: 1 or measure td offline
Do not copy IMU parameters from another VINS-Fusion configuration unless you are using the exact same IMU model at the same output rate. Noise density scales with the square root of the output data rate, so parameters valid at 200 Hz are not valid at 400 Hz.

Build docs developers (and LLMs) love