AP_OABendyRuler: support exclusion polygons
AP_OADijkstra: support exclusion polygons
AC_Avoid: adjust_velocity supports exclusion polygons
AC_Avoidance: handle fence::get_boundary_points returning nullptr instead of setting num_points to zero
AC_Avoidance: Dijkstra's works with only exclusion polygons
AC_Avoidance: Dijkstra: check for fence counts instead of polyfence validity
We really only care whether fences can be returned - and they won't be
returned unless they are valid
AC_Avoidance: BendyRuler: just try to get inclusion fence rather than checking validity
AC_Avoidance: BendyRuler supports exclusion circles
AC_Avoid: Dijkstra support for exclusion circles
AC_Avoid: BendyRuler support for inclusion circles
AC_Avoid: stop an inclusion/exclusion circular fences
AC_Avoid: stop at inclusion/exclusion circular fences
AC_Avoid: fixes to Dijkstra's use of inclusion/exclusion circles and polygons
AP_Avoidance: take semaphores when interacting with AHRS and polyfence
AC_Avoid: Dijkstra's fix for some_fences_enabled inclusion circles
See discussion here:
https://github.com/ArduPilot/ardupilot/issues/7331
we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach
Thanks to assistance from Lucas, Peter and Francisco
Fixes from PR review including
(a) make some local variables const
(b) rename angle_max to veh_angle_max
(c) fix distance_to_lean_pct logic so distance of zero returns maximum lean angle
We should actually modify this function to scale back the z axis in order to avoid breaching the vertical fence. Currently breaching the vertical fence is handled within the position controller which is inconsistent.