Part X: Sensor Fusion, World Models, and Spatial AI
Chapter 52: SLAM and Spatial AI

Evaluation and benchmarks

"A trajectory that looks perfect is one you forgot to align to ground truth."

A Skeptical AI Agent

The Big Picture

Every previous section of this chapter promised a system that estimates where it is and rebuilds the world around it. This section is where those promises are cashed out or exposed. A SLAM paper that reports a single accuracy number is hiding at least three decisions: how the estimated trajectory was aligned to ground truth, which error statistic was reported, and how many times the (usually nondeterministic) system was run. Getting evaluation wrong is not a rounding issue; it is the difference between a headset that holds a virtual object still and one that makes users nauseated, and between a warehouse robot that docks reliably and one that drifts into a shelf. This section gives you the metrics, the datasets, and the leakage-safe protocol that let you compare a classical, a neural, and a Gaussian-splatting SLAM system on equal terms, and read a leaderboard without being fooled by it.

Trajectory accuracy: ATE, RPE, and the alignment you must not skip

The first question any SLAM evaluation answers is how close is the estimated path to the truth, and there are two construct-distinct ways to ask it. Absolute Trajectory Error (ATE) measures global consistency: it takes the whole estimated trajectory, rigidly aligns it to the ground-truth trajectory, and reports the root-mean-square of the per-pose position differences. Relative Pose Error (RPE) measures local drift: it compares the estimated and true motion over fixed time or distance intervals \(\Delta\), so a system that tracks smoothly but slowly accumulates yaw error scores well on RPE and badly on ATE. You report both because they answer different questions. ATE tells the AR designer whether the lamp stays pinned to the desk; RPE (often stated as drift in percent of distance travelled, the KITTI convention) tells the robotics engineer how fast error grows per metre.

The alignment step is where most published comparisons quietly break. A stereo or lidar system produces a metric trajectory and should be aligned with a rigid \(SE(3)\) transform (rotation and translation only). A monocular system has an unobservable scale, exactly the metric-scale gap discussed for dead reckoning in Chapter 24, so it must be aligned with a similarity transform \(Sim(3)\) that also fits one global scale factor. The closed-form solution is Umeyama alignment. Given estimated positions \(\{\mathbf{p}_i\}\) and truth \(\{\mathbf{q}_i\}\), ATE is

\[ \mathrm{ATE} = \min_{s,\mathbf{R},\mathbf{t}}\ \sqrt{\tfrac{1}{N}\sum_{i=1}^{N}\big\lVert \mathbf{q}_i - (s\,\mathbf{R}\,\mathbf{p}_i + \mathbf{t})\big\rVert^2}, \]

where you solve for \(s=1\) in the metric case and for a free \(s\) in the monocular case. Aligning a monocular result with a rigid transform makes it look ten times worse than it is; aligning a stereo result with a free scale silently hides real scale drift. The single most common leaderboard error is a scale mismatch between the two.

import numpy as np

def umeyama_ate(P, Q, fix_scale=False):
    """ATE with SE(3) (fix_scale=True) or Sim(3) (monocular) alignment.
    P: estimated Nx3 positions, Q: ground-truth Nx3 positions (time-matched)."""
    muP, muQ = P.mean(0), Q.mean(0)
    Pc, Qc = P - muP, Q - muQ
    Sigma = (Qc.T @ Pc) / len(P)
    U, D, Vt = np.linalg.svd(Sigma)
    S = np.eye(3)
    if np.linalg.det(U) * np.linalg.det(Vt) < 0:   # reflection guard
        S[2, 2] = -1
    R = U @ S @ Vt
    s = 1.0 if fix_scale else np.trace(np.diag(D) @ S) / (Pc**2).sum() * len(P)
    t = muQ - s * R @ muP
    err = Q - (s * (P @ R.T) + t)                    # per-pose residuals
    return np.sqrt((err**2).sum(1).mean()), s        # ATE (RMSE), fitted scale
Listing 52.7. Umeyama trajectory alignment and ATE in a dozen lines. The fix_scale flag is the load-bearing switch: leave it False for a monocular system (report the fitted s so scale drift is visible), set it True for stereo, RGB-D, or lidar systems whose output is already metric. The reflection guard on the SVD is what stops a degenerate near-planar trajectory from being "aligned" by a mirror flip.

Listing 52.7 makes the alignment explicit so the choice cannot hide in a library call. In practice you run it after time-synchronizing the two trajectories, because estimate and ground truth arrive on different clocks (the synchronization problem of Chapter 3); a 20 ms timestamp offset during fast motion inflates ATE more than most algorithmic differences you are trying to measure.

Key Insight

