A*-based collision avoidance for UAV path planning
Configuration file for UAVHeading Class
INTERVAL_SIZE = 0.0012 # defines resolution for A* search
DISTANCE_THRESHOLD = 0.01 # upper bound distance for running UAVHeading.avoid(UAVHeading) function
DECISION_WEIGHTS = [ # weights for sidedWeightDecision in head-on avoidance scenario
1.0, # UAV-0
6.0, # Goal Position for UAV-0
0.75, # Other UAVs
0.25 # KeepOut Zoness
]
SHOW_ANIMATION = False # graph path planning search animation in avoidance function
Example Test Script
- Import UAVHeading Class
from UAVHeading import UAVHeading
- Initialize UAV Objects
# (pos, waypt, speed, heading, tPossible)
uav0 = UAVHeading((1.515593587271553, -132.53722833033987),
(1.5156, -132.5111),
50.0,
90.0,
30.0)
uav1 = UAVHeading((1.5098039166143598, -132.531099),
(1.5267, -132.531),
50.0,
0.0,
30.0)
- Run Avoidance Algorithm
waypoints, _ = uav0.avoid(uav1)