Localization & SLAM · Theory · M5
M5-T5 — LOAM Architecture
Solve a hard problem as two easier ones at two speeds, and let the slow one correct the fast one.
LOAM (Lidar Odometry and Mapping, Zhang and Singh, 2014) ranked first on the KITTI odometry benchmark for years and is the ancestor of most LiDAR SLAM systems in use. Its core idea is not a new estimator, but an architecture: do a cheap, approximate registration at the sensor rate and a thorough, accurate one at a lower rate against a map, then fuse. This lesson explains how the two modules work and why the split pays off.
Learning objectives
After this lesson, you should be able to:
- Describe the two modules of LOAM, their rates, inputs and outputs.
- Write the edge and planar correspondence residuals of the odometry cost.
- Explain how motion distortion is handled inside the optimisation.
- Say why the split makes the pipeline real-time and what it gives up.
The problem and the intuition
Walking in the dark with a torch, you do two things at once. Every step, you glance at the wall next to you and keep your direction without thinking: quick and a little sloppy. Every few seconds you stop and compare what you see with the plan of the building in your head: slow and careful, and it corrects the drift of the quick checks. LOAM is that: odometry is the quick glance at the previous scan; mapping is the careful comparison with the whole map.
Registration against a big map is accurate but slow; against the previous scan it is fast but drifts. Do both, and use the slow one to correct the fast one.
The algorithm: odometry, mapping and integration
Problem. Estimate the sensor’s pose at the scan rate (10 Hz) and build a map, from a continuous stream of 3D LiDAR sweeps, in real time on a modest computer, with low drift and without an IMU.
Assumptions. The sweeps have scan-line structure (a spinning sensor); the scene has enough planar and edge structure; the motion during a sweep is smooth (constant velocity); the environment is static.
Lidar odometry (10 Hz)
- Features. From the new sweep Pk+1 extract edge and planar points (M5-T3).
- Correspondences with the previous sweep. For an edge point, find the two closest edge points on different scan lines in the previous sweep: they define a line. For a planar point, find three closest planar points: a plane.
- Distances. The point-to-line distance de and the point-to-plane distance dp.
- Motion during the sweep. The pose of a point at time t within the sweep is linearly interpolated between the start (identity) and the end pose T: the unknown 6-DOF transform Tk+1 enters each point’s distance through its own interpolated fraction s of the motion.
- Minimise Σ de² + Σ dp² over the 6 parameters with Levenberg-Marquardt, with robust (bisquare) weights that down-weight large residuals; iterate, re-computing correspondences, until convergence.
- si
- the fraction of the sweep elapsed when point i was measured (0 to 1).
- de, dp
- point-to-line and point-to-plane distances (M5-T4) of the interpolated point to its matched target.
- T
- the sensor’s motion over one sweep (6 degrees of freedom).
Lidar mapping (1 Hz)
The odometry output (the undistorted sweep and its pose) is accumulated and, once per second, matched to the map: all points seen so far, stored in cubes that are loaded around the sensor. Many more features (about ten times as many) are used, the correspondences are found in a local region of the map through fitting a line or plane to the 5 nearest neighbours, and the same cost is minimised for a more accurate pose. The matched sweep is added to the map.
Transform integration
Mapping gives an accurate but delayed transform (once per second); odometry gives a transform every 0.1 s that drifts. The output pose at 10 Hz is the mapping pose composed with the odometry motion since the last mapping update. Each mapping result corrects the accumulated odometry drift.
Strengths, limitations, failure modes
| Strength | Limitation / failure mode |
|---|---|
| Real time on a CPU: tens of features per sweep in the odometry | No IMU: fast rotations and aggressive motion break the constant-velocity assumption |
| Low drift: the map correction keeps error near 1% of the path | No loop closure: drift accumulates over long loops |
| Intuitive features and clear structure | Needs scan-line ordered sensors and structured scenes; fails in open fields and corridors |
| Handles motion distortion explicitly | The map is a growing point cloud; memory and search cost grow without bounds without management |
A worked example: how the two rates cooperate
A robot drives at 2 m/s for 10 s (20 m). Odometry (scan-to-scan) accumulates a drift of 1.0% of the path length; the mapping corrects the pose once per second.
- Odometry alone: after 20 m the position is wrong by 0.20 m. Each sweep adds 2 cm of the error in the direction of travel (20 cm over 100 sweeps).
- Mapping at 1 Hz. After each second the pose is matched against the accumulated map, whose geometry was built with earlier corrections. Its error relative to the map is about the registration accuracy, say 3 cm, not growing with distance travelled within the mapped area. The correction removes the drift accumulated in that second (about 2 cm per metre × 2 m = 4 cm) before it can accumulate.
- Pose at 10 Hz. At t = 7.35 s the latest mapping pose is from t = 7.0 s. The output is Tmap(7.0 s) ⊕ [odometry motion from 7.0 to 7.35 s]. The odometry motion over 0.35 s (70 cm) has error of about 0.7 cm (1%), so the output stays within a few centimetres.
- Time budget. Odometry has about 100 ms per sweep and uses a few hundred features and small neighbourhoods: typically 10–30 ms. Mapping uses ten times as many features and a k-d tree over the map: 200–800 ms, which fits a 1 Hz budget. If mapping were run at 10 Hz it would never keep up; if odometry were skipped the initial guess for mapping would be poor, and mapping would converge slowly or to a wrong match.
- What the result looks like. On the KITTI odometry benchmark LOAM reported about 0.9% relative translation error at the time of publication: roughly 1 m per 100 m. That is the drift rate left after mapping; without loop closure it remains.
The lab asks you to implement a simplified version of both: scan-to-scan odometry on 2D features, then a refinement against a map.
Engineering implications and limitations
Engineering implications
- Respect the interface. Odometry gives the mapping stage its initial guess and its deskewed cloud; a mistake in either (wrong timestamps, wrong rate) shows up in the map, not in the odometry.
- Manage the map. Store points in cubes or voxels, keep only those near the sensor in the search structure and downsample (5–20 cm). Without this the cost grows with the length of the run.
- Skip frames in mapping, not in odometry. Mapping every second or every few frames is the intended mode; dropping scans in odometry increases the motion between them and breaks the constant-velocity deskewing.
- Add what LOAM lacks. Fuse an IMU for deskewing and for initial guess (M5-T8, M5-T9), add loop closure with a pose graph (M5-T10), and a degeneracy check.
- Diagnose by module. If the odometry path looks smooth but the map is blurred, mapping is at fault; if the path is jumpy, odometry or feature extraction is.
Limits
LOAM treats odometry and mapping as separate estimators with no uncertainty propagation and no global consistency: errors that mapping cannot see (a drift in the unmapped direction, a degenerate corridor) pass into the result silently. It is also tied to features and to the sensor geometry. These are the weaknesses later systems address: LeGO-LOAM (ground and speed), LIO-SAM and FAST-LIO (inertial fusion and consistent estimation), and direct methods.
Common misconceptions
“Mapping is just odometry running slowly.”
It matches against a different object, the accumulated map, and uses far more points; that is why it can correct drift.
“The map is optimised globally.”
The map is built incrementally from the corrected poses. LOAM does not re-optimise the past or close loops.
“LOAM needs an IMU.”
It was designed without one (and works best with smooth motion); IMU variants exist.
“Two rates are a hack.”
They are the principled way to trade accuracy against latency: coarse, fast, local and fine, slow, global.
Engineering takeaways
- LOAM splits LiDAR SLAM into odometry (scan-to-scan, 10 Hz) and mapping (scan-to-map, 1 Hz) and fuses their outputs.
- Odometry matches edge points to lines and planar points to planes, with the pose interpolated across the sweep to handle distortion.
- Mapping uses more features against the accumulated map and corrects the drift of the odometry.
- The split makes real-time operation possible; the lack of an IMU and of loop closure limits robustness and long-term accuracy.
- Diagnose a LOAM-like system by module: smooth path and blurred map point at mapping; jumpy path points at odometry or features.
References and further reading
Primary papers and authoritative documentation.
- Zhang, J. and Singh, S. (2014). LOAM: Lidar odometry and mapping in real-time. Robotics: Science and Systems.
- Zhang, J. and Singh, S. (2017). Low-drift and real-time lidar odometry and mapping. Autonomous Robots 41(2).
- Geiger, A., Lenz, P. and Urtasun, R. (2012). Are we ready for autonomous driving? The KITTI vision benchmark suite. IEEE CVPR: the odometry benchmark.
- Shan, T. and Englot, B. (2018). LeGO-LOAM. IEEE/RSJ IROS.
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
If odometry is accurate to 1%, why does LOAM bother with mapping?
Explanation
Because 1% still accumulates: 10 m of error after 1 km. Mapping registers against the accumulated map, whose geometry is anchored, so the error relative to the map does not grow with distance as long as the area is mapped. Odometry supplies speed and a good starting guess, mapping supplies the accuracy.
Question 2
A LOAM run produces a smooth trajectory, but the map has thick walls. Which module do you suspect, and why?
Explanation
Mapping (or the poses it receives): the odometry path is smooth, so it is not jumpy odometry. Thick walls mean points added to the map were placed with inconsistent poses, for instance mapping converged to local minima or the mapping rate is too low for the speed, or deskewing in odometry gave distorted clouds.
Question 3
Why is the constant-velocity assumption in LOAM’s deskewing a limit for drones and handheld sensors?
Explanation
A drone or a person produces rapid accelerations and rotations within 0.1 s, so the motion across a sweep is not linear. The interpolated poses are then wrong, the deskewed cloud is distorted, and the registration is biased. An IMU supplies the actual motion within the sweep.
What’s next
Next: A-LOAM, a compact open implementation of this pipeline, and how to read it module by module.
Related content
Nothing below is required to finish this lesson.
- BeforeM5-T4: Scan Registration
Compare point-to-point, point-to-plane and NDT/GICP-style registration and their failure modes.
- LabM5-L3: Understand the LOAM Pipeline
Implement smoothness-based edge and plane selection and a two-rate odometry step on 2D scans.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.