A trajectory error number is meaningless without its alignment. Three quantities must always travel together: the metric (ATE or RPE), the alignment group (\(SE(3)\) or \(Sim(3)\)), and the aggregation (RMSE, median, or max). Changing any one of them can move the reported error by a factor of two or more without touching the SLAM system at all. When you cannot reproduce a paper's number, suspect the alignment before you suspect the algorithm.

Map and rendering quality: geometry versus appearance

Trajectory error says nothing about the map, and the neural and Gaussian-splatting systems of Sections 52.3 through 52.5 exist precisely to produce a good map. Map quality splits into two construct-distinct families. Geometric reconstruction is scored against a ground-truth mesh or depth: accuracy (mean distance from each reconstructed point to the nearest true surface), completeness (the reverse distance, penalizing holes), depth L1 error, and the combined F-score at a distance threshold, which is the geometric analogue of precision and recall. A system can be accurate but incomplete (sharp where it commits, full of holes elsewhere) or complete but inaccurate (dense but smeared), so you report both halves, never just one.

Appearance / novel-view quality matters for the radiance-field and splatting systems built on the representations of Chapter 51, where the map is judged by how it looks from held-out camera poses. The standard triple is PSNR (pixel fidelity, easily gamed by blur), SSIM (structural similarity), and LPIPS (a learned perceptual distance that correlates far better with human judgement). Report all three: a splatting map can win PSNR by over-smoothing while losing LPIPS, which is the metric a human actually notices. The critical protocol point is that novel views must be genuinely held out from the mapping stream, or you are measuring memorization, not reconstruction, the exact leakage failure mode formalized in Chapter 65.

Practical Example: qualifying a warehouse AMR before it ships

An autonomous mobile robot team is choosing between a classical lidar-inertial stack and a Gaussian-splatting SLAM system for a 200-metre warehouse loop. On the vendor's demo video both look flawless. The team runs a proper qualification instead. They record ten passes of the loop with a survey-grade total station providing ground truth, then compute \(SE(3)\)-aligned ATE and per-metre RPE for every pass. The classical stack posts a median ATE of 8 cm but a worst-case pass of 41 cm when a forklift crosses the aisle and violates the static-scene assumption; the splatting system posts 6 cm median but degrades to 90 cm under the same dynamic event because its photometric loss latched onto the moving forklift. Neither number was visible in the demo. The team ships the classical stack with a dynamic-object mask, and files the splatting system's failure as a robustness gap, not a headline accuracy win. The evaluation, not the demo, made the decision.

Datasets, benchmarks, and what each one actually tests

No single dataset stresses everything, so competent evaluation reports a suite. EuRoC MAV and TUM-VI are the visual-inertial standards, with Vicon or motion-capture ground truth and controlled indoor motion; they test drone- and headset-style dynamics. KITTI odometry is the outdoor driving benchmark, long metric trajectories where per-distance drift dominates. TUM RGB-D and ICL-NUIM are the classic indoor RGB-D sets, ICL-NUIM notable for a synthetic ground-truth mesh that makes reconstruction accuracy and completeness computable exactly. Replica and ScanNet drive most neural and splatting SLAM evaluation because they pair posed RGB-D with dense mesh and semantics. TartanAir adds hard photometric and dynamic conditions, and the Newer College and Hilti SLAM Challenge sets push lidar-inertial-camera fusion in construction sites where GNSS is unavailable. Choose datasets whose motion profile and sensor suite match your deployment; an ATE that is excellent on smooth EuRoC flights tells a car nothing.

Research Frontier: evaluating the systems that blur mapping and rendering

The current SOTA systems (MonoGS, SplaTAM, Photo-SLAM, and the lidar-fused Gaussian-LIC of Section 52.5) break the old evaluation split, because a single Gaussian map is simultaneously a geometry estimate and a renderer. The community has not converged on a fair joint protocol: reporting only PSNR rewards a system that renders beautifully while its geometry is metrically wrong, and reporting only ATE ignores the reconstruction those systems exist to produce. Emerging practice reports a four-tuple (ATE, depth-L1, LPIPS, and runtime FPS) co-computed on one sequence, plus explicit run-to-run variance, since these optimizers are seeded stochastically. A further open problem is uncertainty-aware evaluation: a map that knows where it is unsure (the calibration theme of Chapter 18) should be scored better than an equally-accurate but overconfident one, yet standard ATE ignores the covariance entirely.

Right Tool: do not re-implement the metric harness

Listing 52.7 is the pedagogical kernel, not the tool you ship an evaluation with. A correct harness also handles timestamp association with interpolation, \(SE(3)\)-versus-\(Sim(3)\) selection, RPE over configurable intervals, per-axis breakdowns, and publication-ready plots. The evo package (evo_ape, evo_rpe, evo_traj) does all of it from the command line on TUM, KITTI, EuRoC, and ROS bag formats, turning a roughly 500-line from-scratch harness into three CLI calls. For reconstruction, the TartanAir and Replica evaluation scripts provide the mesh accuracy, completeness, and F-score computations so you do not re-derive point-to-mesh distances yourself. Let the library own the association and alignment bookkeeping that is easy to get subtly, and unfairly, wrong.

