Base IMU factor
Use this page to see how MVIS turns the base IMU’s raw readings into a factor between two trajectory states, with the IMU’s own errors solved inside it.
- Base IMU: the first IMU in the config. Its clock is the reference clock and its pose is the trajectory.
- State: the IMU pose, velocity and biases at one time . States sit at
solve.state_hz(30 Hz by default) on the first camera’s frames. - Preintegration: the IMU readings between two states, combined into one relative rotation, velocity change and position change.
Symbols follow Notation & glossary. The IMU conventions
(calyx, kalibr, rpng) are on IMU model.
Corrected readings
Section titled “Corrected readings”The gyroscope gives and the accelerometer . MVIS corrects each reading before it integrates it:
- , : correction matrices. Their diagonal fixes the scale of each axis; the rest fixes misalignment (axes not quite at right angles). They multiply the raw reading, so a diagonal of 0.998 means the raw axis read 0.2 % high.
- : g-sensitivity, the part of the gyro reading caused by linear acceleration.
- , : the biases, solved at every state.
- , : the gyro and accelerometer triad rotations into the IMU frame. Each convention frees at most one of them:
| Convention | Free rotation | is | Intrinsic parameters | ||
|---|---|---|---|---|---|
calyx (default) | full 3×3 (9) | upper-triangular (6) | none; folded into | the accel triad | 9 + 6 + 9 () = 24 |
kalibr | lower-triangular (6) | lower-triangular (6) | (3) | the accel triad | 6 + 6 + 9 + 3 = 24 |
rpng | upper-triangular (6) | upper-triangular (6) | (3) | the gyro triad | 6 + 6 + 9 + 3 = 24 |
All three give the solver one 24-value intrinsics variable . It starts at identity (no correction).
An IMU slower than 200 Hz is first upsampled (cubic, the real samples kept)
before integration (solve.imu_min_rate_hz).
Preintegration
Section titled “Preintegration”Between two states at and (), the corrected readings give the motion in the frame of the first state:
MVIS evaluates these with ACI3: analytic combined IMU integration (ACI2, Yang et al., ICRA 2020) extended with the IMU intrinsics in the MVIS paper. Between two samples it takes the midpoint of the two corrected readings as constant and integrates the rotation and the rotated acceleration in closed form. The same pass gives:
- the Jacobians of , ,
with respect to the biases, the 24 intrinsics and
t_ga; - the 15×15 covariance , from the noise densities (
solve.sigma_g,sigma_a) and the bias random-walk densities (sigma_bg,sigma_ba).
The integration runs once, at the biases and intrinsics of the start point. Small changes after that are applied through the Jacobians. A detection gap is bridged by one factor over the whole gap.
The gyro-to-accel offset t_ga
Section titled “The gyro-to-accel offset t_ga”Many drivers publish gyro and accelerometer on one stamp, though the two were sampled at different instants. MVIS takes the stamp as gyro time. The accelerometer value that belongs to gyro time is the one stamped . Over one integration step from sample 0 to sample 1, to first order:
- One more Jacobian column: , carried through and, through , into the gyro.
- Re-integration: after the first two iterations, when
t_gahas moved more than 3 ms from the value the factors were integrated at, MVIS integrates that IMU again with its accelerometer resampled at (solve.tga_relin_threshold_s, default 0.003 s). The linear term then covers only what is left. - Prior: a weak zero-mean prior, 10 ms (
solve.sigma_t_ga).
estimate_t_ga is on by default in camera–IMU runs. What the offset is and when
it matters: Why calibrate t_ga.
The residual
Section titled “The residual”The factor links state (pose , velocity , biases) to state . It predicts the measured preintegration from the two states and compares.
Write for the change since integration: , , and . First-order corrections, built from the Jacobians above:
The 15 residual rows are:
The cost is with .
- Bias random walk: is the random-walk term. Biases may drift between states, by as much as the random-walk densities allow. There is no separate bias factor.
- No robust loss: the IMU residual is plain least squares. Only the reprojection factor uses Huber.
- The covariance follows the correction: is rotated by the current before it weights the residual.
Jacobians
Section titled “Jacobians”Every block is analytic and checked against finite differences in the test suite.
| Variable | Rows it touches | Comes from |
|---|---|---|
| pose | , , | the predicted relative motion, rotated into frame |
| pose | , | the same, at the end point |
| velocity , | , | , times in |
| biases | all | the bias Jacobians of the integration; identity in |
| biases | identity | |
| intrinsics | , , | the intrinsic Jacobians of the integration |
t_ga | , , | the t_ga column of the integration |
Which intrinsics are solved
Section titled “Which intrinsics are solved”estimate.imu.intrinsics frees blocks of . A pinned block gets a
very tight prior at its start value; a freed block gets a weak one, so a direction
the motion does not excite stays near its start instead of drifting.
| Setting | Free | Weak prior on the free terms |
|---|---|---|
pinned (or false) | nothing | — |
dw_da (default) | , | 0.1 (solve.sigma_dw_da) |
dw_da_r | as dw_da, plus the free rotation (kalibr, rpng; same as dw_da under calyx, which has no separate rotation) | 0.1 (solve.sigma_imu_R) |
full (or true) | as dw_da_r, plus | 0.05 (solve.sigma_tg) |
The same model inside the reprojection factor
Section titled “The same model inside the reprojection factor”The reprojection factor integrates the same corrected readings from an anchor
state to each corner’s capture time
(Camera–IMU calibration math).
So , , the biases and t_ga are fitted by both
factors, with one consistent model.
What this means for your recording
Section titled “What this means for your recording”- Rotate about all three axes. Each column of needs rotation about its axis.
- Point every axis at gravity at some time. Gravity is the largest specific force you have. Tilting the rig through many orientations separates from .
- Change the acceleration briskly.
t_gaappears only through ; smooth, steady motion leaves it loose. - Leave pinned unless the motion has strong linear acceleration while it rotates. Hand-held motion rarely does.
More: Observability and Degeneracy.