Commit Graph

53 Commits

Author SHA1 Message Date
Peter Barker 6e5ed88087 AC_Avoidance: move AC_Avoidance defines into libraries 2024-03-11 18:07:18 +11:00
Mykhailo Kuznietsov 6c426ab637 AC_Avoidance: Fix some typos
Fixed some typos found in the code.
2023-10-12 18:30:42 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Tatsuya Yamaguchi 04deabbacb AC_Avoid: confirm USE_PROXIMITY_SENSOR to check if proximity is enabled 2021-08-02 08:52:41 +09:00
Rishabh 730cf0ad9b AC_Avoid: Add deadzone param to avoidance backaway 2021-06-12 13:31:52 +09:00
Rishabh 7e79999b86 AC_Avoid: reenable avoidance logging 2021-05-09 19:07:22 -04:00
Josh Henderson aac9771daf AC_Avoidance: Privatize Logging 2021-05-01 19:21:17 +10:00
Rishabh 98287a1b2f AC_Avoid: Use previous avoidance vel for limiting accel 2021-02-16 20:08:00 +09:00
Rishabh cbf57af1f3 AC_Avoid: Limit acceleration while simple avoidance is active 2021-02-16 20:08:00 +09:00
Rishabh 865f3cda79 AC_Avoid: Add param to switch off proximity avoidance based on alt 2021-02-16 20:08:00 +09:00
Patrick José Pereira e4fb439a96 AC_Avoidance: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Rishabh 37a14a78df AC_Avoid: Refactor changes for 3-D avoidance 2021-02-01 14:34:13 +09:00
Rishabh 5092bc2f6d AC_Avoid: Simplify accessing boundary 2021-02-01 14:34:13 +09:00
Rishabh 91132d00d9 AC_Avoid: Add deadzone to backaway code 2021-02-01 14:34:13 +09:00
Rishabh ad6e013171 AC_Avoid: Support 3D Simple Avoidance and Bacakway 2021-02-01 14:34:13 +09:00
Rishabh 0b112981f9 AC_Avoid: Back away if vehicle breaches margin to obstacle/fence 2020-08-05 15:37:04 +09:00
Peter Hall 556d90ca0c AC_Avoidance: keep track of velocity liminting status 2020-02-04 10:24:33 +09:00
Randy Mackay 0d032ecd86 AC_Avoidance: add enabled and margin accessors 2019-09-28 11:13:14 +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 43152a416c AC_Avoid: stop taking references to ahrs, fence, proximity and beacon 2019-05-22 07:48:02 -06:00
Peter Barker 413ef5a3b4 AC_Avoid: add singleton 2018-10-30 12:10:42 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas 8ae4047a00 AC_Avoidance: NFC small renames and comment improvements 2018-03-06 09:30:56 +09:00
Randy Mackay be804aa74e AC_Avoid: limit velocity and get-max-speed become public
this allows AP_Follow to use these function
2018-03-05 15:08:08 +09:00
Randy Mackay ebf405e53d AC_Avoid: reduce min and default DIST_MAX values 2018-01-25 11:16:01 +09:00
Randy Mackay ae4ded86a8 AC_Avoid: get_max_speed supports linear acceleration
Also get_stopping_distance supports linear deceleration
2018-01-22 17:18:41 +09:00
Randy Mackay dfaabb543c AC_Avoid: add adjust_speed
this method accepts a heading and speed instead of a velocity vector
2018-01-22 17:18:41 +09:00
Randy Mackay 9d74d82ff6 AC_Avoid: add stopping behaviour 2018-01-22 17:18:41 +09:00
Leonard Hall f48b14b810 AC_Avoidance: accept dt and pass to sqrt controller 2018-01-16 12:13:48 +09:00
Andrew Tridgell d5c55e0dfe AC_Avoidance: removed create() method for objects
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
2017-12-14 08:12:28 +11:00
Peter Barker c4734484e7 AC_Avoid: take an AP_AHRS in place of an AP_AHRS_NavEKF 2017-12-08 11:27:37 +09:00
Peter Barker 0fe45ef6b6 AC_Avoid: eliminate get_position and get_alt_above_home 2017-12-08 11:27:37 +09:00
khancyr b44ba29a05 AC_Avoidance: replace AP_InertialNav by AHRS 2017-12-08 11:27:37 +09:00
Lucas De Marchi e68c5a4668 AC_Avoidance: add static create method 2017-09-26 03:01:21 +01:00
Shingo Matsuura 7b0f6edf31 AC_Avoidance: add adjust velocity by beacon fence 2017-06-14 16:07:32 +09:00
Randy Mackay 35a965ebc5 AC_Avoidance: add configurable margin
vehicle will attempt to stop MARGIN meters from objects in GPS modes
2017-04-20 18:11:43 +09:00
Randy Mackay 49f4afc2a1 AC_Avoidance: add 2m margin to upward avoidance 2017-02-27 09:48:29 +09:00
Randy Mackay f73efd5249 AC_Avoidance: add adjust_velocity_z
This allows reducing the climb rate to slow the vehicle's climb so it does not breach the altitude fence
2017-01-18 09:35:47 +09:00
Randy Mackay 12dd6e11fb AC_Avoidance: constify get_position 2017-01-18 09:35:47 +09:00
Randy Mackay e7f2c9870a AC_Avoid: add accessor for proximity enabled 2016-12-20 19:48:07 +09:00
Randy Mackay b114d3928e AC_Avoid: fix distance to lean angle logic
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
2016-12-20 19:48:04 +09:00
Randy Mackay 1b582b2009 AC_Avoid: avoidance for non-GPS flight modes 2016-12-20 19:47:58 +09:00
Randy Mackay b46cc623a0 AC_Avoidance: adjust_velocity_polygon accepts body-frame points 2016-11-27 15:05:42 +09:00
Randy Mackay 55d79d9a32 AC_Avoidance: proximity sensor method re-uses polygon fence boundary code 2016-11-27 15:05:41 +09:00
Randy Mackay cdee68174d AC_Avoidance: rename adjust_velocity_polygon_fence 2016-11-27 15:05:39 +09:00
Randy Mackay 79280036de AC_Avoidance: rename adjust_velocity_circle_fence method 2016-11-27 15:05:38 +09:00
Randy Mackay 40c4e75ae7 AC_Avoidance: remove unnecessary const float arguments 2016-11-27 15:05:36 +09:00
Randy Mackay 4808664fb6 AC_Avoidance: allow use of AP_Proximity 2016-10-13 20:21:07 +09:00
Randy Mackay f27cf8d388 AC_Avoidance: add adjust_velocity that accepts Vector3f for convenience
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.
2016-07-25 20:24:37 +09:00
Peter Barker 692ff22453 AC_Avoid: move closest_point to AP_Math 2016-07-25 20:24:37 +09:00
Daniel Ricketts 865aad7598 AC_Avoid: add support for stopping at polygon fence 2016-06-25 15:55:55 +09:00