Skip to main content

pyhpp

Python Package for Path Planning Algorithms

GitHub license

Steps

  • Step 1: import A* algorithm
from pyhpp.a_star import AStar
  • Step 2: prepare a JSON type scenario, e.g.,
scenario = {
    "dimension": {"x": 10, "y": 10, "z": 10},
    "waypoint": {
        "start": {"x": 5, "y": 9, "z": 2},
        "stop": {"x": 5, "y": 0, "z": 4},
        "allowDiagonal": False
    },
    "data": {
        "size": 16,
        "x": [4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7],
        "y": [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
        "z": [2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]
    },
    "boundary": {
        "zCeil": 6,
        "zFloor": 1
    }
}

dimension: [required] whole dimension of the scenario. Two dimensional scenario can be set up when "z": 0
waypoint: [required] start and stop positions (default allowDiagonal is False)
data: obstacle data (set as empty if none)
boundary: the z-axis boundary of path for calculation

  • Step 3: create an A* instance
a_star = AStar(scenario)
  • Step 4: calculate and get the results
result = a_star.calculate_path()

visited_Q = result["visited_Q"]
final_Q = result["final_Q"]
path = result["path"]

This returned result contains the following main properties

visited_Q: all the visited positions
final_Q: all the positions in the A* path
path: the A* path array from start to stop
refined_path: the A* path with minimum number of points

and some useful information

message: the information about path planning
elapsed_ms: the running milliseconds of path planning

Release files for pyhpp 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhpp 0.1.5
File Size Uploaded
pyhpp-0.1.5.tar.gz 12.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyhpp 0.1.5
File Interpreter ABI Platform
pyhpp-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 30.4 kB

Release files / pyhpp-0.1.5.tar.gz

Download URL pyhpp-0.1.5.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
679d9bfbccfea4bd5e949d44e9c99aa621d1dbff897899783e9d49492cea85e0
BLAKE2b-256 checksum
How to use checksums
768d3daae2bb36c988c9536ccd808a9c72fec03b15ff7a7e20491a1d1c90080d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.4

Release files / pyhpp-0.1.5-py3-none-any.whl

Download URL pyhpp-0.1.5-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
059d73bc1376defd7c56790c7bb2c99b353765c054a7d68d74dd07e09279b4af
BLAKE2b-256 checksum
How to use checksums
10e5fffba8a51ccc3fde3d2ef7a97547c0023b23c6d58ae375a10d377294a708
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page