Skip to the lesson
FixTheRobot Explore Robotics / Localization & SLAM / M5 LiDAR SLAM / M5-T4

Localization & SLAM · Theory · M5

M5-T4 — Scan Registration

The same alignment problem with four different notions of distance, each with its own strengths and ways to fail.

  • Lesson 4 of 11
  • Module 5: LiDAR SLAM
  • Theory
  • About 8 minutes to read

M3-T5 derived point-to-point ICP. Production LiDAR systems almost always use something smarter, because matching points to points converges slowly on flat surfaces and is sensitive to the sampling pattern. This lesson compares the distance measures used in practice, derives the linearisation that makes point-to-plane registration a linear least-squares problem, and shows how to read degeneracy directly from its matrix.

Learning objectives

After this lesson, you should be able to:

  • Compare point-to-point, point-to-line, point-to-plane, GICP and NDT in terms of cost, accuracy and robustness.
  • Derive the small-angle linear system of point-to-plane registration and read its Jacobian row [n, p × n].
  • Detect degeneracy from the eigenvalues of JᵀJ and identify the unconstrained direction.
  • Choose a registration method for a given sensor and environment.

The problem and the intuition

Sliding a sheet of paper along a table does not change how well it lies on the table: the distance from every point to the table surface stays zero. A point-to-point matcher feels a difference (the nearest table point changes), so it slowly slides the paper in many small steps until points happen to coincide. A point-to-plane matcher knows the table is a plane and feels no difference along it: its cost is flat in the sliding directions, which is both a strength (it converges fast, without caring about sampling) and a warning (those directions are unconstrained and need another surface).

Using the surface normal says: I care how far I am from the surface, not where on the surface I am.

Three distance measuresThree panels showing a source point and a nearby target surface. Point-to-point measures the distance to the nearest target point. Point-to-line measures the perpendicular distance to a line through neighbouring target points. Point-to-plane measures the distance along the surface normal. On a flat surface the last two ignore sliding along the surface.point-to-point point-to-line point-to-plane Sliding the source point along the surface changes the first measure, not the other two.
The three distances. The orange point is a source point; the blue points are the target; the dashed line is the distance used.

The algorithm: choosing and linearising the distance

Problem. Given a source cloud P (the new scan, thinned) and a target Q (the previous scan or the local map), find the rigid transform (R, t) minimising a sum of squared point-to-surface distances. This extends the ICP of M3-T5.

Assumptions. The target has local surface structure (normals can be estimated); an initial transform within the convergence basin; mostly static scene.

Point-to-plane linearisation

For a source point p, its nearest target point q and the target normal n at q, the residual is r = n · (R p + t − q). For a small rotation, R ≈ I + [ω]×, so R p ≈ p + ω × p, and

Point-to-plane: a linear least-squares step
r≈n⋅(p−q)+(p×n)⋅ω+n⋅tr\approx n\cdot (p-q)+(p\times n)\cdot \omega +n\cdot t
⇒J=[n⊤, (p×n)⊤]\Rightarrow J=[n^{\top},\,(p\times n)^{\top}]
(1×6: translation, rotation)(1\times 6:\,\text{translation},\,\text{rotation})
minimise ∑(ri+Ji x)2\text{minimise}\,\sum (r_{i}+J_{i}\,x)^{2}
with x=(t, ω)\text{with}\,x=(t,\,\omega )
⇒(∑ Ji⊤ Ji) x=−∑ Ji⊤ ri\Rightarrow (\sum \,J_{i}^{\top}\,J_{i})\,x=-\sum \,J_{i}^{\top}\,r_{i}
n
unit normal of the target surface at the matched point.
p × n
cross product: the lever arm of the normal about the origin, which couples rotation to the residual.
x = (t, ω)
the six unknowns of the small motion (3 for translation, 3 for rotation).
H = Σ JᵀJ
the 6×6 information matrix of the registration: its eigenvalues tell what is constrained.

The step is applied, the correspondences are re-computed, and the loop repeats (usually 5–15 iterations). In 2D it is a 3×3 system.

Other distance measures

Registration distance measures compared
MethodWhat it doesStrengthWeakness
Point-to-pointNearest-neighbour distance (M3-T5)No normals; simple; robust when done right (KISS-ICP)Slow on flat surfaces; sampling-dependent
Point-to-line (2D, or LOAM edges)Distance to the line through two neighboursRight model for edges and for 2D wallsNeeds the line direction; unstable with few neighbours
Point-to-planeDistance along the normalFast convergence; accurate on planar scenesNeeds normals; errors where normals are noisy; degenerate in corridors
GICP (Segal et al., 2009)Plane-to-plane: each point has a covariance that is flat in its normal directionSmooth; handles noisy normals; fast variants existHeavier; needs local covariances
NDT (Biber and Straßer, 2003)Gaussian per voxel; maximise the likelihood of the pointsNo correspondences; smooth, wide basinVoxel size; discontinuity at borders

Degeneracy

If H has an eigenvalue near zero, the corresponding eigenvector is a direction (a translation or rotation) in which the scan puts no constraint. In a corridor the along-axis translation has no surface normal component, so Hxx = 0. Zhang et al. (2016) propose to solve only in the well-constrained subspace and to take the missing direction from another source (the prediction or an IMU).

A worked example: which directions does a scene constrain?