Protocol: making a comparison you can defend

A defensible SLAM comparison rests on four rules. First, hold the input identical: same sequences, same sensor calibration, same start-up excitation, or you are comparing datasets, not systems. Second, report variance: neural and splatting SLAM are nondeterministic, so a single run is an anecdote; report median and spread over at least five seeds, because a system with a great mean and catastrophic tail is unshippable. Third, measure the cost, not just the accuracy: real-time factor (does it keep up with the sensor stream?), peak memory, and end-to-end latency belong in the same table as ATE, since a system that needs 4x real time is disqualified for a live headset regardless of its error. Fourth, test the failure modes on purpose: inject camera dropout, dynamic objects, and low texture, and report degradation, not just the clean number, because the clean number is the one condition a deployed system rarely enjoys. These four rules are the SLAM-specific instance of the general leakage-safe evaluation discipline that runs as a thread through this whole book.

Exercise

Take one EuRoC MAV sequence and run a monocular and a stereo configuration of the same SLAM system. (1) Compute ATE for both with evo_ape, deliberately once with \(SE(3)\) and once with \(Sim(3)\) alignment, and explain why the monocular number changes drastically while the stereo number barely moves. (2) Report the fitted scale s for the monocular \(Sim(3)\) case and state what a value far from 1.0 reveals about scale drift. (3) Run the stochastic system five times with different seeds and report median and interquartile range of ATE; write one sentence on why a paper reporting a single run should be distrusted.

Self-Check

1. State the construct difference between ATE and RPE and give one deployment where each is the metric that matters. 2. Why must a monocular trajectory be aligned with \(Sim(3)\) rather than \(SE(3)\), and what does the fitted scale factor tell you? 3. A splatting SLAM system reports a higher PSNR but a worse LPIPS than a competitor; which one better predicts human-perceived quality, and what protocol mistake could make the PSNR advantage meaningless?

Lab 52

run a visual-inertial or Gaussian-splatting SLAM system and evaluate trajectory/map quality.

Bibliography

Metrics and evaluation tooling

Geiger, Lenz, and Urtasun (2012). Are We Ready for Autonomous Driving? The KITTI Vision Benchmark Suite. CVPR.

Defines the per-distance drift convention (percent of trajectory length) that remains the standard for outdoor odometry evaluation.

Umeyama (1991). Least-Squares Estimation of Transformation Parameters Between Two Point Patterns. IEEE TPAMI.

The closed-form similarity alignment underlying every ATE computation; the reason monocular and metric trajectories must be aligned differently.

Grupp (2017). evo: Python Package for the Evaluation of Odometry and SLAM. Software.

The de facto command-line harness for ATE and RPE across TUM, KITTI, and EuRoC formats; the Right-Tool replacement for a hand-rolled metric.

Benchmark datasets

Burri et al. (2016). The EuRoC Micro Aerial Vehicle Datasets. International Journal of Robotics Research.

The visual-inertial benchmark with motion-capture ground truth used to qualify drone and headset trackers.

Sturm et al. (2012). A Benchmark for the Evaluation of RGB-D SLAM Systems. IROS.

The TUM RGB-D dataset and its ATE/RPE evaluation scripts that standardized indoor SLAM comparison.

Wang et al. (2020). TartanAir: A Dataset to Push the Limits of Visual SLAM. IROS.

Hard photometric, weather, and dynamic conditions plus dense ground truth; stresses the robustness cases clean benchmarks omit.

Straub et al. (2019). The Replica Dataset: A Digital Replica of Indoor Spaces. arXiv.

High-fidelity posed RGB-D with dense meshes; the reconstruction and novel-view benchmark for most neural and splatting SLAM systems.

Systems that reframe evaluation

Matsuki, Murai, Kelly, and Davison (2024). Gaussian Splatting SLAM (MonoGS). CVPR.

A monocular splatting SLAM system whose evaluation reports ATE, depth, and rendering jointly, illustrating the four-tuple protocol.

Campos et al. (2021). ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial, and Multimap SLAM. IEEE Transactions on Robotics.

The classical baseline every new SLAM system is measured against; its evaluation tables set the reporting norms for the field.

What's Next

In Chapter 53, we move from mapping the world as it is to modelling how it will change: world models that predict future sensor observations and let an agent plan in a learned latent space. Evaluation shifts with the goal, from trajectory error against a static ground truth to physical-plausibility and prediction benchmarks, and the leakage-safe discipline built here carries directly into judging whether a model has learned dynamics or merely memorized a rollout.