The classic Beam Model needs ray casting into the map for every beam to find the predicted hit; that’s accurate but slow. The likelihood field replaces ray casting with a precomputed distance-to-obstacle field.

Essentially, from the occupancy grid , compute for each grid the Euclidean distance to the nearest occupied cell:
- This is the distance transform; it can be computed once with fast algorithms (e.g., Felzenszwalb & Huttenlocher).
Convert that into a likelihood via a Gaussian centered at zero distance:
where is the endpoint of the measured beam when the robot is at pose .
