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

Localization & SLAM · Theory · M5

M5-T1 — LiDAR Point Clouds for SLAM

A LiDAR scan is not a snapshot: it is a sweep, and the robot moves while it is taken.

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

Lidar SLAM starts from a stream of point clouds. Before any registration or mapping, it matters how those points were produced: which numbers the sensor reports, how long a scan lasts, and what the robot did in the meantime. A scan taken while moving is a distorted picture, and the distortion enters every later stage as a systematic error.

Learning objectives

After this lesson, you should be able to:

  • Describe how a spinning or solid-state LiDAR produces a point cloud and what each point contains.
  • Convert range, azimuth and elevation to Cartesian coordinates and say what a ring is.
  • Estimate the distortion of a sweep from the robot’s speed and angular rate.
  • List the data a LiDAR SLAM front end needs besides the points: timestamps, extrinsics and sensor model.

The intuition

Imagine photographing a spinning fan with a slit camera that scans across the image over a tenth of a second. If you walk while you press the button, the picture is smeared: the left side of the image was taken a little earlier than the right. A spinning LiDAR is that slit camera. One revolution takes 0.1 s at 10 Hz. A robot driving at 2 m/s moves 20 cm during that time; turning at 100°/s it rotates 10°. The scan is a sequence of measurements taken from slightly different places, filed together as if from one.

A LiDAR scan has a duration. Every point has its own time, and therefore its own robot pose.

Motion distortion of one LiDAR sweepLeft: a wall measured by a LiDAR that rotates while the robot also rotates. The first points of the sweep and the last points of the sweep are expressed in the same frame but were taken at different poses, so a straight wall is bent. Right: after deskewing with the pose at each point time, the wall is straight again.raw sweep (robot turning) a straight wall appears bent sensor deskewed (pose at each point time) the wall is straight sensor deskew
Motion distortion bends a straight wall. Knowing the motion during the sweep lets us place each point with the pose at its own time (deskewing).

The mathematics

What a point is

A mechanical LiDAR (Velodyne, Ouster, Hesai) has a column of laser emitters at fixed elevation angles ωk (the rings: 16, 32, 64 or 128) rotating around a vertical axis. At azimuth αj each emitter reports a range r (from the time of flight), an intensity, and a timestamp. In the sensor frame the point is

Spherical to Cartesian
x=r cos⁡ ωk cos⁡ αjx=r\,\cos \,\omega _{k}\,\cos \,\alpha _{j}
y=r cos⁡ ωk sin⁡ αjy=r\,\cos \,\omega _{k}\,\sin \,\alpha _{j}
z=r sin⁡ ωkz=r\,\sin \,\omega _{k}
r
range in metres, typically 0.5–100 m for automotive and 0.1–30 m for indoor sensors, with noise of a few centimetres.
ωk
elevation (vertical) angle of ring k. A 16-ring sensor spans, for example, ±15° in 2° steps.
αj
azimuth of the beam at the time of measurement.
ti
time of the point within the sweep, from 0 to the sweep period T.

A frame (a “scan”) is one full revolution, 10 or 20 Hz, and contains 10⁴–2·10⁵ points. Solid-state and non-repetitive-scan sensors (Livox, some automotive units) cover a field of view of 70–120° with different patterns; they need different feature extraction and have fewer rings to rely on (M5-T3).

Motion distortion

If the sensor moves with constant linear velocity v and angular velocity ω during a sweep of period T, a point measured at time t = sT (s ∈ [0, 1]) was seen from the pose

Pose during the sweep
T(s)≈(s⋅v T, s⋅ω T)T(s)\approx (s\cdot v\,T,\,s\cdot \omega \,T)
translation and rotation, linearly interpolated

Treating all points as if taken from the pose at s = 0 puts the point at s in the wrong place by roughly the displacement of the sensor since then, rotated into the measurement: a point at range r suffers a lateral error of about r · ω T s for a rotation and v T s for a translation.

Sources of the pose during the sweep

Where the pose during a sweep comes from
SourceAccuracyComment
Constant velocity from the previous scan registrationGood if the motion is smoothUsed by LOAM; fails at sudden manoeuvres
IMU integration over the sweepVery good for rotation, good for short durationsThe standard in LIO-SAM and FAST-LIO (M5-T8, M5-T9)
Wheel odometryModerateCheap; slips
Continuous-time estimationBestResearch (CT-ICP, Traj-LO): motion is part of the state

Other data the front end needs

  • Per-point timestamps (or enough to reconstruct them from azimuth and the rotation rate). Without them, deskewing is guessing.
  • The extrinsic transform from the LiDAR to the robot body or IMU (M2-T2, M6-T8) and its time offset.
  • A sensor model: minimum and maximum range, noise, ring angles, blind regions (the robot’s own body).
  • Returns that are not points: no-return pixels, saturated intensity, multi-path ghosts near glass and retro-reflectors.

A worked example: how bad is the distortion?

