Algorithms for Three Dimensional Path Planning
Project description
pyhpp
Python Package for A* 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 (defaultallowDiagonal
isFalse
)
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"]
visited_Q
: all the visited positions
final_Q
: all the positions in the A* path
path
: the A* path that is from start to stop
- Useful information:
message = result["message"]
message
: the information about path planning
elapsed_time = result["elapsed_ms"]
elapsed_ms
: the running milliseconds of path planning
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
pyhpp-0.1.0.tar.gz
(5.7 kB
view details)
Built Distribution
pyhpp-0.1.0-py3-none-any.whl
(8.1 kB
view details)
File details
Details for the file pyhpp-0.1.0.tar.gz
.
File metadata
- Download URL: pyhpp-0.1.0.tar.gz
- Upload date:
- Size: 5.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fad924aaf105121047f3f02520551dfe11dffd85ca017e050566f34a0b12c33 |
|
MD5 | 262a1f49e82146e5470f0520fd4e1447 |
|
BLAKE2b-256 | 710d99ad498e6e62d0cbc38dee3442ac088b94cacd77f56c717cae62da599393 |
File details
Details for the file pyhpp-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pyhpp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcab7b1707cdb6bf30531e5c4911876163bd91e29f1fcbe3e18300beb06b9472 |
|
MD5 | a7cf112a8563bf7472ddd6d20625f762 |
|
BLAKE2b-256 | c8c31740119d296e6dd29c4c8c57bf4f4271808dc87dce074310623d808cf73c |