Iterative closest point

On this page 7

Iterative closest point (ICP) is an algorithm that estimates the rigid transformation (rotation and translation) aligning one point cloud to another by repeatedly pairing each point with its nearest neighbor and solving for the motion that minimizes the distance between those pairs. In robotics perception, it is the workhorse behind scan matching, LiDAR odometry, object pose refinement and map building.

ICP is a local optimization method: it converges reliably only when the two clouds already start close to their correct alignment. For that reason, practical perception pipelines pair it with a coarse initial guess from wheel odometry, an IMU, feature matching or global registration.

How iterative closest point aligns two point clouds

ICP aligns a source cloud to a target cloud by alternating two steps until the alignment stops improving. Each iteration refines the transform estimate, and the error decreases monotonically under the classic formulation.

  1. Correspondence search: for each source point, find the closest target point, usually with a k-d tree or voxel hash.
  2. Outlier rejection: discard pairs whose distance exceeds a threshold or whose normals disagree.
  3. Transform estimation: compute the rotation and translation that minimize the chosen error metric over the remaining pairs.
  4. Update and test: apply the transform to the source cloud and stop when the change in error or pose falls below a tolerance.

For the point-to-point metric, the transform has a closed-form solution using singular value decomposition of the cross-covariance matrix between the two centered point sets. Other metrics are solved by linearizing the rotation and running a few Gauss-Newton or Levenberg-Marquardt steps. Typical convergence takes 10 to 50 iterations, depending on the initial error and the metric.

The table summarizes the main parameters that engineers tune in an ICP implementation.

ParameterTypical settingEffect when increased
Maximum correspondence distance2 to 5 times point spacingWider basin of convergence, more false pairs
Maximum iterations20 to 100Better convergence, longer runtime
Convergence tolerance1e-6 relative error changeEarlier stopping, slightly coarser result
Voxel downsampling size0.05 to 0.5 m for LiDARFaster runtime, loss of fine detail
Normal estimation radius3 to 10 times point spacingSmoother normals, blurred sharp edges
Key ICP parameters and their effects

Error metrics and ICP variants

The error metric defines what ICP minimizes, and the choice changes speed, accuracy and robustness more than any other design decision. Since the original 1992 formulations, dozens of variants have appeared, but a few dominate robotic use.

VariantError minimizedStrengthWeakness
Point-to-pointEuclidean distance between paired pointsSimple, closed-form solutionSlow convergence on planar scenes
Point-to-planeDistance along the target surface normalFast convergence in structured environmentsNeeds reliable normals
Generalized ICPDistance weighted by local covariancesAccurate on mixed geometryHigher computation per iteration
Colored ICPGeometric plus photometric errorAligns flat textured surfacesRequires RGB-D data and stable lighting
Robust-kernel ICPHuber, Cauchy or Tukey weighted residualsTolerates outliers and dynamic objectsKernel scale must be tuned
Common ICP variants used in robotics

Point-to-plane ICP is the usual default for LiDAR and depth camera data because walls, floors and machined parts allow points to slide along a surface without penalty. Generalized ICP treats both clouds probabilistically and often gives the best accuracy when the scene mixes planes, edges and vegetation.

ICP within the robotic perception pipeline

In robotics, ICP serves as the fine registration stage in several perception tasks rather than as a stand-alone system. Its role differs by application, as the following table shows.

TaskSource and targetPurpose of ICP
LiDAR odometryCurrent scan to previous scan or local mapIncremental motion estimate
SLAMScan to global map, or submap to submapLocalization and loop closure verification
6D pose estimationObject model to segmented scene cloudRefinement of a coarse pose hypothesis
Hand-eye calibration checksMeasured part to known CAD geometryValidation of sensor-to-robot transform
Multi-view reconstructionOverlapping depth framesStitching views into one model
Roles of ICP in robot perception

ICP is a specific method within the broader problem of point cloud registration, which also includes global, feature-based and learning-based approaches. A typical pipeline first runs a global method such as feature matching with RANSAC to obtain a rough pose, then runs ICP to reach millimeter-level alignment. In loop closure, the ICP fitness score and residual help decide whether a candidate match is genuine.

Practical tuning and implementation choices

Good ICP results depend mostly on data preparation and initialization, not on the core loop. Downsampling with a voxel grid evens out point density, removes redundant points and keeps runtimes predictable on embedded robot computers.

  • Seed the alignment with the best available motion prior, such as wheel odometry, IMU integration or a constant-velocity model.
  • Use a coarse-to-fine schedule: start with large voxels and a wide correspondence distance, then shrink both.
  • Remove the ground or dynamic objects when they dominate the scene and bias the solution.
  • Correct motion distortion in spinning LiDAR scans before matching, since a scan captured during movement is not rigid.
  • Monitor the Hessian or information matrix to detect degenerate geometry, such as long featureless corridors.

Widely used open-source libraries provide tested implementations, so most teams configure rather than write ICP. Real-time LiDAR odometry at 10 to 20 Hz is routine on modern CPUs when clouds are downsampled to a few thousand points.

Limitations and common failure modes

ICP most often fails by converging to a wrong local minimum, and it reports such a result with no explicit error. Recognizing the symptoms helps engineers choose the right remedy.

SymptomLikely causeRemedy
Pose jumps to a wrong alignmentInitial error too largeBetter prior or global registration first
Drift along a corridorGeometric degeneracyFuse IMU or wheel odometry, constrain the axis
Slow or stalled convergencePoint-to-point metric on planar sceneSwitch to point-to-plane
Biased result in crowdsMoving objects in the scansRobust kernel or dynamic object filtering
Smeared map edgesUncorrected scan distortionDeskew scans with motion estimates
ICP failure modes, causes and remedies

A frequent misconception is that a low final residual proves a correct alignment. Symmetric objects and repetitive structures can produce low residuals at incorrect poses, so robust systems cross-check ICP against other sensors or against multiple initial guesses.

In everyday language

Imagine holding two transparent sheets with the same drawing, slightly shifted and turned. Iterative closest point slides and rotates one sheet bit by bit until the lines sit on top of each other. At every step it looks for the nearest matching mark, nudges the sheet to reduce the gaps, and repeats.

Robots use this to compare what they see now with what they saw a moment ago, or with a stored map. The catch is that it needs a decent starting guess: if the sheets begin far apart, it may lock onto the wrong match.

Seen in the real world

A warehouse runs a fleet of autonomous forklifts that navigate with 16-beam spinning LiDAR sensors. Each forklift downsamples every scan to about 4,000 points with a 0.2 m voxel grid and aligns it to a local map using point-to-plane ICP, seeded by wheel odometry, at 10 Hz on an onboard computer.

Wheel odometry alone drifts by several centimeters per meter when tires slip on dusty floors. With ICP correction, the forklifts keep localization errors below about 2 cm, which is enough to insert the forks into pallet pockets reliably. In one long, featureless aisle the team noticed lateral drift, traced it to geometric degeneracy, and fixed it by fusing IMU data and adding a few reflective posts as extra geometry.