SLAM: Simultaneous Localization and Mapping
SLAM is the hardest single problem in mobile robotics — and false loop closures are the single most dangerous failure because they corrupt the entire map with one bad edge.
🎯 By the end you'll understand
Why SLAM is a chicken-and-egg dependency and why it resisted solution for a decade. Why EKF-SLAM works in principle but fails at scale (O(N²) in landmarks). How graph-based SLAM reformulates the problem as a sparse nonlinear least squares problem that can be solved efficiently. What loop closure detection does and why a single false positive is catastrophic. How geometric consistency verification acts as a safety filter — and why skipping it is not optional in a real deployment.
KEY INSIGHTYou cannot map without knowing where you are, and you cannot know where you are without a map
SLAM is simultaneously a localization problem and a mapping problem — and each one is only solvable given the answer to the other. The algorithmic solution is to solve them jointly, incrementally, and probabilistically.
Every mobile robot that navigates autonomously needs to do two things: know its pose in the world, and know what the world looks like. Sounds obvious. The brutal problem: you need the map to localize accurately, and you need an accurate pose to build a correct map. This circular dependency — localization requires a map, mapping requires a pose — is what makes SLAM genuinely hard, and it is why for roughly a decade after mobile robotics became serious engineering, people treated it as an unsolved problem.
Each time the robot adds a new sensor measurement to its map, both the robot's estimated pose and every previously mapped landmark need to be updated — because any error in past pose estimates has corrupted every landmark seen from those poses. A wrong pose at step 50 poisons every landmark observed from step 50 onward. The data structure, the inference algorithm, and the computational cost of the update all have to handle this global coupling.
CORE CONCEPTThe chicken-and-egg dependency spelled out
To see why the dependency is real rather than academic, walk through what a robot actually does as it explores a room.
At time t=0 the robot knows its pose exactly (by definition — it is the origin). It takes a LIDAR scan and adds the observed walls to a map. This is trivially correct because the pose was exact.
At t=1 the robot moves. Its wheel encoders give an odometry estimate of how far and in what direction it moved — but odometry accumulates error. The robot is now at an estimated pose with some uncertainty. It takes a scan and sees more walls. Where in the map do these walls go? That depends on where the robot actually is, which it does not know exactly. If the robot places them based on the noisy odometry estimate, the new walls will be slightly misaligned with the earlier ones. The error in the map equals the pose error at observation time.
At t=100 the odometry has drifted significantly. The robot's estimated pose might be 0.5 m off and 8° wrong in heading. Every landmark in the map is smeared across that uncertainty. Scan-matching (Lesson 5.8) can correct the pose locally — but only if the current scan matches something already in the map. Which brings us back to: the map needs to have been built correctly, which required correct poses.
The resolution — which made SLAM tractable starting in the late 1990s — is to stop trying to solve for the map given a pose, or the pose given a map, and instead solve for the joint distribution over both: P(x₀:ₜ, M | z₁:ₜ, u₁:ₜ). This is simultaneously a localization problem and a mapping problem, solved together as one probabilistic inference. The name is descriptive: Simultaneous Localization and Mapping.
If you already have a map (built offline, provided by the building's facilities department, loaded from a prior SLAM run), you only need localization — estimating your pose given a fixed map. In ROS 2, this is the job of the AMCL package (Adaptive Monte Carlo Localization). SLAM is what you do when no map exists and you must build one while navigating. The distinction matters: SLAM is harder, slower, and riskier than AMCL. Use AMCL when you can. SLAM when you must.
HOW IT WORKSEKF-SLAM: why it works and why it fails
The earliest tractable SLAM formulation used the Extended Kalman Filter — the same EKF you built for state estimation in Stage 4. The trick: put both the robot pose and all landmark positions into a single state vector, and let the EKF maintain their joint covariance.
If the robot has a 3D pose (x, y, θ) and observes N point landmarks, the state vector is:
# State vector: robot pose + all landmark positions x = [x_r, y_r, θ_r, # robot pose (3) x_1, y_1, # landmark 1 (2) x_2, y_2, # landmark 2 (2) ... # ... N landmarks x_N, y_N] # = 3 + 2N dimensions # Covariance matrix: (3+2N) × (3+2N) # Off-diagonal blocks encode robot-landmark correlations P = [[P_rr, P_rl1, P_rl2, ...], # robot × robot, robot × landmark_i [P_l1r, P_l1l1, ...], ... [P_lNr, ..., P_lNlN]]
The covariance matrix is what makes EKF-SLAM correct and what kills it. When the robot observes a landmark, the EKF update must touch the entire covariance matrix — because the observation refines the robot's pose, which in turn refines the uncertainty of every previously-mapped landmark that was observed from that pose. This is the right thing to do probabilistically. It is catastrophically expensive computationally.
| N landmarks | State size | Covariance size | Update cost | Typical environment |
|---|---|---|---|---|
| 10 | 23 | 529 elements | ~0.1 ms | Lab room |
| 100 | 203 | 41,209 | ~8 ms | Small office |
| 1,000 | 2,003 | 4,012,009 | ~800 ms | Building floor |
| 10,000 | 20,003 | 400 M | >100 s | City block — unusable |
The covariance matrix update scales as O(N²) in memory and O(N²) in time per observation. For a LIDAR robot in a real environment, N easily reaches thousands of landmarks. EKF-SLAM becomes computationally infeasible before it becomes useful at building scale. For a 10 × 10 meter lab with sparse features it works. For a building, it cannot run in real time on any hardware available before the mid-2010s, and barely on modern hardware without approximations.
Beyond scaling, EKF-SLAM requires data association — deciding which observed feature corresponds to which previously-mapped landmark. Get it wrong and the EKF will enthusiastically update the wrong landmark with the new observation, corrupting both. In low-feature environments (long corridors, open spaces) data association is hard and wrong associations cause catastrophic filter inconsistency. Graph-based SLAM handles this differently — wrong associations become wrong edges, which optimization can partially recover from — but EKF-SLAM cannot recover from a bad association without restarting the entire filter.
CORE CONCEPTGraph-based SLAM: the sparse reformulation that actually scales
Graph-based SLAM re-formulates the problem from "maintain a running estimate and update it" to "collect all the measurements, build a constraint graph, then solve it once." This batch-style insight, along with the realization that the constraint graph is sparse, unlocked SLAM at building and city scale.
The pose graph structure
The core data structure is a pose graph: a factor graph where nodes are robot poses and edges are relative-pose constraints. There are two types of edges:
Odometry edges (sequential)
Between every consecutive pose xₜ and xₜ₊₁, an odometry edge encodes the relative motion measured by wheel encoders or scan-matching (ICP from Lesson 5.8). Each edge carries a measured relative pose Δx̂ᵢⱼ = (Δx, Δy, Δθ) and a noise covariance Ωᵢⱼ. These edges form a chain. They are dense in time — one per pose step — but each connects only adjacent nodes, so the graph is sparse. This is what makes graph SLAM efficient: the sparsity pattern of the Jacobian allows sparse linear algebra (Cholesky factorization, etc.) that scales linearly in the number of nodes, not quadratically.
Loop closure edges (non-sequential)
When the robot revisits a previously-mapped area, it can recognize the scene and add a long-range relative-pose constraint between a current pose xₜ and an old pose xₛ (s << t). This edge says "the robot's current position is z meters and φ radians from where it was at time s." Loop closures are the mechanism by which accumulated drift is corrected: the optimizer can distribute the pose error across the entire trajectory to satisfy both the sequential odometry edges and the loop closure edge simultaneously. Without loop closures, drift accumulates and the map is open-loop: everything downstream of the first drift error is shifted.
Optimization: nonlinear least squares
Once the graph is built, SLAM becomes a nonlinear least squares problem. For every edge (i, j) with measured relative pose z̃ᵢⱼ and information matrix Ωᵢⱼ, we want the node poses x* that minimize the total squared error:
# For each edge (i,j): error = predicted_pose_diff - measured_pose_diff eᵢⱼ(x) = h(xᵢ, xⱼ) - z̃ᵢⱼ # h = relative-pose measurement model # Total cost to minimize (Mahalanobis distance for each edge): F(x) = Σᵢⱼ eᵢⱼ(x)ᵀ Ωᵢⱼ eᵢⱼ(x) # Gauss-Newton iteration (linearize around current estimate x̂): # 1. Compute Jacobians Jᵢⱼ = ∂eᵢⱼ/∂x at x̂ # 2. Build sparse linear system: H Δx = b # H = Σ Jᵢⱼᵀ Ωᵢⱼ Jᵢⱼ (information matrix — sparse!) # b = Σ Jᵢⱼᵀ Ωᵢⱼ eᵢⱼ # 3. Solve sparse linear system (Cholesky) → Δx # 4. Update x̂ ← x̂ + Δx # 5. Repeat until convergence (typically 5-10 iterations)
The key computational property: H is sparse. Odometry edges connect only adjacent nodes — each contributing a small block to H. Loop closure edges are non-sequential but still sparse (one edge connecting two specific nodes). The Cholesky factorization of a sparse matrix scales with the number of non-zeros, not the full matrix dimension. For a robot with 10,000 poses and a few hundred loop closures, H is a 30,000 × 30,000 matrix but with fewer than 1 million non-zero entries. Sparse Cholesky on that takes milliseconds. This is what makes graph SLAM deployable at scale where EKF-SLAM could not be.
You do not implement Gauss-Newton from scratch. The standard backend solvers are g2o (general graph optimization), GTSAM (Georgia Tech Smoothing and Mapping, factor graph formulation), and Ceres Solver (Google, more general). All three are C++ with Python bindings. SLAM Toolbox — the standard ROS 2 SLAM package — uses g2o as its backend. Cartographer uses its own Ceres-based backend. Understanding the objective function and the Gauss-Newton iteration is what lets you reason about convergence, how loop closure edge weights affect the result, and why a badly-weighted false loop closure pulls the entire map out of alignment.
HOW IT WORKSLoop closure detection — and why it is the most dangerous step
Loop closure detection is the process of recognizing that the current sensor reading was taken at (or near) a previously-visited location, and computing the relative pose between the two. It is the most powerful and the most dangerous step in SLAM, because a wrong loop closure inserts a false constraint into the graph that the optimizer will faithfully try to satisfy — even if satisfying it requires distorting the entire trajectory.
Detection: scan-to-submap matching
In LIDAR SLAM, loop closure detection typically works like this. As the robot builds the map, it maintains a set of submaps — local occupancy grids built from a window of recent scans. When the current scan is compared to each existing submap using ICP (scan matching, Lesson 5.8), a match score is produced. If the score exceeds a threshold, a candidate loop closure is flagged.
The match score alone is not enough to accept the closure. The geometric structure of the environment matters: in a symmetric building with identical corridors (the so-called "perceptual aliasing" problem), two very different places can produce very similar scans. A match score threshold catches the obvious cases. A false positive through perceptual aliasing looks exactly like a true positive in the score — and inserts a wrong constraint.
Geometric consistency verification
The standard defense against false loop closures is geometric consistency verification. The idea: collect a set of candidate loop closure pairs over several timesteps. If they are all geometrically consistent with each other — their relative pose constraints form a mutually consistent cluster — then they are likely true. A false positive from perceptual aliasing will usually be isolated: it will not be geometrically consistent with the neighboring candidates.
Formally, for two candidate loop closures (i₁, j₁) and (i₂, j₂), their relative constraint is consistent if the constraint from (i₁, j₁) combined with the odometry chain from j₁ to j₂ and back through (i₂, j₂) produces a small closure error. This is the same idea as checking whether a set of edges forms a consistent cycle in the graph. Isolated false positives almost always fail this test; true positives in a revisited environment usually pass in groups.
SLAM Toolbox and Cartographer both have geometric consistency checks, and they are enabled by default. Disabling them — or reducing their threshold aggressively to "get more loop closures" — is one of the most common and destructive mistakes in field deployment. A robot that accepts a false loop closure without verification will produce a map where a building hallway appears to connect to itself impossibly, and navigation will fail globally thereafter. The failure is often not discovered until the robot reaches the corrupted region for the first time.
What a false loop closure actually does to the map
This is worth making precise, because it explains why the failure is so severe. Suppose the robot has built 500 pose nodes in a long corridor, with 0.5 m of accumulated drift. The optimizer is maintaining a trajectory that is slightly wrong but internally consistent. Now a false loop closure adds an edge that incorrectly claims pose x₄₅₀ is 2.0 m south of pose x₅₀. The optimizer now has to satisfy both the 500 odometry edges and this one false long-range edge. The least-squares solution will satisfy all constraints in a weighted sense. The false edge, with its associated information matrix Ω, will pull poses x₅₀ through x₄₅₀ toward satisfying the false constraint. The entire 400-pose segment bends. Walls that were straight appear curved. Rooms that were rectangular appear rhomboid. The occupancy grid — which is built from the poses — inherits the distortion. All of this from one wrong edge.
SEE ITPose-graph loop-closure demo
This widget lets you observe three regimes in sequence: pure odometry drift, correct loop closure with optimization, and a false loop closure without geometric verification. Each regime forces a consequential decision. Pay attention to what happens to the entire graph — not just the node where the loop closure attaches.
Key observations:
- Drift only (mode 1): Without any loop closure, odometry error accumulates. The estimated trajectory spirals open. The robot thinks it has returned to the start but the map shows a gap. This is the baseline failure SLAM exists to solve.
- Correct loop closure (mode 2): A correct loop closure edge pulls the trajectory smoothly closed. The optimizer distributes the accumulated error across all nodes — no single segment is pulled violently. The map closes cleanly. This is SLAM working as designed.
- False loop closure (mode 3): A false loop closure edge pulls the graph in the wrong direction. Higher weight = more distortion. The optimizer satisfies the constraint, but the map is destroyed. Note that the optimizer does not signal an error — it converges normally to a wrong answer.
- Geometric verification (mode 4): The false loop closure candidate is checked against neighboring constraints. The verification step correctly identifies it as geometrically inconsistent with its neighbors and rejects it before it enters the graph. The map returns to the drift-only state — worse than a correct SLAM map, but not catastrophically wrong.
FOLLOWBOTIntegrating SLAM Toolbox for FollowBot's occupancy map
FollowBot's Stage 5 milestone includes: SLAM Toolbox building an occupancy map of the test environment, with the occupancy grid inflated and ready for navigation. Here is what that concretely means in ROS 2 Humble.
SLAM Toolbox is the standard ROS 2 SLAM package. It runs in synchronous mode (for mapping, where real-time is not critical) or asynchronous mode (for live deployment). For the milestone, synchronous mapping during a deliberate exploration run is appropriate.
slam_toolbox:
ros__parameters:
# Mode: synchronous for offline/mapping; async for live navigation
solver_plugin: solver_plugins::CeresSolver
odom_frame: odom
map_frame: map
base_frame: base_link
scan_topic: /scan
mode: mapping
# Scan matching parameters (feeds the pose graph)
minimum_travel_distance: 0.2 # add pose node every 0.2 m moved
minimum_travel_heading: 0.174 # or 10° heading change
scan_buffer_size: 10
scan_buffer_maximum_scan_distance: 10.0
# Loop closure: geometric consistency verification
loop_search_maximum_distance: 3.0 # m — search radius for LC candidates
do_loop_closing: true
loop_match_minimum_response_coarse: 0.35 # coarse scan match threshold
loop_match_minimum_response_fine: 0.45 # fine match (geometric consistency)
loop_match_maximum_variance_coarse: 3.0
loop_match_maximum_variance_fine: 0.5
# Occupancy map resolution (meters/cell)
resolution: 0.05 # 5 cm cells — good for indoor nav
max_laser_range: 12.0 # match your LIDAR spec
The launch file pattern for SLAM Toolbox on FollowBot:
from launch import LaunchDescription from launch_ros.actions import Node def generate_launch_description(): return LaunchDescription([ Node( package='slam_toolbox', executable='sync_slam_toolbox_node', name='slam_toolbox', output='screen', parameters=['/path/to/slam_toolbox_sync.yaml'], remappings=[ ('/scan', '/followbot/lidar/scan'), # match your topic ] ), ])
After the exploration run, serialize the map to a pgm/yaml pair for use with Nav2:
# Call the SLAM Toolbox serialize service to save the map ros2 service call /slam_toolbox/serialize_map \ slam_toolbox/srv/SerializePosegraph \ "{filename: '/tmp/followbot_map'}" # Also save as nav_msgs/OccupancyGrid for Nav2 costmap ros2 run nav2_map_server map_saver_cli -f /tmp/followbot_map
The occupancy grid inflation step — referenced in the milestone — happens in Nav2's costmap configuration, not in SLAM Toolbox. After the map is loaded, the costmap inflation layer expands each occupied cell by the robot's footprint radius plus a safety margin. For FollowBot (approximately 0.25 m radius), a 0.30–0.35 m inflation radius is appropriate for open corridors; reduce to 0.15 m for doorway-dense environments to avoid the planning infeasibility failure described in Lesson 1.1.
Before calling the SLAM milestone complete: (1) Open the serialized map in RViz. Check that walls are straight, corners are sharp right angles, and rooms close cleanly — visual signs of no uncorrected drift. (2) Drive the robot manually through every doorway and confirm the door gaps appear at >0.5 m width in the costmap. (3) Trigger a re-localization with AMCL on the saved map and confirm the particle cloud converges within 30 seconds. (4) Check the SLAM Toolbox's /slam_toolbox/scan_match_score topic during the run — consistent values above 0.7 indicate good loop closure quality.
WEAKNESSWhere SLAM fails in practice
SLAM's loop closure detector sees what the sensor sees — and if two places look the same to the sensor, the detector cannot tell them apart. Long straight corridors, warehouses with identical shelving bays, and office buildings with repeating room layouts are all notorious for producing false loop closures in production deployments. Scan matching scores will be high (the environment genuinely looks the same) but the relative pose constraint will be wrong. Geometric consistency verification catches many of these, but not all. The practical defense: add unique visual landmarks (QR codes, AprilTags) in perceptually ambiguous environments, or use a vision-based place recognition system alongside LIDAR matching. Never deploy SLAM in a symmetric environment without first characterizing the false positive rate empirically.
Between the start of mapping and the robot's first loop closure, the map has no drift correction. If the robot navigates in this window using the map — even if only for person-following avoidance — it is navigating on an open-loop map that degrades with every meter traveled. In practice: do not use the SLAM map for planning until at least one loop closure has been successfully detected and incorporated. SLAM Toolbox exposes a topic /slam_toolbox/pose_count and a service for checking closure counts. Build a simple watchdog that gates Nav2 costmap loading on "at least one successful loop closure confirmed."
A SLAM map that looks visually reasonable in RViz can still have localization errors that are too large for reliable navigation. The visual appearance of walls and rooms in the occupancy grid does not directly tell you the metric accuracy. The correct check is to measure the reprojection error: place the robot at known physical reference points (doorways, room corners with a tape measure) and compare the robot's AMCL-estimated position to the physical measurement. For FollowBot's indoor navigation, a 0.1 m positional accuracy and 3° heading accuracy at all reference points is the target. If you cannot hit this, the SLAM map is not ready for navigation regardless of how it looks.
KEY INSIGHTHow this connects
- 5.8 · Scan Matching and ICP: LIDAR-Based Pose Estimation — ICP is the odometry-edge builder in graph SLAM: each sequential pose-to-pose relative transform fed into the graph comes from scan matching. The quality of those edges (the covariance of each ICP result) directly controls how much weight the optimizer gives to odometry vs. loop closures.
- 4.9 · Multi-Sensor Fusion on FollowBot: Architecture and Covariance Design — EKF-SLAM is the state-estimation formulation of SLAM, and the covariance design principles from this lesson apply directly to understanding why O(N²) scaling is unavoidable in the full covariance representation.
- 4.5 · The Extended Kalman Filter: Nonlinear Systems and Jacobian Linearization — the Gauss-Newton optimization used in graph SLAM is conceptually the EKF's linearization applied globally (batch) rather than sequentially (recursive). The Jacobian structure is the same; the difference is that graph SLAM solves all timesteps simultaneously.
- 5.10 · Production SLAM Systems: Cartographer, SLAM Toolbox, and Choosing Wisely → — takes the algorithmic foundations from this lesson and applies them to choosing and configuring real production systems, including Cartographer's multi-resolution scan matching and SLAM Toolbox's lifelong mapping mode.
SLAM is where all of Stage 4 (state estimation) and all of Stage 5 (perception) merge into one problem. The techniques you have built — calibration, scan matching, sensor fusion, filter design — are the inputs to the SLAM system. Understanding the graph formulation and the danger of false loop closures is what lets you debug SLAM failures and configure the system correctly rather than tuning parameters by intuition.
GLOSSARYKey terms introduced
- SLAM (Simultaneous Localization and Mapping)
- The problem of jointly estimating a robot's trajectory and a map of its environment from sensor data, without a prior map. Formulated as estimating the joint distribution P(x₀:ₜ, M | z₁:ₜ, u₁:ₜ).
- Pose graph
- The data structure at the core of graph-based SLAM: a factor graph where nodes represent robot poses and edges represent relative-pose constraints from odometry (sequential) or loop closures (non-sequential).
- Loop closure
- The detection that the robot has returned to a previously-visited location, enabling a non-sequential constraint to be added to the pose graph. Correct loop closures correct accumulated drift; false loop closures corrupt the entire map.
- Geometric consistency verification
- A filter applied to loop closure candidates that rejects isolated candidates whose relative-pose constraint is inconsistent with neighboring constraints. The primary defense against false loop closures from perceptual aliasing.
- Perceptual aliasing
- The condition in which two physically different locations produce very similar sensor readings, causing the loop closure detector to generate false positive matches. Symmetric environments (corridors, warehouses) are the main source.
- Nonlinear least squares (graph SLAM)
- The optimization problem solved in graph SLAM: find the pose configuration that minimizes the sum of squared Mahalanobis errors across all graph edges. Solved iteratively via Gauss-Newton; the information matrix is sparse, enabling efficient factorization.
- EKF-SLAM
- The original SLAM formulation using an Extended Kalman Filter with a joint state vector of robot pose + all landmark positions. Correct in theory; intractable in practice for more than a few hundred landmarks due to O(N²) covariance update cost.
- Submap
- A local occupancy grid built from a window of recent scans, used in SLAM systems (e.g., Cartographer, SLAM Toolbox) as the unit against which loop closure candidates are matched, rather than matching against the full global map.
ACTIVE RECALLCheck your understanding
Answer in your own words first, then reveal.
1Explain the chicken-and-egg dependency in SLAM and how the probabilistic formulation resolves it.›
Localization requires a map (to match sensor data against a known environment) and mapping requires accurate poses (so landmarks are placed correctly). Each is only solvable given the answer to the other, so neither can be solved independently first. The probabilistic resolution is to stop solving them sequentially and instead estimate the joint distribution P(x₀:ₜ, M | z₁:ₜ, u₁:ₜ) — the probability of all robot poses and the entire map simultaneously given all measurements and control inputs. This joint distribution captures the correlations between pose errors and landmark errors. In graph SLAM, this becomes a nonlinear least squares problem where all pose nodes are solved simultaneously, distributing error across the full trajectory to best satisfy all constraints jointly.
2Why does EKF-SLAM fail to scale to building-sized environments, and what structural property of graph SLAM makes it tractable where EKF-SLAM cannot be?›
EKF-SLAM maintains a joint covariance matrix over the robot pose and all N landmarks. This matrix is (3+2N) × (3+2N) — a dense matrix. Every landmark observation requires updating the entire matrix, because observing a landmark refines the robot pose, which in turn refines the uncertainty of every other landmark observed from that pose. The update cost is O(N²) in both time and memory. At N=1,000 landmarks, a single update takes ~800 ms — far slower than a 10 Hz LIDAR. At N=10,000, the matrix alone requires ~3 GB of RAM.
Graph SLAM's key structural property is sparsity. The information matrix H (the inverse of the covariance, accumulated across all graph edges) is sparse because each odometry edge only connects adjacent poses — contributing a small local block to H. Even loop closure edges are sparse (one pair of nodes per edge). Sparse Cholesky factorization of H scales with the number of non-zeros, not the matrix dimension, making graph SLAM tractable at tens of thousands of poses on standard hardware.
3What makes a false loop closure more dangerous than a missed (false negative) loop closure?›
A missed loop closure (false negative) means accumulated drift is not corrected. The map remains open-loop — progressively more wrong as the robot travels, but locally consistent. The damage is proportional to the drift since the last accepted closure, and the errors are spread smoothly across the trajectory. A failed closure looks like a slightly bent or stretched map.
A false loop closure (false positive) inserts a constraint that is structurally wrong. The optimizer cannot distinguish it from a true constraint — it will try to satisfy it by distorting the entire trajectory segment between the two connected nodes. Walls become non-straight, rooms become non-rectangular, and the map fails globally at the distorted region — not just locally. Navigation built on such a map will fail everywhere in the affected area. Worse, the optimizer converges normally (it found the least-squares solution), so there is no convergence failure flag. The only detection is visual inspection of the map or failed navigation in the field. A missed closure hurts; a false closure corrupts.
4What is geometric consistency verification and why does it catch false positives that scan-match score thresholds alone miss?›
Geometric consistency verification checks that a set of loop closure candidates are mutually consistent. For two candidate closures (i₁, j₁) and (i₂, j₂), consistency means the constraint from (i₁, j₁) plus the odometry path from j₁ to j₂ minus the constraint from (i₂, j₂) forms a small closed cycle error. True loop closures in a revisited environment tend to form geometrically consistent groups — multiple timesteps near the same area all agree on the relative pose. False positives from perceptual aliasing tend to be isolated — the mismatched scan looks like it matches, but neighboring timesteps do not produce the same false match, so the isolated false positive fails the consistency check.
Scan-match score thresholds miss these because perceptual aliasing can produce genuinely high match scores — the two environments look the same, so the scan fitting is geometrically tight and the score is above threshold. The score only measures "how well these two scans fit"; it cannot measure "is this the correct place." Only the spatial relationship between multiple candidates over time can distinguish a true revisit from an aliased false positive, which is exactly what geometric consistency tests.