Skip to main content

A Python-based research and experimental framework for 3D path planning with terrain awareness, including algorithms, simulation, and interactive visualization.

Project description

简体中文 | English

Python Versions PyPI Version Pepy Total Downloads

Overview

PathPlanner3D is an open-source, Python-based framework for 3D path planning, specifically designed for research and experimentation. Its core philosophy is "terrain awareness", integrating various metaheuristic optimization algorithms: Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and a hybrid PSO-GA, with an interactive simulation and visualization environment.

This framework aims to provide a flexible and extensible experimental platform for researchers and developers in fields like UAV trajectory planning. With its highly modular architecture, users can easily validate new algorithms, compare the performance of different strategies, and conduct intuitive visual analysis in dynamically generated 3D terrains.

Key Features

  • Multiple Optimization Algorithms: Includes built-in Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and an innovative hybrid PSO-GA, all with dynamic parameter tuning.
  • Terrain Awareness: Ensures path feasibility in complex terrains through intelligent collision avoidance, featuring vertical height checks and horizontal obstacle detection (e.g. mountains).
  • Interactive Playground: Built with Streamlit, it supports real-time parameter adjustments, parallel comparison of multiple algorithms, and dynamic code editing with instant feedback.
  • High-Quality 3D Visualization: Uses Plotly to dynamically display 3D terrains, planned paths, and convergence curves, offering multi-angle views for analysis.
  • Modular and Extensible Architecture: A clean, layered design ("algorithm-common-visualization-playground") makes it easy to add new algorithms, customize fitness functions, or extend to new scenarios.
  • Modern Engineering Practices: Employs pyproject.toml, uv for dependency locking, and pre-commit for code quality assurance, ensuring project stability and maintainability.

Tech Stack

The framework is built on a foundation of well-established libraries:

  • Core: NumPy, SciPy, Pydantic, Loguru
  • Visualization: Plotly
  • Interactive UI: Streamlit
  • Development Tools: uv, pytest, ruff, pyright, pre-commit

Installation

Prerequisites: Python 3.12+

We recommend using uv for dependency management to ensure a consistent environment.

  1. Clone the repository:

    git clone https://github.com/codeboyzhou/PathPlanner3D.git
    cd PathPlanner3D
    
  2. Install dependencies (Recommended): Use uv to sync dependencies.

    uv sync
    
  3. Install dependencies (Alternative): If you prefer using pip, you can perform an editable installation.

    pip install -e .
    

Quick Start

Activate the virtual environment:

.venv/Scripts/activate

Launch the Streamlit interactive playground with the following command:

streamlit run src/pp3d/playground/playground.py

After launching, a web interface will open automatically in your browser. You can:

  1. Select an algorithm (e.g. PSO) from the left sidebar.
  2. Adjust parameters like terrain, number of waypoints, and iterations.
  3. Click the Run button to see the generated 3D path and fitness convergence curve on the right.
  4. Try modifying the terrain generation logic or fitness function in the central code editor and observe the immediate impact on the results.

Application Scenarios

  • UAV Trajectory Planning: Plan safe and efficient flight paths in complex environments like mountains or urban areas.
  • Academic Research & Education: Serve as a visual platform for teaching algorithms, comparing performance, and validating new theories.

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

pp3d-0.2.1.tar.gz (113.1 kB view details)

Uploaded Source

Built Distribution

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

pp3d-0.2.1-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

Details for the file pp3d-0.2.1.tar.gz.

File metadata

  • Download URL: pp3d-0.2.1.tar.gz
  • Upload date:
  • Size: 113.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for pp3d-0.2.1.tar.gz
Algorithm Hash digest
SHA256 15dee22d29612e195a9b7114dcd2b9f360ef0225d78669719342e349228aaa46
MD5 81b06f927f8edb88193b9262a4fdfe83
BLAKE2b-256 684e1680c1fe4603fad307fb15acbbf84ef21654a600f020a8546d5faeedc64c

See more details on using hashes here.

File details

Details for the file pp3d-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pp3d-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 39.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for pp3d-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0386388f8aa592e7752164248838d53e6b9ef7dcc095d333c8bfd1a8517b77a9
MD5 b4db4ac3c57c39f5c2dbc1fa5d1c7243
BLAKE2b-256 1a34524e0a2c6119498264c7d239d6385f8786d62ab04d43583ebe911450b5e0

See more details on using hashes here.

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