---
title: "Monte Carlo localization"
date: "2012-10-08"
---


A Javascript demo about a two-dimensional mobile robot attempting to localize itself using [Monte Carlo localization](https://en.wikipedia.org/wiki/Monte_Carlo_localization) using a noisy laser rangefinder.

:: Demo /hw4/

![Screenshot of the demo with the robot in the middle shooting some laser beams at the bluish-grey obstacles.](http://i.imgur.com/haKN3gT.png)

The environment is randomly generated using [metaballs](https://en.wikipedia.org/wiki/Metaballs). The likelihood field is obtained by running a [Sobel filter](https://en.wikipedia.org/wiki/Sobel_operator) on the environment, blurred.