Each matched point with normal n contributes nnᵀ to the translation block of H (the 3×3 top-left part of JᵀJ). Take 100 points on each plane.

  1. A room: floor, one wall in front, one wall at the side. The normals are z, x and y. The translation block is 100 (zzᵀ + xxᵀ + yyᵀ) = 100 I: all three translations are constrained equally. (For three orthogonal planes the rotations are constrained as well: the lever arms p × n are non-zero.)
  2. A corridor: floor, left wall, right wall. The normals are z, y and −y. The translation block is 100 (zzᵀ + yyᵀ + yyᵀ) = diag(0, 200, 100). The eigenvalue along x is 0: a motion along the corridor changes no residual. The registration cannot say whether the robot moved 0 or 5 m.
  3. Add one door frame (a surface with normal x, 20 points). The x eigenvalue becomes 20: nonzero, but small relative to 200 and 100. The condition number is 10; the along-corridor position is now observable, though weakly. The uncertainty in x grows as 1/√20 relative to the others.
  4. A ground-only scene (an open parking lot): the normals are all z. The translation block is diag(0, 0, 100·N): only height, roll and pitch are observed. This is why LiDAR odometry on flat open ground drifts in x, y and yaw unless there are poles, cars or kerbs.
  5. Reading the result. The ratio of the smallest to the largest eigenvalue of H is the diagnostic: below, say, 10⁻² the direction is weak; at 0 it is lost. A system that reports a covariance from H lets the back end (M4) weight the constraint correctly.

The lab’s stage on diagnosing registration failure uses this same computation.

Engineering implications and limitations

Engineering implications

  • Use point-to-plane (or GICP) in structured scenes and point-to-point with adaptive thresholds and a good motion prior (KISS-ICP) in unstructured ones. Point-to-point is simpler and, done right, surprisingly robust.
  • Estimate normals from enough neighbours (10–20) and reject those with a poor planarity (ratio of eigenvalues). Noisy normals are the main source of point-to-plane error.
  • Reject bad correspondences: distance gates that shrink over the iterations, normal-compatibility checks, and trimmed or robust losses (M3-T5).
  • Provide a prior. Registration needs an initial guess: IMU, constant velocity, or the last motion. Compute the match inside the prior’s uncertainty.
  • Compute and publish the information matrix H, its smallest eigenvalue and the inlier ratio. Pass them to the back end.
  • Speed. A k-d tree (nanoflann, FLANN) or an incremental structure (ikd-Tree, voxel hash map) keeps each iteration at O(N log M).

Limits

All local registration methods need a start in the right basin and a static scene, and all fail silently in degenerate geometry. Global registration (FPFH with RANSAC, TEASER++, learned descriptors) removes the dependence on the initial guess but costs more and is used for relocalisation and loop closure rather than odometry. A match with a low residual is not proof of a correct pose; check the inlier ratio, the conditioning and the consistency with the prior.

Common misconceptions

“Point-to-plane is always better than point-to-point.”

It converges faster on planar scenes but needs good normals and is degenerate where normals are parallel. Point-to-point can be more robust in unstructured scenes.

“A low residual means a correct alignment.”

In a corridor the residual is small for any position along the axis. Residual says nothing about unconstrained directions.

“Registration is the SLAM algorithm.”

It is one measurement producer. The estimator that weights and combines it with other information decides the final trajectory.

“Normals can be computed from two points.”

They need a neighbourhood fit; two points give a line, not a plane.

Engineering takeaways

  1. Point-to-plane distance uses the surface normal and makes each iteration a linear least-squares problem with Jacobian row [n, p × n].
  2. Point-to-line is the right model for edges; GICP and NDT smooth the problem and widen the basin.
  3. The 6×6 matrix JᵀJ shows what is constrained: a zero eigenvalue means a degenerate direction (the corridor).
  4. Registration needs an initial guess, rejects outliers, and should report its information matrix and inlier ratio.
  5. Choose by scene: planar structure favours point-to-plane; unstructured scenes favour well-built point-to-point or direct methods.

References and further reading

Established fundamentals. Global registration and learned matching (Module 8) are active research.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

Why does the Jacobian row of point-to-plane contain p × n for the rotation part?

Explanation

A small rotation ω moves the point by ω × p, and only the component of that motion along the normal changes the point-to-plane distance: n · (ω × p) = (p × n) · ω. The translation enters as n · t. Together they give the row [nᵀ, (p × n)ᵀ].

Question 2

A robot in a corridor with a single door frame every 30 m has a registration whose smallest eigenvalue is 0 for 29 of every 30 m. What happens to the odometry along the corridor and what would you add?

Explanation

Along the corridor the registration reports whatever the prior says, so the position drifts by the prior’s error and jumps when a door comes into view. Add another source for that direction: wheel odometry or an IMU with a motion model, and weight the registration by its information matrix so the back end knows the along-axis constraint is weak.

Question 3

Why can point-to-point ICP converge slowly on a flat wall, while point-to-plane converges in a few iterations?

Explanation

Point-to-point pairs each source point with the nearest target point, so a sliding motion along the wall changes which point is nearest and the cost, and the optimiser has to find the right shift by many small steps. Point-to-plane measures only the distance to the wall plane, which is already close to the minimum for the sliding directions, and the linearisation fits the plane exactly, so a few steps suffice.

What’s next

Next: how LOAM puts feature extraction and registration into a real-time pipeline that runs at two different rates.

Practice this lesson

Diagnose Poor Scan Registration

Registration fails in a corridor and with a bad start: diagnose degeneracy and choose the right cost.

Next lesson

M5-T5 — LOAM Architecture

Explain the two-rate odometry and mapping pipeline of LOAM and why it split the problem.

Nothing below is required to finish this lesson.