Object Avoidance with Dijkstra’s¶
Copter and Rover support Dijkstra’s for path planning around fences and stay-out zones in Auto, Guided and RTL modes. This well known algorithm internally builds up a list of “safe areas” calculated from the fence and stay-out zones and then finds the shortest path to the destination.
Warning
Dijkstra’s does not support avoiding objects sensed with lidar or proximity sensors
Warning
Dijkstra’s does not support Spline Waypoints.
Configuration¶
OA_TYPE = 2 (Dijkstra). You may need to refresh parameters after changing this to see the parameters below.
OA_MARGIN_MAX: the distance (in meters) that the vehicle should stay away from the fences and stay-out zones
OA_OPTIONS bit 2 (+4 to the value) can be set to use S-Curves around fence corners in the planned path to speed up turns. Note that using S-Curves, instead of the normal “approach,stop, turn, proceed” method of path planning around sharp fence corners, could still result in a fence breach.To avoid this WPNAV_RADIUS should be set smaller than FENCE_MARGIN. Also waypoints should also be placed at least 10m from fence boundaries.