Algorithm Search⌘K

Modelcore

Likelihood field model

Also called end-point model.

Scores a range reading by the distance from its end point to the nearest obstacle in the map, a smooth and fast sensor model.

The likelihood field model scores a scan from a laser range sensor against a map, given a pose of the robot. It does not trace each beam through the map. It takes only the end point of each beam, the place where the beam says an obstacle is, and asks how far that point is from the nearest obstacle in the map. A short distance gives a high score and a long distance a low one, with a Gaussian fall-off and a small constant floor for random readings. The distances for every point of the map are computed once, before localization starts, with a distance transform. After that one beam costs one table lookup, and the score changes smoothly when the pose changes. The model is a measurement model p(zt∣xt,m)p(z_t \mid x_t, m) for the Bayes filter, used mainly in Monte Carlo localization. It is a heuristic: it has no physical derivation, and it is not a normalized density over readings. The notation is the one of Thrun, Burgard and Fox (2005).

The machine

State. The pose xt=(x,y,θ)x_t = (x, y, \theta) of the robot and a map mm with a set OO of occupied points or cells. The sensor sits at (xs,ys)(x_{\mathrm{s}}, y_{\mathrm{s}}) in the robot frame.

Measurement. A scan of KK beams. Beam kk has a bearing θk\theta_k in the sensor frame and a reading zk∈[0,zmax⁡]z^k \in [0, z_{\max}].

End points. For each beam with zk<zmax⁡z^k < z_{\max}, the end point in the world frame is

xzk=x+xscos⁡θ−yssin⁡θ+zkcos⁡(θ+θk),yzk=y+yscos⁡θ+xssin⁡θ+zksin⁡(θ+θk).x_{z^k} = x + x_{\mathrm{s}}\cos\theta - y_{\mathrm{s}}\sin\theta + z^k \cos(\theta + \theta_k), \qquad y_{z^k} = y + y_{\mathrm{s}}\cos\theta + x_{\mathrm{s}}\sin\theta + z^k \sin(\theta + \theta_k).

Readings at zmax⁡z_{\max} are skipped: they carry no end point.

The model. With dkd_k the Euclidean distance from (xzk,yzk)(x_{z^k}, y_{z^k}) to the nearest point of OO,

q=∏k: zk<zmax⁡(zhit N(dk; 0,σhit2)+zrandzmax⁡).q = \prod_{k:\ z^k < z_{\max}} \Bigl( z_{\mathrm{hit}}\, \mathcal N(d_k;\ 0, \sigma_{\mathrm{hit}}^2) + \frac{z_{\mathrm{rand}}}{z_{\max}} \Bigr).

Parameters. The weights zhitz_{\mathrm{hit}} and zrandz_{\mathrm{rand}}, and σhit\sigma_{\mathrm{hit}} in meters. They are fitted to data in the same way as for the beam model; they are not properties of the sensor alone, and σhit\sigma_{\mathrm{hit}} also absorbs map and pose errors.

Precomputation. On an occupancy grid map with gg cells, the cells above an occupancy threshold form OO, and a distance transform stores the distance from each cell to the nearest cell of OO. Exact Euclidean distance transforms run in O(g)O(g) time. The table of zhit N(d;0,σ2)+zrand/zmax⁡z_{\mathrm{hit}}\,\mathcal N(d; 0, \sigma^2) + z_{\mathrm{rand}}/z_{\max} per cell is the likelihood field that gives the model its name.

Standing assumptions. The beams are independent given the pose and the map, which is an approximation, as for the beam model. Only the end point matters: the cells that the beam passed through play no part.

Example. Take σhit=0.2\sigma_{\mathrm{hit}} = 0.2 m, zhit=0.9z_{\mathrm{hit}} = 0.9, zrand=0.1z_{\mathrm{rand}} = 0.1 and zmax⁡=8z_{\max} = 8 m, so the floor is 0.1/8=0.01250.1/8 = 0.0125. A robot at (1,1,0)(1, 1, 0) with the sensor at its center sees a wall on the line x=4x = 4. A beam with bearing 0 and reading 2.92.9 ends at (3.9,1)(3.9, 1), at distance 0.10.1 from the wall. The table gives the value of one beam as a function of dd:

