Skip to main content

A lightweight Python library for path planning.

Project description

PathPlan

PyPI - License PyPI - Version PyPI - Python Version PyPI Downloads

A lightweight, extensible Python library for 2D path planning and navigation. PathPlan provides a unified interface for implementing, comparing, and visualizing a wide array of classic and modern pathfinding algorithms.

Features

  • Unified Interface: All planners follow a consistent BaseSolver API.
  • Rich Algorithm Library: Includes 12 different path planning strategies ranging from graph-search to sampling-based and reactive methods.
  • Standardized Mapping: Uses a normalized GridMap (0.0 for free space, 1.0 for obstacles).
  • Visualization: Built-in utilities for rendering search progress (explored nodes/edges) and final paths.

Installation

Install the library directly from PyPI:

# Basic installation
pip install pathplan

# Install with plotting support
pip install pathplan[plot]

Alternatively, for development or to use the latest source:

git clone https://github.com/alejotoro-o/pathplan.git
cd pathplan
pip install .[plot]

Quick Start

import numpy as np
from pathplan.core import GridMap
from pathplan.classic import AStarPlanner
from pathplan.utils import Visualizer

# Create a 20x20 grid with some obstacles
data = np.zeros((20, 20))
data[5:15, 10] = 1.0  # Vertical wall

# Initialize map and planner
grid_map = GridMap(data)
planner = AStarPlanner(grid_map)

# Plan path
start, goal = (0, 0), (19, 19)
path, explored = planner.plan(start, goal)

# Visualize
viz = Visualizer(grid_map)
viz.plot_path(path, explored, title="A* Path Planning")

Available Algorithms

Code Full Name
DijkstraPlanner Dijkstra's Algorithm
AStarPlanner A* Search Algorithm
BidirectionalAStarPlanner Bidirectional A*
ThetaStarPlanner Theta* (Any-Angle A*)
JPSPlanner Jump Point Search
DStarLitePlanner D* Lite
RRTPlanner Rapidly-exploring Random Tree
RRTStarPlanner RRT* (Optimal RRT)
InformedRRTStarPlanner Informed RRT*
PRMPlanner Probabilistic Roadmap
APFPlanner Artificial Potential Fields
Bug2Planner Bug2 Algorithm

Testing

Run the suite of automated tests to verify planner integrity:

pytest -v

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pathplan-0.0.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pathplan-0.0.1-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file pathplan-0.0.1.tar.gz.

File metadata

  • Download URL: pathplan-0.0.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pathplan-0.0.1.tar.gz
Algorithm Hash digest
SHA256 23d8d3ce480dd2c0066fb6e15a9c11b8cfc44b212ecdde853ed96cdfa032be97
MD5 b4979244c191e836383ae3374cee867f
BLAKE2b-256 329376d920f096b68770dbce598a7e7ca5cf86d996fdcfc884297eada33ef72d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathplan-0.0.1.tar.gz:

Publisher: python-publish.yml on alejotoro-o/pathplan

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathplan-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pathplan-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pathplan-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b2e6b49facbf95ca345791cc2e164df6ee371ef44da5bfa5e82ce3497782824
MD5 88bd8be6947286c2ab001c59a590fa30
BLAKE2b-256 02842288f57afad2238e5fd65ff0c1501dbccd5340dadb4d78e76a250c94801c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathplan-0.0.1-py3-none-any.whl:

Publisher: python-publish.yml on alejotoro-o/pathplan

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page