A camera sees the shape of a path but not its size. An IMU knows metres but drifts. On this toy walk the IMU alone is 32.7 m off after 30 s, and the camera alone draws the path 1.8 times too small. Fused, the scale estimate locks onto 1.8 within 8 s, and from then on the error stays near 4 cm.
Pick a navigator and set how long the camera stares at a blank wall. Watch who stays on the path. Then we build it piece by piece, from one pixel to a sliding window.
You need the Kalman filter and strapdown navigation. We build the rest from zero.
Lesson 16 of 22 in Sensor Fusion: Classical to Modern. It follows Calibration and Time Sync and leads to LiDAR-Inertial Factor Graphs.
Illustrative planar toy: a 30 s figure eight, 6 m by 3 m. IMU at 100 Hz with accel bias (0.06, −0.04) m/s²; the toy knows the attitude. The camera returns positions at 10 Hz divided by the true scale 1.8, with 0.01 visual units (1.8 cm) of noise. The fused filter is a 7-state EKF that starts with scale 1.0. The blank wall starts at 14 s.
Chapter 0
Grow the whole world and watch every pixel stay where it was
You wear a VR headset indoors. There is no GPS and no base station, yet the virtual room stays still when you lean. The headset uses two cheap sensors: a camera and an IMU. This lesson is how they work together, a method called visual-inertial odometry (VIO): estimating your own motion from images and inertia.
Each sensor alone fails. Lesson 13 showed the IMU: its position error grows with time squared, so a 0.01 m/s² accelerometer bias is 18 m off after 60 s. The camera tracks image features, small patches it can find again in the next frame. While the same features stay in view, its error grows slowly. But it runs at about 30 frames a second, goes blind on a blank wall, and smears in a fast turn.
Its deepest gap is size. A camera divides by depth, so a world twice as big and twice as far makes the same picture.
Left, a side view: the camera (blue) and three landmarks (yellow). Right, the image the camera sees. Drag the world scale and watch the image.
Illustrative pinhole, exact geometry: focal length 500 px, no lens distortion. The landmarks sit 0.4 m, 0.1 m and −0.3 m off the axis at depths 2.0 m, 2.6 m and 3.2 m. The scale multiplies all of them.
Call the focal length of the lens f, in pixels. Call a point's sideways offset from the lens axis X and its depth along the axis Z, both in metres. The pixel column where it lands is u.
u equals f times X over Z.
Divide the offset X by the depth Z. Multiply by f. The result is the pixel u. Only the ratio of X to Z survives, so their size cancels.
A point 0.4 m right and 2.0 m ahead: u = 500 × 0.4 / 2.0 = 100 px. Double both, to 0.8 m and 4.0 m: u = 500 × 0.8 / 4.0 = 100 px again.
So a single moving camera recovers the shape of its path but not its size. That is monocular scale ambiguity. The IMU fixes it. An accelerometer reads metres per second squared, a unit with metres in it, and gravity gives it a known 9.81 m/s² to stand on.
| Property | IMU | One camera |
|---|---|---|
| Rate | 200 to 1000 Hz | 20 to 60 Hz |
| Drift | fast: error grows with t² | slow while features stay in view |
| Metric size | yes | no |
| Dark, blank wall, blur | unaffected | fails |
| Fast rotation | the gyro measures it | features leave the frame |
Chapter 1
Recover the metres per visual unit from three camera positions and one accelerometer reading
Visual odometry returns positions in visual units: the right shape, in a unit nobody chose. Call the number of metres in one visual unit λ, the scale. Every true position is λ times the visual one.
Try constant velocity first. The rig moves the same distance each second, and the camera sees the same number of visual units each second. Any λ fits, with a matching speed. The IMU does not help: at constant velocity it reads zero, which is true at every scale.
Acceleration breaks the tie. Take three camera positions one time step apart. Their second difference, the last minus twice the middle plus the first, is the acceleration times the step squared. In metres the accelerometer gives that number directly. In visual units the camera gives it too. Their ratio is λ.
Call the three visual positions s0, s1 and s2, the time between them Δt, and the accelerometer reading, after removing gravity, a.
Lambda equals a times delta-t squared, over s-two minus two s-one plus s-zero.
Multiply the measured acceleration a by delta-t squared. That is how far the motion bent, in metres. Divide by how far it bent in visual units, the second difference of s. The quotient is lambda.
With made-up numbers: speed 1.6 m/s, a = 0.4 m/s², Δt = 1 s, true λ = 1.8. The true positions are 0, 1.8 and 4.0 m, so the camera reads 0, 1.000 and 2.222. The second difference is 0.222. λ = 0.4 / 0.222 = 1.8. The speed follows too: 1.8 × 1.000 − 0.2 = 1.6 m/s.
Each dot is one 2 s window: three noisy camera positions and one accelerometer reading give one λ. The dashed line is the truth, 1.8. Slide the acceleration toward zero.
Illustrative, seeded. Camera noise 0.01 visual units (1.8 cm) on each position, a perfect accelerometer, Δt = 1 s. The second difference then has noise √6 × 0.01. So the spread of λ is √6 × 0.01 × 1.8² / a: 11% at 0.4 m/s², 88% at 0.05.
The slider shows the rule. The camera's noise is fixed, so the signal must be large: the spread of λ falls as one over a. At 0.4 m/s² one window lands within about 11%. At 0.05 m/s² it is a guess. Real systems average many windows, and the filter of Chapter 8 does it at every frame.
Chapter 2
Predict where a landmark should land, and measure the gap to where it did
A camera does not measure position or depth. It measures where points land in the image. Detect a few hundred features per frame and match them to the next frame. One feature followed over many frames is a feature track: one 3-D point, the landmark, seen from many places. VNAV 6 builds the tracker.
To use a track, predict it. Take a guess of the camera pose and a guess of the landmark. Move the landmark into the camera's frame and project it. Compare the predicted pixel with the measured one.
Call the measured pixel z. Call the camera's rotation R and its position p, together the pose. Call the landmark's position ℓ and the pinhole projection of Chapter 0 π.
r equals z minus pi of R-transpose times, ell minus p.
Subtract the camera position p from the landmark ell. Turn the result into camera axes with R-transpose. Project it with pi. Subtract that predicted pixel from the measured pixel z. What is left is r.
With made-up numbers: f = 500 px, a landmark 0.4 m right and 2.0 m ahead, so z = 100 px. Guess the camera 0.05 m too far right: the landmark is now 0.35 m right, π gives 87.5 px, and r = 100 − 87.5 = +12.5 px.
Top view. The blue ray is the measured pixel, the teal ray is the prediction from your guess. The bar on the image line is the residual. Move the guessed camera and the guessed depth, then scale the whole world.
Illustrative pinhole, exact: f = 500 px, the true landmark at 0.4 m across and 2.0 m deep. "World × 2" doubles the landmark, the guessed depth and the camera offset together.
Why pixels and not metres? The camera never measured a 3-D point. Its noise lives in the image, about a pixel of detector jitter. An error in 3-D would need a depth the camera never gave, which is the scale we are trying to find.
Press World × 2. The residual does not move. One view is happy with every point along a ray, at every scale. Only many views and the IMU pin the point down. VNAV 5 adds lens distortion and the full camera matrix.
Chapter 3
Put both sensors into one cost, then choose to filter it once or re-solve a window
There are two ways to wire the sensors. Loosely coupled VIO runs visual odometry on its own, then blends its finished pose with the IMU. Tightly coupled VIO feeds every feature residual and every IMU term into one estimator. Tight coupling lets the IMU's metres and the camera's shape pull on the same variables, and that is how the filter finds the scale.
Tight coupling is one cost. Call everything we estimate X: poses, velocities, IMU biases and landmarks. Call each visual residual from Chapter 2 rvis. Call each IMU residual rimu: the measured motion between two frames against the motion of the poses. Divide each by its own noise σ, and pixels and metres per second become comparable.
J of X equals the sum of r-vis over sigma-vis, squared, plus the sum of r-imu over sigma-imu, squared.
For a guess X, compute every r-vis and every r-imu. Divide each by its sigma and square it. Add them all. That is J. VIO searches for the X with the smallest J.
With made-up numbers: a 2 px residual with 1 px noise adds (2/1)² = 4. A velocity residual of 0.02 m/s with 0.01 m/s noise adds (0.02/0.01)² = 4. Measured in its own noise, each sensor gets an equal say.
Two machines minimise J. A filter, like the MSCKF of Chapter 4, takes each measurement once. It linearises at the estimate it has, updates, and forgets. A sliding-window optimiser, like OKVIS (Leutenegger et al. 2015) and VINS-Mono (Qin et al. 2018), keeps the last few seconds of poses. At each frame it re-solves the window with Gauss-Newton and relinearises at every step (VNAV 9).
Six camera positions (blue) see one landmark 4 m away. Warm marks where a filter ends, teal where a window ends. Move the first depth guess.
Illustrative, seeded: cameras 0.2 m apart along a line, f = 500 px, 1 px noise, the landmark at 0.5 m across and 4.0 m deep. Prior depth sigma 3 m. The filter does one EKF update per view; the window runs Gauss-Newton on all six views to convergence.
From a guess of 4 m both end near the truth. From 8 m the filter ends at 4.49 m, because it linearised the first views far from the answer and kept those slopes. The window ends at 3.97 m from any start: it reuses old views with new slopes. That costs more work, and it is why optimisers are usually more accurate (Huang 2019).
| Choice | What it does | Cost |
|---|---|---|
| Loose | VO pose blended with the IMU | cheap; the scale and cross-talk are lost |
| Tight | every residual in one cost | more states; finds the scale |
| Filter (MSCKF) | linearise once, update, forget | bounded and small |
| Window (OKVIS, VINS-Mono) | re-solve the last few seconds | more compute; usually more accurate |
Chapter 4
Project a feature track onto the null space of its landmark, and keep only what it says about the poses
The plain way to put a camera into an EKF is EKF-SLAM: add every landmark to the state. A thousand landmarks add three thousand numbers, and the covariance grows with the square of that. A headset cannot pay for it.
The Multi-State Constraint Kalman Filter (MSCKF) of Mourikis and Roumeliotis (2007) keeps no landmarks. Its state is the IMU state plus a sliding window of past camera poses, a copy taken at each frame. When a feature track ends, its views constrain the poses that saw it, because one point must explain all of them.
The landmark is in the way. Triangulate it to get a guess, then linearise the stacked residuals: r ≈ HXδX + Hℓδℓ + n. Here δX is the error of the poses, δℓ the error of the landmark, and the two H matrices say how fast r moves with each. Now find a matrix A with orthonormal columns that Hℓ cannot reach.
A-transpose times H-ell equals zero. So r-o equals A-transpose r, which is about A-transpose H-X delta-X, plus A-transpose n.
Find the directions A that the landmark cannot move. Multiply the residual r by A-transpose. The landmark term drops out, and r-o is a normal EKF measurement of the poses. A track of m views gives 2m rows; 3 go to the landmark and 2m − 3 stay.
With made-up numbers in one dimension: poses at 0, 2 and 4 m measure the landmark's offset as 10.1, 7.9 and 6.0. With the guess 10, r = (0.1, −0.1, 0.0) and H-ell = (1, 1, 1). Take A's columns as (1, −1, 0)/√2 and (1, 1, −2)/√6. Then r-o = (0.141, 0.000). With the guess 50, r = (−39.9, −40.1, −40.0), and r-o is again (0.141, 0.000).
Left, the raw residuals of the three views. Right, the two projected residuals. Drag the landmark guess and watch which bars move.
Illustrative one-dimensional track, exact algebra: the measurement is the landmark minus the camera position, so H-ell is a column of ones. In 3-D, H-ell has 3 columns and A comes from a QR decomposition.
The projected numbers say whether the poses agree about one point. They carry nothing about where the point is. So the state holds only poses, and the cost grows linearly with the number of features (Mourikis and Roumeliotis 2007). OpenVINS is a modern open-source MSCKF.
Chapter 5
Fold the oldest pose into a prior with the Schur complement instead of deleting it
A sliding-window optimiser adds a pose at each keyframe. The window must stay small, so the oldest pose has to go. Delete it with its measurements and you lose what it knew. In our toy below, the first pose held the anchor of the whole chain.
Gauss-Newton solves HδX = b at each step. H is the information matrix: how strongly the measurements pin each variable and each pair of variables. Information adds; covariance is its inverse. Split the variables into the ones to drop, α, and the ones to keep, β. Then H has four blocks: Hαα, Hαβ, Hβα and Hββ.
H-prime equals H-beta-beta minus H-beta-alpha, times H-alpha-alpha inverse, times H-alpha-beta.
Solve the dropped pose out of the equations instead of deleting its rows. The kept block H-beta-beta loses the part that only made sense with alpha present, and gains what alpha passed on through the links. The result H-prime is a prior on the kept poses.
With made-up numbers: x0 has a prior of sigma 0.05 m (information 400). Its IMU link to x1 has sigma 0.1 m (information 100). H-alpha-alpha = 500, H-alpha-beta = −100, H-beta-beta = 100. H-prime = 100 − 100 × 100 / 500 = 80, so x1 keeps sigma 0.112 m, exactly √(0.05² + 0.1²). Deleting x0 leaves x1 with no anchor at all.
Five poses on a line (teal) link to each other through the IMU and to one landmark (yellow). Purple bars are each estimate's two-sigma band. Choose how to drop pose x0.
Illustrative linear toy, seeded: true poses at 0 to 4 m and the landmark at 6 m. A prior on x0 of sigma 0.05 m, IMU links of sigma 0.1 m, and a range to the landmark from every pose with sigma 0.3 m. "Delete, fix x1" removes every term on x0 and holds x1 at its current value, as a window without a prior must.
Marginalising gives the same estimates and sigmas as keeping everything, because the problem is linear. Deleting leaves the chain floating. Holding x1 fixed to stop it floating makes the window overconfident: x2 claims a sigma of 0.096 m where the full solve gives 0.140 m. VINS-Mono marginalises with the Schur complement (Qin et al. 2018), and OKVIS marginalises old states too.
Chapter 6
Collapse a hundred IMU samples into one relative motion the optimiser can reuse
Between two keyframes 0.1 s apart, a 1000 Hz IMU gives 100 samples. In the world frame their integral depends on the start attitude, the start velocity and the bias. The optimiser moves all three at every iteration, so it redoes a plain integral each time.
Preintegration (Forster et al. 2017, after Lupton and Sukkarieh) integrates in the first keyframe's axes instead. The rotation ΔR, velocity change Δv and position change Δp then depend only on the samples and the bias, so you compute them once.
Call the keyframes i and j and the samples between them k. Call each accelerometer reading ãk, the bias ba and the sample time Δt. The gyro gives the rotation from frame i to sample k, ΔRik.
Delta-v-i-j equals the sum over k of Delta-R-i-k times, a-tilde-k minus b-a, times delta-t. Then v-j equals v-i plus g times Delta-t-i-j plus R-i times Delta-v-i-j.
Remove the bias b-a from each reading a-tilde-k. Turn it into keyframe i's axes with Delta-R-i-k, multiply by delta-t and add: that is Delta-v-i-j, done once. To use it, turn it into the world with R-i, then add gravity's share and v-i.
With made-up numbers in one dimension, with no rotation and no gravity on the axis. Three readings of 2.00 m/s², bias 0.10, Δt = 0.1 s. Δv = 3 × 1.90 × 0.1 = 0.57 m/s and Δp = 0.0855 m. If v-i is 1 m/s, v-j is 1.57 m/s.
The bias still moves. Store how Δv changes with the bias, the bias Jacobian J, and correct with one multiply. Call the bias change δb.
Delta-v of b plus delta-b is about Delta-v of b, plus J times delta-b.
Take the stored Delta-v. Add J times the bias change delta-b. The samples stay untouched.
J = −0.3 s for three samples of 0.1 s. With δb = +0.05 m/s²: 0.57 + (−0.3)(0.05) = 0.555 m/s. Re-integrating with bias 0.15 gives 3 × 1.85 × 0.1 = 0.555: exact, because Δv is linear in the accelerometer bias.
One second of a turning rig at 100 Hz. Warm dots: step-by-step world integration. Teal ring: the preintegrated end. Move the gyro-bias change and compare the purple ring (one multiply) with the dashed ring (full re-integration).
Illustrative planar toy: 100 samples over 1 s, yaw rate 0.5 + 0.3 sin(2t) rad/s, forward acceleration 0.3 m/s², start speed 1 m/s. We draw the endpoint shift 10 times larger than the path.
The endpoints agree to within 10−14 m, because preintegration only rearranges the integral. The gyro-bias fix is first order: double the change and its miss grows about four times.
Chapter 7
Move the whole answer without changing the cost, then see why gravity pins the tilt
VIO measures motion, not place. Move every pose and every landmark 2 m east. Every pixel stays the same, and so does every IMU reading. Turn everything 30° about the vertical. Again nothing changes, because the accelerometer still feels gravity straight down.
Now tilt everything by 5°. The accelerometer should now feel gravity at a slant, and it does not. The cost rises, so tilt is observable: the measurements can tell it apart. Call a move of the whole answer Tg, made of a shift t and a turn ψ about gravity.
J of T-g applied to X equals J of X, where T-g is a shift t and a turn psi about gravity.
Shift every pose and landmark by t, and turn all of them by psi about the vertical. The cost J does not change. So no measurement can choose t or psi: global position and yaw are the four unobservable directions.
In a seeded toy with 6 poses and 8 landmarks (60 unknowns, pixels, gyro and accelerometer terms), the Jacobian has exactly 4 zero singular values. Shifting 2 m or turning 30° leaves the cost at 0. A 5° tilt moves the felt gravity by 9.81 × 2 sin 2.5° = 0.86 m/s².
Top view of the estimate (teal) and its landmarks (yellow) over the truth (dashed). The pink gauge shows gravity as the accelerometer feels it. Shift, turn and tilt.
Illustrative, exact for this geometry: a shift or a turn about gravity changes no pixel and no IMU reading. The tilt read-out compares the gravity shift with an accelerometer noise of 0.05 m/s².
So VIO needs a start. The estimator refines; it does not invent. VINS-Mono starts with vision-only structure from motion over a window, then aligns it with the preintegrated IMU. That gives the gyro bias, the velocities, the gravity direction and the metric scale; it leaves the accelerometer bias for later (Qin et al. 2018). The motion must accelerate and turn, which is why a headset asks you to look around.
A plain EKF has one more trap. Linearised at its current estimate, it can see only three unobservable directions instead of four, and it gains false confidence in yaw (Huang 2019). First-estimate Jacobians and observability-constrained filters fix this.
Chapter 8
Run the whole filter, blind the camera, starve it of acceleration, and start it with a bad scale
Here is the hero's filter with every control. It is a tightly coupled EKF with seven states: position, velocity, accelerometer bias and the inverse scale. The IMU predicts at 100 Hz. At 10 Hz the camera reports a position in visual units, and the filter compares it with the predicted position times the inverse scale.
The map shows the truth (dashed), the camera alone (blue), the IMU alone (warm) and the fused path (teal). Right: the fused error, and the scale estimate with its two-sigma band against the true 1.8. Choose the motion, the blank wall and the first scale guess.
Illustrative planar toy, seeded, the same walk as the hero. Straight cruise: 1 m/s in a straight line, no acceleration. The blank wall starts at 14 s. The first scale guess sets the filter's starting lambda, with a sigma of 0.5 on its inverse.
Start with the defaults. The scale estimate starts at 1.0 and is within 5% of 1.8 after 7.5 s, as the turns supply acceleration. The 4 s blank wall costs at worst 0.17 m. An IMU alone with the same bias drifts 0.58 m in 4 s from a perfect start. The fused filter coasts better because it learned the bias first.
Now choose Straight cruise. With no acceleration the scale is unobservable (Chapter 1). The estimate stops at 1.16 and claims a sigma of 0.02, while the truth is 1.8: wrong and sure of itself. After 30 s the fused path is 10.6 m off.
Last, the start. A first guess of 1.8 locks in 2.7 s. A guess of 3.0 takes 12.3 s. A guess of 0.5 diverges: the linearisation is so wrong that each update makes it worse.
Chapter 9
Match each failure to its signature: blank walls, pure rotation, rolling shutter and the rest
VIO fails in a few ways, and each leaves its own signature. The deepest one is pure rotation. A camera that turns on the spot sees every feature move, but no feature gets a new viewpoint. Depth comes from two views a baseline apart, and a turn on the spot has a baseline of zero.
Two views a baseline b apart see a point at depth Z. The point shifts between the images by the disparity d = f b / Z. Call the pixel noise σu. Differentiate Z = f b / d and the depth doubt follows.
Sigma-Z equals Z squared times sigma-u, over f times b.
Square the depth Z. Multiply by the pixel noise sigma-u. Divide by f times the baseline b. As b goes to zero, sigma-Z grows without limit.
With Z = 4 m, σu = 1 px and f = 500 px: a 0.1 m baseline gives 16 / 50 = 0.32 m. A 0.01 m baseline gives 3.2 m. A pure rotation gives no depth at all.
Two cameras (blue) see one landmark (yellow) 4 m away. The purple band is the depth doubt, plus and minus one sigma. Slide the baseline toward a pure rotation.
Illustrative, first order: f = 500 px, 1 px noise, depth 4 m. We draw the baseline 12 times wider than to scale so short ones show; depths are to scale.
| Symptom | Cause | Fix |
|---|---|---|
| Shaky or lost on a blank wall, in the dark, in a fast blur | too few features | coast on the IMU; watch the feature count |
| Depth jumps while turning on the spot | pure rotation: no baseline | do not triangulate new points until the camera translates |
| Skew that grows with turn rate | a rolling shutter reads rows at different times | give each row its own time, or use a global shutter |
| Error that grows with speed | a camera-IMU time offset | estimate the offset online (Lesson 15) |
| Every distance off by one factor; a tilted world | a bad start | more motion before accepting the start; restart |
| Scale wanders in a steady cruise | no acceleration | manoeuvre, or add a metric sensor |
| One sudden, unrecoverable jump after a knock | IMU saturation: readings pegged at the limit | a wider-range IMU; distrust pegged samples |
| Slow, steady drift over a long walk | odometry by nature | loop closure (VNAV 12, VNAV 13) |
Two of these are quick sums, with illustrative numbers. A rolling shutter takes 30 ms to read the frame. Turning at 2 rad/s with f = 500 px, the image skews by 500 × 2 × 0.03 = 30 px top to bottom. A 5 ms time offset at the same turn rate puts every feature 5 px off.
Chapter 10
Keep the equations, the numbers, the checklist and the code in one place
The IMU predicts at its own rate. The camera supplies reprojection residuals that fix the drift, and the IMU's metres fix the scale. A filter takes each residual once and projects the landmark away. A window optimiser re-solves the last few seconds, marginalises the oldest pose and reuses preintegrated IMU factors. Position and yaw stay free; motion must excite the rest.
| Quantity | Formula | Numbers from this page |
|---|---|---|
| Projection | u = f X / Z | 0.4 m at 2 m and 0.8 m at 4 m: both 100 px |
| Scale | λ = aΔt² / (s2 − 2s1 + s0) | 0.4 / 0.222 = 1.8 |
| Residual | r = z − π(RT(ℓ − p)) | 100 − 87.5 = +12.5 px |
| Cost | J = ∑(rvis/σvis)² + ∑(rimu/σimu)² | 2 px in 1 px noise adds 4 |
| MSCKF | ATHℓ = 0, ro = ATr | (0.141, 0.000) for any landmark guess |
| Marginalise | H′ = Hββ − HβαHαα−1Hαβ | 100 − 20 = 80: sigma 0.112 m |
| Preintegrate | Δvij = ∑ΔRik(ãk − ba)Δt | 0.57 m/s; 0.555 after δb = 0.05 |
| Gauge | J(Tg ∘ X) = J(X) | 4 zero singular values of 60 |
| Depth doubt | σZ = Z²σu / (f b) | 0.32 m at b = 0.1 m; 3.2 m at 0.01 m |
pythonimport numpy as np def msckf_project(r, H_X, H_L): # left null space of the landmark Jacobian: A.T @ H_L == 0, A.T @ A == I Q, _ = np.linalg.qr(H_L, mode='complete') A = Q[:, H_L.shape[1]:] return A.T @ r, A.T @ H_X # a pose-only EKF measurement def marginalise(H, b, drop): # Schur complement: remove variables 'drop', keep their information as a prior keep = np.setdiff1d(np.arange(H.shape[0]), drop) Hai = np.linalg.inv(H[np.ix_(drop, drop)]) Hkd = H[np.ix_(keep, drop)] H2 = H[np.ix_(keep, keep)] - Hkd @ Hai @ Hkd.T b2 = b[keep] - Hkd @ Hai @ b[drop] return H2, b2 def preintegrate(acc, gyro, dt, ba, bg): # planar: returns dtheta, dv, dp in the frame of the first keyframe th, dv, dp = 0.0, np.zeros(2), np.zeros(2) for a, w in zip(acc, gyro): c, s = np.cos(th), np.sin(th) ak = np.array([[c, -s], [s, c]]) @ (a - ba) dp = dp + dv * dt + 0.5 * ak * dt * dt dv = dv + ak * dt th = th + (w - bg) * dt return th, dv, dp # reuse at every optimiser iteration
| System | Machine | Notes |
|---|---|---|
| VINS-Mono | sliding-window optimiser | HKUST; preintegration, robust start, extrinsic calibration, loop closure with a 4-DOF pose graph |
| OKVIS | keyframe optimiser | nonlinear optimisation over keyframes with marginalisation |
| OpenVINS | filter (MSCKF) | open-source MSCKF platform |
| Phone AR | proprietary | Apple describes ARKit's world tracking as visual-inertial odometry |
VIO is INS/GNSS coupling with a camera in place of satellites: the same IMU, a different partner that bounds its drift. The partner does not give absolute position, so VIO still drifts, slowly.
Now press Present or Teach and derive it from memory. Cover the projection, the scale, the residual, the null-space projection, the Schur complement, preintegration and the four free directions. Then go back to the figure eight, set the blank wall to 8 s, and say why the fused path comes back.
Lesson 16 of 22 in Sensor Fusion: Classical to Modern on Engineermaxxing. The structure follows Mourikis and Roumeliotis (2007), Forster et al. (2017), Qin et al. (2018) and Huang (2019). Every toy number on this page carries the word illustrative.