dd (m) 0 0.1 0.2 0.4 1.0
beam value 1.80774 1.59679 1.10137 0.25546 0.01251

So this beam scores 1.596791.59679. A reading of 3.13.1 ends behind the wall at (4.1,1)(4.1, 1) and scores the same, which the beam model would not allow.

What it counts

The model assigns a score to a scan at a hypothesized pose, used as the weight of a particle. After the precomputation one scan costs O(K)O(K) time: two trigonometric terms and a table lookup per beam. The precomputation costs O(g)O(g) time and O(g)O(g) memory for a grid of gg cells. A filter with NN particles pays O(NK)O(N K) per scan, against O(NK(1+zmax⁡/s))O(N K (1 + z_{\max}/s)) for the beam model with ray casting on cells of side ss.

Relation to other models

  • Beam range finder model. Casts a ray for each beam and compares the reading with the expected range. It models free space, short readings and max range readings, but it is slow and not smooth in the pose. The likelihood field model gives up the physics for speed and smoothness.
  • Scan matching. Iterative closest point minimizes the sum of squared distances from end points to the nearest map points, which is the negative log of the likelihood field without the floor, up to constants. The normal distributions transform replaces the distance field with a Gaussian per cell. Correlative scan matching evaluates a likelihood field over a grid of poses.
  • Grid-based Rao-Blackwellized particle filter SLAM. Can use end point scores of this kind on each particle's own map, both to weight the particles and to refine their poses by scan matching.

Known results in the model

  • Theorem (smooth in the pose). The distance d(p)=min⁡o∈O∥p−o∥d(p) = \min_{o \in O} \lVert p - o \rVert to a nonempty set is 1-Lipschitz in pp: ∣d(p)−d(p′)∣≤∥p−p′∥|d(p) - d(p')| \le \lVert p - p' \rVert. The end point is a smooth function of the pose, and log⁡(zhitN(d;0,σ2)+c)\log\bigl(z_{\mathrm{hit}} \mathcal N(d; 0, \sigma^2) + c\bigr) with c=zrand/zmax⁡>0c = z_{\mathrm{rand}}/z_{\max} > 0 has a bounded derivative in dd. So the log-likelihood of each beam is Lipschitz in the pose on any bounded set of poses. The beam model has no such bound, since its expected range jumps at the corners of obstacles. A lookup in a grid table makes the score piecewise constant; bilinear interpolation of the table restores continuity.
  • Theorem (not a density over readings). For a fixed pose, ∫0zmax⁡(zhitN(d(z);0,σ2)+zrand/zmax⁡) dz\int_0^{z_{\max}} \bigl(z_{\mathrm{hit}} \mathcal N(d(z); 0, \sigma^2) + z_{\mathrm{rand}}/z_{\max}\bigr)\,dz is not 1 in general. A beam that lies on the surface of a straight wall has d(z)=0d(z) = 0 for every zz, so with the numbers of the example the integral is about 8×1.80774≈14.58 \times 1.80774 \approx 14.5. A beam into open space far from every obstacle gives about zrand=0.1z_{\mathrm{rand}} = 0.1. So qq is a score, not a probability density, and its values for scans with different numbers of valid beams are not on the same scale.
  • Heuristic (seeing through walls). The model ignores the free space along each beam. A beam that passes through a wall in the map is not penalized, and an end point just behind a thin wall scores as high as one in front of it. In maps with thin walls this can let particles settle in the wrong room.
  • Unknown space. Thrun, Burgard and Fox (2005) give end points that fall outside the known map the constant value 1/zmax⁡1/z_{\max}, so that unexplored areas neither reward nor punish a pose.
  • Heuristic (independence of beams). As for the beam model, the product over many correlated beams is too peaked. Using a subset of the beams is the common fix.

References

  1. Sebastian Thrun, Wolfram Burgard and Dieter Fox, Probabilistic Robotics, MIT Press, 2005, Chapter 6, Section 6.4 (likelihood fields for range finders: the basic algorithm, its extensions and its limits), with Section 6.3 for the beam model it replaces
  2. Sebastian Thrun, A probabilistic online mapping algorithm for teams of mobile robots, International Journal of Robotics Research 20(5), 2001, pages 335 to 363, the scan likelihood computed from the distance of each end point to the nearest obstacle in the map

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/4N2WTX/text.yaml