> ## Documentation Index
> Fetch the complete documentation index at: https://aegean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Likelihood Field

> Efficient sensor model using precomputed distance transforms.

## Likelihood Field Alternative

Instead of per-beam ray casting in localization:

* Precompute distance transform $d(\mathbf p)$ to nearest occupied cell.
* Likelihood:

$$
p(z_t^k \mid \mathbf x_t, m) = \eta \exp\!\left(-\frac{(d(\mathbf e_k))^2}{2\sigma_d^2}\right),
$$

where $\mathbf e_k$ is beam endpoint predicted without obstacle truncation.

Pros: faster. Cons: less detailed modeling of short / max phenomena.

## Integration in Particle Filter Localization

For particle $i$ with pose $\mathbf x_t^{[i]}$:

$$
w_t^{[i]} \propto w_{t-1}^{[i]} \prod_{k \in \mathcal K} p(z_t^k \mid \mathbf x_t^{[i]}, m),
$$

Optionally subsample beams $\mathcal K$ to reduce computation; use log-sum for stability.

## 9. Handling Correlation and Beam Selection

Adjacent beams correlated via shared surfaces; independence assumption optimistic. Mitigation:

* Subsample (e.g., every 4th beam).
* Clamp per-beam likelihood to lower bound.
* Use adaptive beam selection near discontinuities.

## 10. Noise Sources and Effects

| Source                                 | Effect on Distribution                |
| -------------------------------------- | ------------------------------------- |
| Surface reflectivity (sonar)           | Increases short / random components   |
| Transparent / specular surfaces        | Elevates random / max                 |
| Multi-path                             | Broadens $p_{\text{hit}}$             |
| Timing quantization                    | Slight discretization at small ranges |
| Motion distortion (lidar while moving) | Systematic curvature in scans         |

Compensations: deskewing using IMU/odometry, calibrating mixture weights.

**Key references**: (Lukežič et al., 2016; Song et al., 2016; Kendall et al., 2015)

## References

* Kendall, A., Grimes, M., Cipolla, R. (2015). *PoseNet: A Convolutional Network for Real-Time 6-DOF Camera Relocalization*.
* Lukežič, A., Vojíř, T., Čehovin, L., Matas, J., Kristan, M. (2016). *Discriminative correlation filter with channel and Spatial Reliability*.
* Song, J., Choi, J., Love, D. (2016). *Common Codebook Millimeter Wave Beam Design: Designing Beams for Both Sounding and Communication with Uniform Planar Arrays*.

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit this page on GitHub](https://github.com/aegean-ai/eaia/edit/main/src/aiml-common/lectures/sensor-models/likelihood-field/index.mdx) or [file an issue](https://github.com/aegean-ai/eaia/issues/new/choose).
</Callout>
