An interactive sandbox for comparing grid-based path planning algorithms. The app uses Pygame for rendering and provides a simple UI to draw obstacles, set start/goal locations, and watch planners animate their search.
git clone https://github.com/iboIPS/path-planner.git
cd path-planner
git submodule update --init --recursive- Multiple planners: A*, Dijkstra, D*, RRT variants (classic, *, Connect, Dynamic, Informed, Goal-Biased), PRM variants (standard, *, Lazy, Gaussian, Bridge), DWA, TEB, VFH, Potential Field, and a MultiPaths sampler.
- Interactive map editing: paint/erase obstacles, set start/goal, undo/redo, random map generation, and random start/goal placement.
- Animation modes: step through explored cells or RRT/PRM trees, adjust animation delay, and toggle a legend for multiple sampled paths.
- Map import: load a PNG/JPG map (dark = obstacle, light = free) and resize to the working grid.
- Tunable parameters: adjust RRT iterations and PRM samples directly from the UI.
- Python 3.11+
- Runtime deps:
pygame,numpy,pillow, andtk(for the file picker) - Optional: pixi if you prefer the included Conda-based workflow (
pixi.lock)
Choose either pip/venv or pixi:
pip/venv
python -m venv .venv
source .venv/bin/activate # Windows: .venv\\Scripts\\activate
python -m pip install --upgrade pip
python -m pip install pygame==2.6.1 numpy==2.2.6 "pillow>=12,<13"
python app.pypixi
pixi install
pixi run python app.py- Mouse: left = draw obstacles, right = erase, middle = set start then goal (alternates)
- Space = run selected planner; click planner buttons to switch modes
- p = select solution
- A = toggle animation;
[/]= slow/fast animation - M = random map; G = random start/goal; R = reset grid
- Ctrl+U = undo; Y = redo; H = toggle on-screen hints
- Right panel buttons: simulate (forces animate), random goal/map, load map image, RRT/PRM parameter tweaks
app.py: application entry point and main event loopsrc/config.py: grid sizing, window dimensions, and colorssrc/state.py: UI/state management, history, and map import helperssrc/render.py: drawing routines, UI layout, and hint overlaysrc/planners/: implementations for each planner (RRT/PRM subpackages included)
This project is licensed under the MIT License (see LICENSE).