Commit Graph

28 Commits

Author SHA1 Message Date
Andrew Tridgell c36c37099d AC_Avoidance: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Peter Barker 6e5ed88087 AC_Avoidance: move AC_Avoidance defines into libraries 2024-03-11 18:07:18 +11:00
xianglunkai 9123554db3 AP_OAPathPlanner: using static constexpr instead const 2024-02-20 09:30:13 +11:00
Randy Mackay 58b6429893 AC_Avoidance: oapathplanner gets fast-waypoint option 2023-12-28 08:45:23 +09:00
Randy Mackay 5aeabc5779 AC_Avoidance: path planner accepts next destination 2023-12-28 08:45:23 +09:00
Randy Mackay 82984577d2 AC_Avoidance: path planner avoids timeout when first activated 2023-12-28 08:45:23 +09:00
Peter Barker 86d2f07f3d AC_Avoidance: avoid using struct Location
clang reports this could be a problem when compiling under some EABIs.  Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h
2023-02-04 22:51:54 +11: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
Iampete1 ae9300134a AC_Avoidance: add option to log vis graph 2021-10-20 03:45:40 -04:00
Randy Mackay 6d6324a328 AC_Avoidance: OA_PathPlanner returns which planner was used
this replaces get_bendy_type
2021-07-22 08:51:41 +09:00
Peter Barker 5d52053232 AC_Avoidance: remove @Values from param metadata where @Bitmask exists 2021-06-23 18:37:34 +10:00
Randy Mackay 526065a6a4 AP_OAPathPlanner: minor format fix 2021-03-22 20:40:59 +09:00
Randy Mackay a6800b8c47 AC_Avoidance: minor PathPlanner format fix 2021-03-17 15:01:46 +09:00
Rishabh 68b6ecc59c AC_Avoid: Mark OA_OPTIONS as a Rover-Only param 2020-11-09 08:37:47 +09:00
Rishabh caf5bfed59 AC_Avoid: Added new OA type (Dijkstra + BendyRuler fusion) 2020-08-26 15:43:46 +09:00
Rishabh b62455fd3f AC_Avoid: Extend BendyRuler to search for paths up and down 2020-08-24 08:53:20 +09:00
Rishabh 7dd7565d14 AC_Avoid: Improve BendyRuler hesitancy by avoiding significant bearing change 2020-06-24 11:42:20 +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
Rishabh 44f0aef5e9 AP_OAPathPlanner: Add param to reset WP origin while recovering from Bendy 2020-05-30 08:55:45 +09:00
Randy Mackay 985a15709a AP_OADatabase: available regardless of hal-minimize-features
In Copter with minimize feature set the entire AP_PathPlanning feature including the database are unavailable
Rover has enough space for the database even with minimise features set
2020-01-01 13:38:41 +09:00
Randy Mackay 50b4dd2599 AP_OAPathPlanner: slow updates to 1hz, timeout to 3sec 2020-01-01 13:38:41 +09:00
Randy Mackay bed21b43e1 AP_OAPathPlanner: minor fix to return original origin and dest upon failure
this has no functional effect because the consumers are not using the origin_new and destination_new unless the ret_state was OA_SUCCESS
2019-08-17 09:42:43 +09:00
Randy Mackay a1a2733926 AC_Avoidance: reduce OA path planner look ahead and margin param defaults 2019-08-09 15:51:26 +09:00
Randy Mackay 488d1ab60a AC_Avoidance: replace Write_OA with Write_OABendyRuler and Write_OADijkstra 2019-08-06 08:15:45 +09:00
Tom Pittenger 9ad6d14c16 AC_Avoidance: add Object Avoidance Database 2019-08-02 09:50:13 -06:00
Randy Mackay 951ded1f51 AP_OAPathPlanner: report errors to caller 2019-07-07 06:46:26 +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