Commit Graph

32 Commits

Author SHA1 Message Date
Mykhailo Kuznietsov 6c426ab637 AC_Avoidance: Fix some typos
Fixed some typos found in the code.
2023-10-12 18:30:42 +11:00
Peter Barker ee1ce32ead AC_Avoidance: allow more libraries to compile with no HAL_GCS_ENABLED 2023-09-05 22:23:51 +10:00
Peter Barker b238f95032 AC_Avoidance: correct compilation for header changes 2022-09-27 09:26:45 +10:00
Iampete1 5f31818658 AC_Avoidance: change AC_FENCE to AP_FENCE_ENABLED 2022-07-27 19:04:56 +10:00
Iampete1 ed356d94cd AC_Avoid: fix complilation with no fence 2022-07-27 19:04:56 +10:00
Rishabh 647cbe8b68 AC_Avoid: Convert Dijkstras to A-star 2021-11-16 15:08:16 +09:00
Iampete1 84db897b7f AC_Avoidance: Dijkstra: convert Vector3f to curly brace init 2021-10-20 03:45:40 -04:00
Iampete1 8937802f77 AC_Avoidance: Dijkstra: don't consider points in corners 2021-10-20 03:45:40 -04:00
Iampete1 ae9300134a AC_Avoidance: add option to log vis graph 2021-10-20 03:45:40 -04:00
Rishabh 13f3d04300 AC_Avoid: Early exit Dijkstra's path finder if destination is found 2021-10-11 02:21:48 -04:00
Pierre Kancir 4bccdada16 AC_Avoidance: do fence pointer check before using it 2021-08-11 13:43:23 +10:00
Josh Henderson aac9771daf AC_Avoidance: Privatize Logging 2021-05-01 19:21:17 +10:00
Josh Henderson 1b584a95ba AC_Avoidance: make Location(Vector3f) require ALTFRAME 2021-03-30 08:56:35 +09:00
Rishabh 15f25aa2a5 AC_Avoid: Skip unnecessary retries to build inner fences 2020-06-17 16:44:57 +09:00
Rishabh 4ec8602de2 AC_Avoid: Remove unnecessary sanity checks 2020-06-17 16:43:27 +09:00
Rishabh 34b17d0993 AC_Avoid: Check if origin is set before any obstacle avoidance algorithm is run 2020-06-17 08:26:50 +09:00
Randy Mackay 9aeac012d2 AC_Avoid: add support for complex fence types
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
2019-09-28 07:58:48 +09:00
Peter Barker f3b0148719 AP_OADijkstra: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Randy Mackay a8fd04ddf9 AC_Avoidance: Dijkstra's returns oa-not-required if path has been completed 2019-08-17 09:42:43 +09:00
Randy Mackay 452be5fd94 AC_Avoidance: Dijkstra skips calcs if current loc is same as destination 2019-08-17 09:42:43 +09:00
Randy Mackay 488d1ab60a AC_Avoidance: replace Write_OA with Write_OABendyRuler and Write_OADijkstra 2019-08-06 08:15:45 +09:00
Randy Mackay 84ba6e859c AP_OADijkstra: redo visgraphs if polyfence is changed 2019-07-15 13:45:10 +09:00
Peter Barker ec0a93ff9c AC_Avoidance: add missing includes for AP_AHRS 2019-07-09 22:32:57 +10:00
Randy Mackay bd3d352554 AC_Avoidance: remove comment from Dijkstra's 2019-07-07 04:08:34 -07:00
Randy Mackay 655ddd4ab3 AC_Avoidance: Dijkstra's ignores invalid polygon fences 2019-07-07 04:08:34 -07:00
Randy Mackay 951ded1f51 AP_OAPathPlanner: report errors to caller 2019-07-07 06:46:26 +09:00
Randy Mackay 0b62641a46 AC_Avoidance: fix Dijkstra's iteration through polygon fence points 2019-06-25 00:32:18 +08:00
Randy Mackay 578023483c AC_Avoidance: Dijkstra's expanding arrays use 32 elements per chunk 2019-06-20 15:09:23 +09:00
Randy Mackay da645c32ff AC_Avoidance: Dijkstra's specifies expanding array chunk sizes
also add check that number of polygon points is less than 255
2019-06-20 15:09:23 +09:00
Randy Mackay 48a7f468bf AC_Avoidance: AP_OADijkstra and OAVisGraph use AP_ExpandingArray 2019-06-20 15:09:23 +09:00
Randy Mackay bba81b2794 AC_Avoidance: Dijkstra's exits early if polygon fence disabled 2019-06-14 08:06:17 +09:00
Randy Mackay af80070ed9 AP_OAPathPlanner: path planning around obstacles
implements both bendy ruler and dijkstra's algorithms

includes many changes after peer review including:
removed unused airspeed and turn-rate arguments
renamed constants to start with OA_BENDYRULER_
removed fence_ptr check from update function that could cause bendy ruler to fail when fences were disabled
AC_Fence's fence-margin is not used and instead we always use a hard-coded 2m limit
vehicle's heading is used instead of ground-course when speed is below 0.2m/s
static assert added to ensure OA_BENDYRULER_BERAING_INC constant is defined correctly
replace BAD_MARGIN/GOOD_MARGIN with FLT_MAX/-FLT_MAX
use calc_margin_from_xxx function's return values
calc-margin-from-proximity-sensors fails if copy-locations fails
remove debug
remove unused singletons

and other changes including:
integrate fence rename to get_boundary_points
adapt to fence return point and duplicate final point from not being returned
create bendyrule and dijkstra objects on init
add pre-arm-check to ensure they've been created successfully
Dijkstra's detects polygon fence changes
minor fix to Dijkstra's return path
allow update_visgraph to accept 0,0 as extra point

and these fixes from peer reviews:
remove unused methods
add note about dangers of operator[]
reduce memory consuption of ShortPathNode
remove unused methods including print_all_nodes and print_shortest_path
replace OA_DIJKSTRA_POLYGON_VISGRAPH_INFINITY_CM with FLT_MAX
update method gets check that ekf origin has been set
fix indexing bug in inner fence creation
fix whitespace error
find-node-from-id uses switch statement instead of 3 IF statements
update_visgraph comments added to clarify usage of extra_position argument
find-closest-node-idx always uses node_index instead of int16_t
static assert that OA_DIJKSTRA_POLYGON_FENCE_PTS < 255
some looping style changes
AP_OABendyRuler: fix to ground course calculation
AP_OAPathPlanner: pre_arm_check writes to caller's buffer
remove unnecessary hal and stdio.h includes
rename fence_ptr local variable to fence
add sanity check to OADijkstra's set_fence_margin
add sanity check to OABendyRuler's set_config
BendyRuler's test_bearing local constants changed to be float constants
BendyRuler's ahrs_home made local constant
BendyRuler's proximity margin calcs lose margin_found local variable (use FLT_MAX instead)
BendyRuler's calc-margin-from-circular-fence performance improvement by removing one sqrt
AP_OABendyRuler: fix probe directions to be 5deg offsets from dir to destination
AP_OADijkstra: fixes after peer review
remove unnecesary initialisations
replace safe_sqrt(sq()) with length()
remove unnecessary block
comment fixes
AP_OAPathPlanner: add logging of final an intermediate location
2019-06-11 13:13:22 +09:00