Skip to the lesson
FixTheRobot Explore Robotics / Localization & SLAM / M1 SLAM Foundations / M1-T6

Localization & SLAM · Theory · M1

M1-T6 — Sensors Used in SLAM

Every sensor tells the robot one useful thing, hides several others, and fails in its own way.

  • Lesson 6 of 6
  • Module 1: SLAM Foundations
  • Theory
  • About 7 minutes to read

A SLAM system is built around its sensors. The choice of LiDAR or camera determines the map representation, the algorithm and the way it fails. This lesson compares the sensors you will meet in the track, so that later modules can say “because LiDAR gives dense range but no appearance” and you know what that means.

Learning objectives

After this lesson, you should be able to:

  • State what each of the main SLAM sensors measures directly and what must be inferred.
  • Describe a noise model for a range sensor and an inertial sensor.
  • Match sensor failure modes to environments (glass, darkness, long corridors, tunnels).
  • Explain why combining sensors with different failure modes is more robust than improving one.

The intuition

Ask five people to find their way across a dark room. One feels the walls (touch: a range sensor). One uses a torch (a camera that needs light). One counts steps (an encoder). One feels turning in their inner ear (an inertial sensor). One has a phone that says “you are somewhere in this building” (GPS indoors, useless). Each person succeeds or fails for a different reason, and the best answer is a mix.

The sensors in one view

SLAM sensors compared
SensorMeasures directlyStrengthTypical failure
2D / 3D LiDAR (Light Detection And Ranging)Distance to surfaces along beamsAccurate geometry, works in the darkGlass and mirrors, rain and fog, long featureless corridors
Camera (monocular, stereo, RGB-D)Light intensity (colour); depth for stereo and RGB-DRich appearance, cheap, good for recognitionDarkness, glare, blur, textureless walls, no scale (monocular)
IMU (Inertial Measurement Unit)Angular velocity and accelerationHigh rate, works anywhere, short-term motionBias drift; double-integrated position error grows quickly
Wheel encodersWheel rotationSimple, smooth, cheapSlip, calibration error
GPS / GNSSPosition from satellitesAbsolute position outdoorsIndoors, urban canyons, multipath; metres of error without correction
RadarRange and radial speed by radio wavesWorks in fog, dust and rainLow resolution, clutter, multipath
Proprioceptive and exteroceptive sensorsTwo groups of sensors. Proprioceptive sensors (wheel encoders, IMU) measure the robot itself and their error grows with time. Exteroceptive sensors (LiDAR, camera, radar, GPS) measure the world and their error depends on the scene. Both feed the state estimate.Encoders, IMUmeasure the robot: drift LiDAR, camera, radar, GPSmeasure the world: scene-dependent State estimatepose and map smooth, driftsanchored, can drop out Fusion uses eachwhere it is strong.
Proprioceptive sensors measure the robot and drift. Exteroceptive sensors measure the world and fail with the scene. A state estimator uses each where it is strong.

The sensors split into two groups. Proprioceptive sensors (encoders, IMU) measure the robot itself and drift. Exteroceptive sensors (LiDAR, cameras, radar, GPS) measure the world and give information that does not drift in the same way, but they depend on what the world looks like.

The mathematics

For SLAM each sensor needs a measurement model: how the reading depends on the pose and the world, plus noise. Two examples show the pattern.

A range sensor (LiDAR beam)

Range measurement model
z=∣∣L−p ∣∣+nrz=\lvert \rvert L-p\,\lvert \rvert +n_{r}
nr∼N(0, σr2)n_{r}\sim N(0,\,\sigma _{r}^{2})
z
the measured range in metres.
L, p
landmark (or surface point) position and sensor position; ||·|| is straight-line distance.
nr
noise, assumed to be zero-mean Gaussian with variance σr²: typically a few millimetres to centimetres for a robot LiDAR.

A bearing sensor adds an angle measurement with its own noise. Real LiDAR also has outliers (a reading from a different surface, or none at all), so the Gaussian is a good model most of the time and a robust method is needed when it is not.

An inertial sensor

A gyroscope measures angular velocity with a slowly wandering bias b and noise:

Gyroscope model
ωmeasured=ωtrue+b+ng  b changes slowly\omega _{\text{measured}}=\omega _{\text{true}}+b+n_{g}\;\mathrm{b\ changes\ slowly}

Integrating ω to get heading integrates the bias too, so a bias of 0.01 rad/s gives a heading error of 0.6 rad after a minute. Accelerometers are worse: position needs two integrations, so a constant acceleration bias gives an error growing as t². These sensors are excellent over milliseconds and poor over minutes.

A sensor model has two parts: a deterministic function of the state, and a noise distribution. Every filter and optimizer later in the track consumes exactly these two.

A worked example: choosing sensors for a corridor robot

