# Grid & Monte Carlo Localization

Grid & Monte Carlo Localization methods are able to solve global localization problems (in comparison to §ekf_localization and §markov_localization).

They also:

• process raw sensor measurements
• are non-parametric: not bound to uni-modal distributions

## Grid Localization

The grid localization algorithm uses a histogram filter to represent the posterior belief. Coarseness of the grid is an accuracy, computational-complexity tradeoff. A grid too coarse might prevent the filters from working altogether.

\begin{algorithm} \caption{Grid Localization} \label{grid_localization} \begin{algorithmic} \Procedure{Grid Localization}{$\{p_{k, t-1}\}, u_t, z_t, m$} \ForAll{$k$} \State $\overline{p}_{k,t} = \sum_i p_{i, t-1} \mathbf{\mathrm{motion model}}(\mathrm{mean}(x_k), u_t, \mathrm{mean}(x_i))$ \State $p_{k,t} = \eta \textbf{measurement model}(z_t, \mathrm{mean}(x_k), m)$ \EndFor \State \Return $p_{k,t}$ \EndProcedure \end{algorithmic} \end{algorithm}

## Monte-Carlo Localization

MC localization uses the particle filter (§particle_filter) to represent the posterior belief. The accuracy is determined by the size of the particle set.