Commit Graph

104 Commits

Author SHA1 Message Date
Hwurzburg 6fbf2d227c AC_Fence: Correct Rover metadata 2021-04-27 09:31:09 +09:00
Randy Mackay 5b0f107631 AC_Fence: remove alt from TYPE param desc for Rover 2021-04-21 11:35:48 +10:00
James O'Shannessy 8ef68c8fb0 AC_Fence: Send text to gcs when fence is auto-enabled 2021-03-05 14:52:46 +11:00
James O'Shannessy b4bf41c6f9 AC_Fence: Adjustments to default parameters for addition to plane 2021-03-05 14:52:46 +11:00
James O'Shannessy 254c28f142 AC_Fence: Improve auto enable documentation 2021-03-05 14:52:46 +11:00
James O'Shannessy b6d29d746b AC_Fence: Add common auto enable and auto disable 2021-03-05 14:52:46 +11:00
James O'Shannessy e4f1e26b5c AC_Fence: Disable fence floor when disabling the rest of the fence 2021-03-05 14:52:46 +11:00
Steven Josefs c783410494 AC_Fence: adjusted AP_GROUPINFO to contain all copters 2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas 22bdc3e54c AC_Fence: extend pre-arm checks
Fix comments
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 2e422f249a AC_Fence: small comment improvements. Do not call the same function four times 2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 15e95be7d7 AC_Fence: do not delete the FENCE_ENABLE parameter. It would confuse many users.
Talked to Randy about this. The consensus was not to delete the parameter
2021-03-05 14:52:46 +11:00
James O'Shannessy 783a4b7965 AC_Fence: Change logic to fence enable and sys_status reporting 2021-03-05 14:52:46 +11:00
James O'Shannessy 87b66b4b49 AC_Fence: Add parameters from Geofence to AC_Fence
AC_Fence: Add fence floor breach checks and calculations

AC_Fence: Add event logging to enable/disable of fence floor

AC_Fence: Adjust sys_status reporting to look at total fence count

AC_Fence: Make retrieving of the return point accessible

AC_Fence: Check whether fence is enabled or autoenable is set for arming checks

Checks whether the fence is currently enabled OR if the fence is intended to be enabled automatically.
These checks are used to find out enabled fences, or prearm checks
2021-03-05 14:52:46 +11:00
murata 3824277d11 AC_Fence: Add Smart RTL or LAND to the fence action 2021-03-03 07:59:03 +09:00
Peter Barker a0172fd2ca AC_Fence: emit a FENCE_STATUS message if we newly-breach the fences
This should resolve a problem in autotest where we don't detect the
fence as being breached as ArduPilot never announces the fact it has
breached - it just changes mode to RTL but the interval on the
FENCE_STATUS message never aligns with the time the vehicle is breached.
2021-02-23 08:28:02 +09:00
Rishabh 85692312ac AC_Fence: Add Pre-Arm check for margin < radius 2020-08-05 15:37:04 +09:00
murata b12fcff89a AC_Fence: Matching Message Style 2020-07-04 22:55:35 +10:00
Peter Barker 799c538c3e AC_Fence: ALT_MAX is Copter-and-Sub only 2020-06-16 11:21:47 +10:00
Rishabh b3a2b360e6 AC_Fence: clear breach if breached fence is not enabled 2020-06-16 08:27:19 +09:00
Peter Barker 973b103a4a AC_Fence: write log event when fence enabled or disabled 2020-06-09 10:52:19 +10:00
Peter Barker e545a429a0 AC_Fence: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Tatsuya Yamaguchi 5688031f02 AC_Fence: add the description of FENCE_ACTION in Rover 2020-02-05 14:58:56 +09:00
Randy Mackay 7c034990b5 AC_Fence: relax sys-status healthy reporting 2019-11-11 07:55:50 +08:00
Peter Barker 714a3e2462 AC_Fence: support for multiple polygon fences
AC_Fence: add interface for retrieving exclusion polygons

AC_Fence: add interface to get exlusion polygons to polyfence loader

AC_Fence: add suport for inclusion circles

AC_Fence: add option for compiling-out FENCE_POINT protocol support

AC_Fence: get_exclusion_polygon and get_boundary_points set num_points to zero on failure

AC_Fence: use Debug(...) to hide debug messages

AC_PolyFence_loader: add methods to retrieve all inclusion zones

AC_PolyFence_loader: valid simply returns true if a polygon boundary can be returned

AC_Fence: add get_exclusion_circle