A cleaning robot must localize in a long, straight, empty hospital corridor with glass walls on one side and good lighting.

  1. LiDAR. Along a straight corridor the scan looks the same at every position along the corridor: lateral position and heading are well constrained, but position along the corridor is not. Glass walls return poor or no data, making it worse.
  2. Camera. Good lighting helps. Posters, door numbers and fire extinguishers give features that differ along the corridor, so a camera constrains the along-corridor position well, as long as it can recognise them.
  3. Wheel encoders. They give smooth motion along the corridor, with some slip on polished floors.
  4. IMU. It gives reliable heading change over seconds, and detects slip when wheels turn but the robot does not accelerate.
  5. Combination. The failure of one is covered by another: LiDAR constrains the lateral position, the camera the along-corridor position, the encoders and IMU bridge between observations. This is the reason most deployed robots fuse several sensors, and it is covered in Modules 5 and 6.

The cost is complexity: each additional sensor requires an extrinsic calibration (where it is mounted), a time synchronisation and its own failure detection. Module 2 covers both.

Engineering implications and limitations

Practical selection rules

  • Start from the environment’s failure modes, not from the sensor catalogue. Mostly glass? Avoid pure LiDAR. Often dark? Avoid pure cameras. Outdoors with sky? GPS helps.
  • Check the field of view and range. A 2D LiDAR sees one plane; a low obstacle or an overhang may be invisible. A camera with a narrow field of view loses features quickly when turning.
  • Expect the datasheet to be optimistic. Noise is specified on a good target in good conditions. Dark, shiny or angled surfaces make it worse, sometimes by an order of magnitude.
  • Budget for calibration and synchronisation. A one-degree extrinsic error at 10 m range is 17 cm of map error. A 50 ms time offset at 1 m/s motion is 5 cm.
  • Plan the failure. Decide what the robot does when a sensor degrades: slow down, rely on others, or stop.

Limits

No sensor is “best”. LiDAR gives geometry but not identity; cameras give identity but ambiguous geometry; IMUs give motion but not place. The research directions in Module 8 (learned features, event cameras, radar SLAM) shift these trade-offs but do not remove the need to ask where each sensor fails.

Common misconceptions

“LiDAR always works indoors.”

Glass, mirrors and black or very shiny surfaces return no usable range, and long corridors can leave one direction unconstrained.

“A camera has no scale.”

A single camera has no absolute scale; stereo, RGB-D, an IMU or known object sizes supply it.

“GPS solves localization.”

Outdoors with a clear sky it gives metre-level position. Under bridges, among tall buildings and indoors it degrades or disappears, and its heading is poor.

“A more expensive sensor needs no calibration.”

Every sensor has a mount pose and a timestamp that must be calibrated, whatever its price.

Engineering takeaways

  1. Proprioceptive sensors (encoders, IMU) measure motion and drift; exteroceptive sensors (LiDAR, cameras) measure the world.
  2. Every sensor is described by a measurement model: a function of the state plus a noise distribution.
  3. Each sensor has a characteristic failure mode; choose sensors by the environment’s failure modes.
  4. Combining sensors with different failure modes is more robust than improving one.
  5. Calibration and time synchronisation are part of the cost of every sensor.

References and further reading

Primary papers and authoritative documentation.

  • Thrun, S., Burgard, W. and Fox, D. (2005). Probabilistic Robotics, chapter 6: robot perception and range-sensor beam models.
  • Siegwart, R., Nourbakhsh, I. and Scaramuzza, D. (2011). Introduction to Autonomous Mobile Robots, chapter 4: perception.
  • Woodman, O. J. (2007). An introduction to inertial navigation. University of Cambridge Computer Laboratory Technical Report 696: why integrating IMU data drifts.
  • IEEE Std 952 (gyroscope noise and bias terminology) and the Kalibr documentation (ethz-asl/kalibr) for camera-IMU calibration.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

A robot with a single 2D LiDAR drives down a long straight corridor with smooth walls. Which direction of motion is poorly constrained and why?

Explanation

Motion along the corridor. Every scan looks the same at every position along the corridor, so scan matching cannot tell the robot has moved; only the lateral position and heading are constrained by the walls.

Question 2

A gyroscope has a bias of 0.005 rad/s that is not corrected. By how much is the heading wrong after two minutes?

Explanation

0.005 rad/s × 120 s = 0.6 rad, about 34°. Even a small bias becomes a large heading error because heading is the integral of the measured rate.

Question 3

Why can fusing a camera with a LiDAR be more robust than buying a better LiDAR?

Explanation

A better LiDAR still fails in the same way (glass, featureless corridors). A camera fails in different ways (darkness, blur), so when one is degraded the other can still constrain the pose. Independent failure modes are what provide robustness.

What’s next

This closes the foundations. The third Module 1 lab covers frames; Module 2 then builds the mathematics of poses, noise and measurement models more rigorously.

Next lesson

M2-T1 — 2D Rigid-Body Transformations

Write, compose and invert SE(2) transforms and apply them to points.

Nothing below is required to finish this lesson.