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

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.

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

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.

LOAM: two modules at two ratesA point cloud enters feature extraction, which feeds lidar odometry at 10 hertz. Odometry outputs a pose and a registered cloud that feeds lidar mapping at 1 hertz. The mapping pose is combined with the odometry pose to give the final transform at 10 hertz.Point clouddeskewed sweep Featuresedges and planes Odometry 10 Hzscan to scan Mapping 1 Hzscan to map Transform integration: pose at 10 Hz Fast and approximate in front, slow and accurate behind; the slow part corrects the fast part.
LOAM’s two-rate structure and how the results are combined.

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)

  1. Features. From the new sweep Pk+1 extract edge and planar points (M5-T3).
  2. 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.
  3. Distances. The point-to-line distance de and the point-to-plane distance dp.
  4. 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.
  5. 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.
LOAM odometry cost
T=arg min⁡T ∑i∈edges de(i; T)2+∑j∈planes dp(j; T)2T=\operatorname*{arg\,min}_{T}\,\sum _{i\in \text{edges}}\,d_{e}(i;\,T)^{2}+\sum _{j\in \text{planes}}\,d_{p}(j;\,T)^{2}
p~i=interp⁡(T, si)⋅pi\tilde{p}_{i}=\operatorname{interp}(T,\,s_{i})\cdot p_{i}
the point moved by the interpolated pose
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

LOAM strengths and limitations
StrengthLimitation / failure mode
Real time on a CPU: tens of features per sweep in the odometryNo IMU: fast rotations and aggressive motion break the constant-velocity assumption
Low drift: the map correction keeps error near 1% of the pathNo loop closure: drift accumulates over long loops
Intuitive features and clear structureNeeds scan-line ordered sensors and structured scenes; fails in open fields and corridors
Handles motion distortion explicitlyThe 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.

  1. 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).
  2. 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.
  3. 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.
  4. 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.
  5. 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

  1. LOAM splits LiDAR SLAM into odometry (scan-to-scan, 10 Hz) and mapping (scan-to-map, 1 Hz) and fuses their outputs.
  2. Odometry matches edge points to lines and planar points to planes, with the pose interpolated across the sweep to handle distortion.
  3. Mapping uses more features against the accumulated map and corrects the drift of the odometry.
  4. The split makes real-time operation possible; the lack of an IMU and of loop closure limits robustness and long-term accuracy.
  5. 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.

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.

Practice this lesson

Understand the LOAM Pipeline

Implement smoothness-based edge and plane selection and a two-rate odometry step on 2D scans.

Next lesson

M5-T6 — A-LOAM

Read A-LOAM as an Ceres-based reimplementation of LOAM and map its modules to the algorithm.

Nothing below is required to finish this lesson.