glass-lio courseLesson 8 › Reference card

Reference card · Lesson 8

Filter, window, or factor

What each estimator keeps, what it re-linearises, and what marginalization buys.

For the local Gaussian approximation, \(P\approx H_{\rm total}^{-1}\); take marginal covariance blocks after solving the full system. Priors are already included in \(H_{\rm total}\). See the derivation and implementation limits.

Key equations

Warm-up, from memory

$$ \Sigma_{i,k+1} = \mathbf{A}_k\,\Sigma_{ik}\,\mathbf{A}_k^{\top} + \mathbf{B}_k\,\Sigma_{\eta}\,\mathbf{B}_k^{\top}, \qquad \Sigma_{ii} = \mathbf{0} $$

Marginalization, by hand

$$ \begin{bmatrix}\mathbf{H}_{mm} & \mathbf{H}_{mk}\\ \mathbf{H}_{km} & \mathbf{H}_{kk}\end{bmatrix} \begin{bmatrix}\mathbf{x}_m\\ \mathbf{x}_k\end{bmatrix} = \begin{bmatrix}\mathbf{b}_m\\ \mathbf{b}_k\end{bmatrix} $$
$$ \begin{aligned} \mathbf{H}' &= \mathbf{H}_{kk} - \mathbf{H}_{km}\,\mathbf{H}_{mm}^{-1}\,\mathbf{H}_{mk}\\ \mathbf{b}' &= \mathbf{b}_{k} - \mathbf{H}_{km}\,\mathbf{H}_{mm}^{-1}\,\mathbf{b}_{m} \end{aligned} $$
$$ \mathbf{H} = \begin{bmatrix}4 & 2\\ 2 & 3\end{bmatrix}, \qquad \mathbf{b} = \begin{bmatrix}2\\ 1\end{bmatrix} $$

Practice

$$ \begin{aligned} \mathbf{H}' &= \mathbf{H}_{kk} - \mathbf{H}_{km}\,\mathbf{H}_{mm}^{-1}\,\mathbf{H}_{mk}\\ \mathbf{b}' &= \mathbf{b}_{k} - \mathbf{H}_{km}\,\mathbf{H}_{mm}^{-1}\,\mathbf{b}_{m} \end{aligned} $$

Say it at a whiteboard

"Every real-time estimator has to decide what to do with the past. A filter keeps only the current state and its covariance: it propagates \(\mathbf{P}\leftarrow\mathbf{F}\mathbf{P}\mathbf{F}^{\top}+\mathbf{G}\mathbf{Q}\mathbf{G}^{\top}\), updates, and has marginalized everything older, so it's cheap but can never re-linearise an old state. A sliding window keeps the last \(N\) states and re-linearises all of them each solve. To stay bounded it removes the oldest, properly by Schur complement, which leaves the prior for that linearization \(\mathbf{H}_{kk}-\mathbf{H}_{km}\mathbf{H}_{mm}^{-1}\mathbf{H}_{mk}\), or cheaply by dropping it and fixing an anchor. Treating an uncertain old state as exact can make the estimator overconfident; fixing a coordinate gauge is a separate choice. glass-lio uses a current-state solve that holds \(\mathbf{x}_i\) fixed but carries its covariance; FAST-LIO2 is an iterated EKF; VINS-Mono is a marginalizing window."