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.
- Correspondence search: for each source point, find the closest target point, usually with a k-d tree or voxel hash.
- Outlier rejection: discard pairs whose distance exceeds a threshold or whose normals disagree.
- Transform estimation: compute the rotation and translation that minimize the chosen error metric over the remaining pairs.
- 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.
| Parameter | Typical setting | Effect when increased |
|---|---|---|
| Maximum correspondence distance | 2 to 5 times point spacing | Wider basin of convergence, more false pairs |
| Maximum iterations | 20 to 100 | Better convergence, longer runtime |
| Convergence tolerance | 1e-6 relative error change | Earlier stopping, slightly coarser result |
| Voxel downsampling size | 0.05 to 0.5 m for LiDAR | Faster runtime, loss of fine detail |
| Normal estimation radius | 3 to 10 times point spacing | Smoother normals, blurred sharp edges |
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.
| Variant | Error minimized | Strength | Weakness |
|---|---|---|---|
| Point-to-point | Euclidean distance between paired points | Simple, closed-form solution | Slow convergence on planar scenes |
| Point-to-plane | Distance along the target surface normal | Fast convergence in structured environments | Needs reliable normals |
| Generalized ICP | Distance weighted by local covariances | Accurate on mixed geometry | Higher computation per iteration |
| Colored ICP | Geometric plus photometric error | Aligns flat textured surfaces | Requires RGB-D data and stable lighting |
| Robust-kernel ICP | Huber, Cauchy or Tukey weighted residuals | Tolerates outliers and dynamic objects | Kernel scale must be tuned |
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.
| Task | Source and target | Purpose of ICP |
|---|---|---|
| LiDAR odometry | Current scan to previous scan or local map | Incremental motion estimate |
| SLAM | Scan to global map, or submap to submap | Localization and loop closure verification |
| 6D pose estimation | Object model to segmented scene cloud | Refinement of a coarse pose hypothesis |
| Hand-eye calibration checks | Measured part to known CAD geometry | Validation of sensor-to-robot transform |
| Multi-view reconstruction | Overlapping depth frames | Stitching views into one model |
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.
| Symptom | Likely cause | Remedy |
|---|---|---|
| Pose jumps to a wrong alignment | Initial error too large | Better prior or global registration first |
| Drift along a corridor | Geometric degeneracy | Fuse IMU or wheel odometry, constrain the axis |
| Slow or stalled convergence | Point-to-point metric on planar scene | Switch to point-to-plane |
| Biased result in crowds | Moving objects in the scans | Robust kernel or dynamic object filtering |
| Smeared map edges | Uncorrected scan distortion | Deskew scans with motion estimates |
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.