AC_Fence: add get_exclusion_circle_update_ms accessor

AC_Fence: PolyFence_loader gets inclusion circle accessors

AC_PolyFence_loader: add and use semaphore to protect loaded fence

AC_Fence: move fence breach check below fence type checks

This allows us to provide more information to the user about why they
are breached.

For example, if the radius is negative you are considered in breach of
it - but we'd tell you you were breached, not that your radius was
invalid

AC_Fence: clear the fence if we discover the user has set the fence count to zero
2019-09-28 07:58:48 +09:00
Peter Barker ff37590776 AC_Fence: move polygon points into AC_Fence_Polygon 2019-09-28 07:58:48 +09:00
Peter Barker a5ec64fc99 AC_Fence: tidy get_breach_distance
The polygon fence will soon be able to supply a breach distance -
prepare for that.
2019-08-08 16:47:41 +09:00
Peter Barker 6a241cc3e9 AC_Fence: remove pointless sanity check 2019-08-08 16:47:41 +09:00
Pierre Kancir bf74cb4e99 AC_Fence: pass mavlink_message_t by const reference 2019-07-16 20:51:42 +10:00
Randy Mackay beb9ecbdcb AC_Fence: add get_boundary_update_ms
this allows callers to detect changes in the underlying polygon fence
2019-06-11 13:13:22 +09:00
Peter Barker 062ee71135 AC_Fence: simplify fence loading
There's only one caller to this, who didn't force loading - so remove
the unused parameter.

Also remove the _boundary_loaded boolean; it was only set to true in one
place - just before the sole caller called the function!
2019-05-30 16:03:58 +09:00
Peter Barker 2822c635ec AC_Fence: correct get_boundary_points to account for closing point
Also rename from get_polygon_points
2019-05-29 15:34:02 +10:00
Pierre Kancir 4dbac3de60 GCS_Common: remove mavlink send_buf usage 2019-04-23 09:41:00 +10:00
Pierre Kancir e4987f17b9 AC_Fence: use get_distance_NE instead of location_diff 2019-04-08 08:00:52 -07:00
Peter Barker 3629273959 AC_Fence: use enum class for AltFrame enumeration 2019-03-19 10:31:18 +11:00
Michael du Breuil 281d3b1189 AC_Fence: check the return value of fetching the EKF origin 2019-03-12 08:27:42 +09:00
Peter Barker 8991fd8fcf AC_Fence: clear breaches if boundary invalid etc 2019-03-08 08:57:27 +09:00
Peter Barker 434f22cf40 AC_Fence: correct fence upload reload boundary trigger
The check in AC_Fence::check_fence_polygon is for boundary points, not
boundary loaded
2019-03-08 08:57:27 +09:00
Peter Barker c04d2145a1 AC_Fence: correct fence pre-arm position check 2019-03-07 11:42:39 +09:00
Dr.-Ing. Amilcar do Carmo Lucas f2ca3556cd AC_Fence: replace location_offset() and get_distance() function calls with Location object member function calls
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Peter Barker 7198234a44 AC_Fence: clean headers 2019-02-19 09:16:26 +11:00
Peter Barker 5448cfda80 AC_Fence: remove always-true contains_return_point parameter 2019-02-04 16:52:42 +09:00
Peter Barker a52a1f710f AC_Fence: add singleton (AP::fence()) 2019-01-31 13:44:29 +09:00
Peter Barker 6313cbca0b AC_Fence: stop taking reference to AHRS in constructor 2019-01-31 11:25:38 +09:00
chobitsfan e7f87f767a AC_Fence: add SmartRTL and Brake actions 2019-01-25 15:43:18 +09:00
Peter Barker 9deee2a805 AP_Fence: adjust for Location_Class and Location unification 2019-01-16 11:45:29 +11:00
Peter Barker c4bee518bb AC_Fence: rename send_extended_status1 to send_sys_status 2018-12-10 12:52:41 +09:00
Peter Barker 9c0bb9c47d AC_Fence: do not enable altitude fence on Rover by default 2018-10-30 12:10:42 +11:00
Randy Mackay 06aa29eb2a AC_Fence: get_polygon_points does not include return point 2018-10-26 14:38:04 +09:00
Raouf e55369b1c8 AC_Fence: add always land option 2018-07-26 10:08:45 +09:00
Steven Josefs e8debde4b7 AC_Fence: hide ALT_MAX parameter from Rover 2018-01-22 20:42:31 +09:00