Production-oriented search-based and sampling-based path planning algorithms with reusable Python API.
Project description
PathPlanningV2
PathPlanning is a curated collection of search-based and sampling-based path planning algorithms for robotics, with built-in visualizations for 2D and 3D demos.
The repository is organized for practical use:
- algorithm implementations grouped by planning family
- reusable environment and plotting utilities
- runnable demo scripts
- production-oriented linting and pre-commit checks
Contents
- Overview
- Visual Preview
- Repository Layout
- Implemented Algorithms
- Installation
- Package API
- Production Support Matrix
- Run Demos
- Publish to PyPI
- Production Developer Workflow
- Code Quality Files
- CI
- License
Overview
This codebase is useful for:
- learning classic planning algorithms
- comparing planners on shared map/obstacle settings
- extending planners while keeping plotting and environment code decoupled
Primary modules:
Search_based_Planning/plan2d: 2D grid search plannersSearch_based_Planning/Search_3D: 3D search plannersSampling_based_Planning/rrt_2D: 2D sampling-based plannersSampling_based_Planning/rrt_3D: 3D sampling-based plannersCurvesGenerator: curve generation utilities (Bezier, spline, Dubins, Reeds-Shepp)
Visual Preview
A small gallery from the built-in animations:
Search-Based
Sampling-Based
Repository Layout
.
├── .github/workflows/
│ └── pylint.yml
├── CurvesGenerator/
├── Sampling_based_Planning/
│ ├── gif/
│ ├── rrt_2D/
│ └── rrt_3D/
├── Search_based_Planning/
│ ├── gif/
│ ├── plan2d/
│ └── Search_3D/
├── .pre-commit-config.yaml
├── pyproject.toml
├── requirements.txt
├── requirements-dev.txt
├── Makefile
└── README.md
Implemented Algorithms
Search-based (2D/3D):
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Best-First Search
- Dijkstra
- A*
- Bidirectional A*
- Lifelong Planning A* (LPA*)
- Learning Real-Time A* (LRTA*)
- Real-Time Adaptive A* (RTAA*)
- D*
- D* Lite
- Anytime D*
- Anytime Repairing A* (ARA*)
Sampling-based (2D/3D):
- RRT
- RRT-Connect
- Extended-RRT
- Dynamic-RRT
- RRT*
- Informed RRT*
- RRT* Smart
- FMT*
- BIT*
- AIT*
Installation
git clone https://github.com/damminhtien/PathPlanningV2.git
cd PathPlanningV2
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
Python >=3.9 is recommended.
Package API
Import-first usage (production path):
from pathplanning import Search2D, Planner, PlanConfig, Heuristic
planner = Search2D()
result = planner.plan(
Planner.ASTAR,
PlanConfig(s_start=(5, 5), s_goal=(45, 25), heuristic=Heuristic.EUCLIDEAN),
)
print(result.path)
print(result.cost)
Load algorithm modules via registry:
from pathplanning import list_supported_algorithms, load_algorithm_module
for spec in list_supported_algorithms():
module = load_algorithm_module(spec.algorithm_id)
print(spec.algorithm_id, module.__name__)
Production Support Matrix
Production algorithm support is documented in:
SUPPORTED_ALGORITHMS.md
Policy:
- All complete algorithms are included in production scope.
- Incomplete algorithms are explicitly marked as dropped.
sampling3d.abit_staris currently dropped as incomplete and excluded from production API surface.
Publish to PyPI
Build and upload (requires build and twine, already in requirements-dev.txt):
make build # creates dist/ artifacts
make publish-test # upload to TestPyPI (configure ~/.pypirc)
make publish # upload to PyPI (configure ~/.pypirc)
Manual commands:
python -m build
twine check dist/*
twine upload --repository testpypi dist/*
Run Demos
Run from repository root.
2D search demo (runs multiple algorithms):
python Search_based_Planning/plan2d/run.py
Single 2D search example:
python Search_based_Planning/plan2d/astar.py
2D sampling example:
python Sampling_based_Planning/rrt_2D/rrt.py
3D search example:
python Search_based_Planning/Search_3D/Astar3D.py
Generated animations are available under:
Search_based_Planning/gifSampling_based_Planning/gif
Production Developer Workflow
Install development tooling:
pip install -r requirements-dev.txt
Run lint checks:
ruff check .
Run formatter (optional but recommended before commit):
ruff format .
Enable git hooks:
pre-commit install
Run all hooks manually:
pre-commit run --all-files
Run smoke tests:
pytest -q
Shortcut commands:
make install-dev
make lint
make format
make precommit
make test
Code Quality Files
pyproject.toml- central
rufflint/format configuration - conservative default lint rule set focused on correctness issues
- central
.pre-commit-config.yaml- syntax/config sanity checks
rufflint hook for Python files
requirements-dev.txt- pinned development dependencies for linting and pre-commit
.editorconfig- consistent whitespace/newline/indentation defaults
Makefile- common development commands (
install-dev,lint,format,precommit)
- common development commands (
CI
GitHub Actions workflow: .github/workflows/pylint.yml
CI installs requirements-dev.txt and runs:
pre-commit run --all-files --show-diff-on-failure
pytest -q
License
See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pathplanning-0.1.0.tar.gz.
File metadata
- Download URL: pathplanning-0.1.0.tar.gz
- Upload date:
- Size: 95.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27cf7f983919fd70c966cb9f995a7b4e620de8f5b91f9adc102449a618f56e7a
|
|
| MD5 |
8b96450eab094c83a60cd50398241d8b
|
|
| BLAKE2b-256 |
d50de52b0b87e7e9c5cc0f862b11537a957c76eed8f49b66494ac842c24a6b90
|
File details
Details for the file pathplanning-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pathplanning-0.1.0-py3-none-any.whl
- Upload date:
- Size: 142.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd8cd0c6a0e3e763badb6322778bb06fc5b09524f171fda7a3157c1e5b536e2e
|
|
| MD5 |
741161bf172a105882b8ad6c314c844a
|
|
| BLAKE2b-256 |
c6833f0f09b73970b726f932bd70ce91d329d04f405455b8018c801ab9b4be49
|