Skip to main content

Algorithms for Three Dimensional Path Planning

Project description

pyhpp

Python Package for Path Planning Algorithms

  • 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
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

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

pyhpp-0.1.4.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

pyhpp-0.1.4.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file pyhpp-0.1.4.1.tar.gz.

File metadata

  • Download URL: pyhpp-0.1.4.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pyhpp-0.1.4.1.tar.gz
Algorithm Hash digest
SHA256 4738433f8ca8c6ae7dd487e8e3edf55b2e75036128a73d9564b50c6596559cc3
MD5 7e25c75a3c8cd740395e23d3e7fcb457
BLAKE2b-256 0ecfa9fb8284dba0a67967d0a554ff51538bb263acd07052e576c1b92a4eb175

See more details on using hashes here.

File details

Details for the file pyhpp-0.1.4.1-py3-none-any.whl.

File metadata

  • Download URL: pyhpp-0.1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pyhpp-0.1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 693a26b1f46a5e7c5240f3ce8fe04ee9094140301b49955530baad61ebe5a011
MD5 ef8da03eb8c8975f84060a2e41e56edb
BLAKE2b-256 dc330e824c70efef5b420fabf6a80f97a116c37129c29e94c17a4d66d6cb7d8f

See more details on using hashes here.

Supported by

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