A 10 Hz LiDAR (T = 0.1 s) on a robot looking at a wall 5 m to its left.

  1. Straight driving. The robot drives at 2 m/s, parallel to the wall. During the sweep it moves 2 × 0.1 = 0.20 m. The points measured at the end of the sweep are, in a frame fixed at the start, 0.2 m ahead of where the sensor thinks. Along a wall parallel to the motion this stretches the wall by 20 cm but does not bend it. A wall perpendicular to the motion, however, is shifted: the front-facing points taken late in the sweep are 20 cm closer than those at the start: a flat wall appears tilted by about 20 cm across the sweep.
  2. Turning. The robot rotates at 100°/s. During the sweep the heading changes by 10°. A wall point at 5 m has a tangential displacement of 5 × 0.1745 = 0.87 m between the first and last point of the sweep, if undone. A straight wall of 5 m width becomes visibly curved.
  3. Mid-sweep point. A point at s = 0.5 was measured from the pose halfway: 0.10 m ahead and 5° turned. Deskewing transforms it back into the frame at s = 0 by applying the inverse of T(0.5): a rotation of −5° and a translation of −0.10 m.
  4. Compare with noise. The sensor noise is about 2 cm and the typical registration accuracy 1–5 cm. A 20 cm to 87 cm distortion is 10–40 times larger. Ignoring it would make scan matching converge to a compromise that is biased in the direction of motion.
  5. It scales with speed. At walking speed (1.2 m/s, 30°/s) the distortion is 12 cm and 0.26 m: smaller, but still above the registration accuracy. This is why even slow handheld mapping needs deskewing.

The lab’s first stage gives you a smeared map and asks you to repair it.

Engineering implications and limitations

Engineering implications

  • Check timestamps first. Drivers differ: some give per-point times (time field), some only the frame time and the azimuth. Plot the point time against azimuth to verify.
  • Know the ring layout. Many algorithms (LOAM, LeGO-LOAM) use the ring index to find a point’s neighbours along the scan line. A reordered point cloud (voxel-filtered, merged) loses it.
  • Mind the blind spots and the robot’s own body: mask them with a range or angular filter, or the matcher will lock onto the robot.
  • Understand the sensor modes. Dual return, intensity calibration, and rotation rate change the data. A mode change that is not reflected in the configuration has caused many a failed run.
  • Log raw packets or point clouds with timestamps. Debugging a failed map later without the raw data is guesswork.

Limits

Constant-velocity deskewing fails when the robot accelerates or turns sharply during a sweep. LiDAR also sees poorly through rain, fog and dust, on glass, black surfaces and at grazing angles, and a spinning sensor is low-resolution in elevation. The best deskewing is only as good as the motion estimate used for it: it is the first place where the SLAM pipeline depends on its own output.

Common misconceptions

“A LiDAR scan is a snapshot.”

It is a sweep lasting one revolution. Points near the start and end of the sweep come from different poses.

“Distortion only matters at high speed.”

Even 1 m/s gives 10 cm; with rotation the effect scales with range, so it grows with distance.

“A 64-ring LiDAR gives a dense cloud.”

It gives a dense horizontal sampling but a sparse vertical one: 64 rings across 26° is about 0.4° apart, or 3.5 cm at 5 m but 70 cm at 100 m.

“Intensity is a calibrated reflectance.”

It depends on the sensor, range, angle and firmware; use it with care and only as a rough cue.

Engineering takeaways

  1. A point is a range, an azimuth, an elevation (ring), an intensity and a time; Cartesian coordinates follow from spherical geometry.
  2. A scan is a sweep: its duration (0.05–0.1 s) means that points come from different robot poses.
  3. The distortion is v·T for translation and r·ω·T for rotation: tens of centimetres, bigger than registration accuracy.
  4. Per-point timestamps and an estimate of the motion during the sweep are required for deskewing.
  5. Check the data (timestamps, rings, blind spots) before blaming the algorithm.

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

A LiDAR at 20 Hz on a robot turning at 90°/s sees a wall 10 m away. By how much does the wall appear to bend across one sweep if it is not deskewed?

Explanation

The sweep lasts 0.05 s, so the heading changes by 4.5° (0.0785 rad). At 10 m the tangential displacement across the sweep is 10 × 0.0785 ≈ 0.79 m. Even at 20 Hz a turning robot distorts distant points by tens of centimetres.

Question 2

Why is a point cloud that has been voxel-downsampled and merged a problem for LOAM-style feature extraction?

Explanation

Feature extraction relies on the scan-line structure: the neighbours of a point along its ring. Downsampling and merging destroys the ordering by ring and azimuth, so the smoothness (curvature) of a point can no longer be computed from its true neighbours.

Question 3

Wheel odometry says the robot moved 2 cm during a sweep but the IMU says it rotated 6°. Which do you use for deskewing and why?

Explanation

The IMU for rotation: wheel odometry cannot see a turn that happens through slip or lateral motion, and a 6° rotation at 10 m range displaces points by about 1 m. Rotation is the dominant source of distortion at range, and the gyroscope measures it directly at high rate.

What’s next

With the data understood, the next lesson covers the preprocessing that every LiDAR pipeline applies before it registers a scan.

Practice this lesson

Fix Point-Cloud Preprocessing

A map is smeared and slow: repair deskewing, ground removal and downsampling.

Next lesson

M5-T2 — Point-Cloud Preprocessing

Apply range filtering, voxel downsampling, ground removal and motion deskewing, and know what each costs.

Nothing below is required to finish this lesson.