Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monte Carlo Localization

Monte Carlo Localization written in Java for a probabilistic robotics course. A robot wanders a 2D room while a cloud of particles — each a guess at the robot's position and heading — is weighted against the robot's simulated sensor readings and resampled every frame, converging on the robot's true pose without ever being told it directly. Processing is used for drawing graphics and JavaGeom for the room/sensor geometry; robot motion and the particle filter itself are implemented in-project.

Requirements

  • JDK 25
  • Maven 3.9+

Build

Build a runnable fat jar with:

mvn clean package

Run

Run it from the repo root, so it can find settings.yaml:

java -jar target/monte-carlo-localization-2.0.0.jar

Controls

  • Mouse — the robot steers toward the cursor, stopping short of walls.
  • k — teleport the robot to a random point in the room; the particle cloud re-converges from scratch.

Configuration

Maps and filter parameters live in settings.yaml at the repo root, read at startup — no rebuild needed, just edit and rerun:

  • defaultMap — which entry under maps to load.
  • maps — named rooms, each a polygon of {x, y} corners (at least 3).
  • numOfParticles — size of the particle cloud.
  • sensorRange — max range of the robot's 3-ray sensor (front/left/right).
  • orientationNoise, moveNoise, sensorNoise — motion and sensor noise standard deviations.

A typo'd key or a map with fewer than 3 corners fails fast at startup with a clear error, rather than silently defaulting. YAML forbids tab indentation — use spaces.

Tests

mvn test

Covers the particle filter, sensor model, geometry, and config parsing/validation — everything that doesn't need a graphics context to run.

License

GNU General Public License v2 — see license.txt.

About

Monte Carlo Localization implementation in Java

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages