Probabilistic sensor models: beam models, likelihood fields, and feature-based approaches.
The measurement model p(zt | xt, m) answers: "If the robot is at pose xt in map m, how likely is it to see measurement zt?" This is the second ingredient of the Bayes filter, alongside the motion model.
The measurement model drives the update step: when the robot senses something, the belief is corrected by multiplying by the measurement likelihood. Good sensor models discriminate between poses — they assign high probability to poses that explain the sensor reading and low probability to poses that don't.
This chapter focuses on range finders (laser and sonar) because they're the most common sensors in robotics. The same probabilistic ideas apply to cameras, GPS, and other sensors.
Sensor models require a map m to compare measurements against. Two types of maps are common:
| Map Type | Representation | Example |
|---|---|---|
| Location-based | Grid of occupancy values | Occupancy grid: each cell is occupied/free |
| Feature-based | List of landmark positions | Point landmarks: m = {(m1,x, m1,y), …} |
Location-based maps (like occupancy grids) work naturally with beam models and likelihood fields: given the robot's pose, you can ray-cast into the grid to find expected range readings.
Feature-based maps work with feature-based sensor models: given the robot's pose, you can compute the expected range and bearing to each landmark.
The beam model is a physics-based model for range finders. It models what can go wrong when a laser beam (or sonar cone) measures distance to the nearest obstacle.
Given the robot's pose xt and a map m, we can compute the expected range ztk* for each beam k using ray casting: trace a ray from the sensor until it hits an obstacle in the map.
The actual measurement ztk may differ from ztk* for several reasons. The beam model mixes four types of errors into a single probability distribution:
Each component models a different type of failure. The mixing weights zhit, zshort, zmax, zrand sum to 1 and are intrinsic parameters of the sensor.
| Component | Distribution | Models |
|---|---|---|
| phit | Gaussian centered at zk* | Correct measurement with noise (σhit) |
| pshort | Exponential, truncated at zk* | Unexpected close objects (people, furniture) |
| pmax | Point mass at zmax | Sensor failure (max-range reading) |
| prand | Uniform over [0, zmax] | Random unexplained noise (phantom readings) |
phit (Gaussian): The sensor correctly measures the nearest obstacle, plus zero-mean Gaussian noise with standard deviation σhit. This is the "normal" case. The Gaussian is truncated to [0, zmax].
pshort (Exponential): An unexpected object (a person, a chair that moved) is closer than the mapped obstacle. The probability falls off exponentially with range — closer unexpected objects are more likely to block the beam than distant ones.
pmax (Point mass): The sensor returns its maximum range. This happens when the beam misses all objects (specular reflection off smooth surfaces, black absorbing surfaces, bright ambient light). Sonar sensors are especially prone to this.
prand (Uniform): Completely unexplained readings — cross-talk between sensors, phantom reflections, electronic noise. Modeled as uniform over the full range.
The mixing weights can be learned from data using EM (expectation maximization), or set by hand based on experience with the sensor.
Explore the four components of the beam model. Adjust the mixing weights and noise parameters to see how the probability density changes for different measurements.
The expected range z* is shown by the teal line. The orange curve is the mixture density p(z | x, m). Adjust weights to see each component.
The beam model requires ray casting for every beam at every pose — expensive! The likelihood field model is a faster alternative. Instead of tracing rays, it measures how close each beam's endpoint is to the nearest obstacle in the map.
The algorithm:
1. For each beam k, compute the endpoint (xend, yend) in global coordinates using the robot pose and beam angle.
2. Look up the distance d from (xend, yend) to the nearest obstacle in the map.
3. Evaluate a Gaussian: phit = N(d; 0, σ2). The closer the endpoint is to an obstacle, the higher the probability.
4. Mix with a uniform for random noise: p(ztk) = zhit · phit + zrand / zmax.
| Aspect | Beam Model | Likelihood Field |
|---|---|---|
| Computation | Ray casting (expensive) | Table lookup (fast) |
| Handles max-range | Yes (explicit pmax) | No (ignores max-range beams) |
| Handles short readings | Yes (pshort) | No |
| Common use | Learning, analysis | Real-time localization |
The likelihood field model ignores the ray between the sensor and the endpoint — it only looks at where the beam lands. This means it doesn't model effects like people blocking the path (pshort) or max-range failures (pmax). Despite these simplifications, it works remarkably well in practice.
Instead of modeling raw range scans, feature-based sensor models work with extracted landmarks. A feature extractor first processes the raw scan to identify distinctive features (corners, line segments, reflective markers). Each feature is described by:
where r is the range (distance to the landmark), φ is the bearing (angle), and s is the signature (feature type or identity).
Given the robot pose xt = (x, y, θ) and a landmark at (mj,x, mj,y), the expected measurement is:
The measurement likelihood is then a Gaussian centered on the expected values:
A critical challenge with feature-based models: when the robot detects a landmark, which landmark in the map is it? This is the data association or correspondence problem.
If we know the correspondence cti = j (feature i corresponds to landmark j), evaluation is straightforward. But in practice, correspondences are unknown.
Maximum likelihood (ML) correspondence: For each detected feature, find the map landmark that maximizes the measurement probability:
More sophisticated approaches maintain multiple correspondence hypotheses (multi-hypothesis tracking), or marginalize over all possible correspondences. We'll see these in the localization and SLAM chapters.
| Model | Input | Speed | Handles Dynamics | Best For |
|---|---|---|---|---|
| Beam model | Raw ranges | Slow (ray cast) | Yes (pshort) | Learning, analysis |
| Likelihood field | Raw ranges | Fast (lookup) | No | Real-time localization |
| Feature-based | Extracted features | Fastest | No | EKF localization, SLAM |
An important practical detail: sub-sampling beams. A laser scan might have 180 beams, but adjacent beams are highly correlated. Using every 5th or 10th beam is often sufficient and much faster. The beams should be treated as approximately independent (conditionally on the pose), even though they're not perfectly so.
Measurement models complete the Bayes filter toolkit. Together with motion models (Chapter 5), they provide everything needed for localization and mapping.
| Model | When to use |
|---|---|
| Beam model | Physics-based; handles dynamic obstacles; good for learning parameters |
| Likelihood field | Fast real-time evaluation; precompute distance transforms; particle filter workhorse |
| Feature-based | Compact; clean Jacobians; EKF localization and SLAM |