OKVIS2

Leutenegger 2022 · Paper

One-line summary — OKVIS2 upgrades the classic OKVIS sliding-window VIO into a real-time, scalable visual-inertial SLAM system by marginalizing common observations into pose-graph edges that can be fluidly turned back into landmarks and observations upon loop closure.

Problem

Sliding-window VIO systems bound computation by marginalizing or fixing old states, but classic marginalization is a one-way street: tight integration of loop closure and large-scale map management “constitutes an inherent challenge to schemes that employ marginalisation of old states and landmarks.” ORB-SLAM3 instead simply fixes old states — simpler but “inherently not a conservative approximation, as it effectively ignores past estimation uncertainties.” OKVIS2 targets robust, accurate estimation for robotics and AR/VR with particular attention to long and repeated loop closures, using one bounded factor graph that behaves like odometry and full SLAM at once.

Method & architecture

The system splits into a frontend (state initialization, BRISK keypoint matching, stereo triangulation, segmentation CNN, place recognition/relocalization) and a realtime estimator running synchronously per multi-frame, plus an asynchronous full-graph loop optimization. The estimator minimizes (Ceres, Cauchy-robustified observations):

c(x)=12ikKjJ(i,k)ρ(eri,j,kTWreri,j,k)+12kPKfeskTWskesk+12rPcC(r)epr,cTWpr,cepr,c,c(\mathbf{x}) = \frac{1}{2}\sum_{i}\sum_{k\in\mathcal{K}}\sum_{j\in\mathcal{J}(i,k)} \rho\left({\mathbf{e}_{\mathrm{r}}^{i,j,k}}^T \mathbf{W}_{\mathrm{r}}\, \mathbf{e}_{\mathrm{r}}^{i,j,k}\right) + \frac{1}{2}\sum_{k\in\mathcal{P}\cup\mathcal{K}\setminus f} {\mathbf{e}_{\mathrm{s}}^{k}}^T \mathbf{W}_{\mathrm{s}}^{k}\, \mathbf{e}_{\mathrm{s}}^{k} + \frac{1}{2}\sum_{r\in\mathcal{P}}\sum_{c\in\mathcal{C}(r)} {\mathbf{e}_{\mathrm{p}}^{r,c}}^T \mathbf{W}_{\mathrm{p}}^{r,c}\, \mathbf{e}_{\mathrm{p}}^{r,c},

over reprojection errors eri,j,k=z~i,j,kh(TSCi1TSkWWlj)\mathbf{e}_{\mathrm{r}}^{i,j,k} = \tilde{\mathbf{z}}^{i,j,k} - \mathbf{h}\big(\mathbf{T}_{SC_i}^{-1}\, \mathbf{T}_{S^k W}\, {}_{W}\mathbf{l}^{j}\big), preintegrated IMU errors esk=x^n(xk,z~sk,n)xnR15\mathbf{e}_{\mathrm{s}}^{k} = \hat{\mathbf{x}}^{n}(\mathbf{x}^{k}, \tilde{\mathbf{z}}_{\mathrm{s}}^{k,n}) \boxminus \mathbf{x}^{n} \in \mathbb{R}^{15}, and relative pose (pose-graph) errors. K\mathcal{K} holds the TT most recent frames plus MM keyframes with live observations; P\mathcal{P} holds pose-graph frames reaching much further into the past.

Results

Evaluated on EuRoC and TUM-VI (ATE after position + yaw alignment, causal vs. non-causal reported separately):

Why it matters for SLAM

OKVIS (2015) defined the sliding-window optimization + marginalization architecture for VIO, but could not undo marginalization when a loop was found. OKVIS2’s marginalization-derived pose-graph edges are a principled middle ground between Schur-complement priors and full landmark retention — the estimator moves fluidly between odometry and full SLAM without a map reset. It is the direct foundation of OKVIS2-X, which extends the same factor graph with depth, LiDAR, and GNSS.