Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArduPlane: add AC_Fence for QGC4.0 Geofence Support #15288

Merged
merged 57 commits into from Mar 5, 2021

Commits on Mar 3, 2021

  1. ArduPlane: Add support for AC_Fence

    ArduPlane: Remove some geofence logic from ArduPlane
    
    ArduPlane: Refactor action and mode return implementation
    
    ArduPlane: Use polyfence to find the return point.
    joshanne committed Mar 3, 2021
    Copy the full SHA
    4a8e0c2 View commit details
    Browse the repository at this point in the history
  2. 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
    joshanne committed Mar 3, 2021
    Copy the full SHA
    775a4e7 View commit details
    Browse the repository at this point in the history
  3. AP_Arming: Enable and Disable the fence when vehicle is armed/disarmed

    AP_Arming: Use auto enable flag to arm fence only when armed (as per enum)
    
    AP_Arming: Config defines are not available in AP_Arming
    
    Since config definitions are not available in AP_Arming, we can still rely on singleton access of the AC_Fence object.
    
    AP_Arming: Perform fence checks for all vehicles
    joshanne committed Mar 3, 2021
    Copy the full SHA
    06be2d6 View commit details
    Browse the repository at this point in the history
  4. GCS_MAVLink: Add reporting of fence floor breaches to GCS_MAVLink

    GCS_MAVLink: Add disabling of fence floor only, per mavlink spec
    
    GCS_MAVLink: Cannot enable a fence if the fence is not present
    joshanne committed Mar 3, 2021
    Copy the full SHA
    749e0fb View commit details
    Browse the repository at this point in the history
  5. Autotest: Fence is present, but test looking for not present

    Autotest: Remove ties to mavlink FENCE_ACTION
    
    Autotest: Add ArduPlane autotest to test ceiling and floor
    
    Adds a test to ensure the vehicle reverts to RTL when breaching a ceiling or floor.
    
    Autotest: Progress the test once we reach takeoff complete and fence enable
    
    Autotest: Use RC_OPTION for Aux Switch functionality
    
    Autotest: Enable fence last
    joshanne committed Mar 3, 2021
    Copy the full SHA
    2617c71 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    14faa9a View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    d8de064 View commit details
    Browse the repository at this point in the history
  8. ArduPlane: Remove all unused geofence capability

    ArduPlane: Remove missed geofence logic
    joshanne committed Mar 3, 2021
    Copy the full SHA
    65e4500 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    461073d View commit details
    Browse the repository at this point in the history
  10. Copy the full SHA
    366d353 View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    53dcb89 View commit details
    Browse the repository at this point in the history
  12. Autotest: Correct the logic for fence based autotest functions

    Adds corrections to enabling fence using aux function.
    Correctly test fences statically. Only uploaded fences can be checked using a fence file, so we check those first. Then we add steps to check tin can, max and minm all set the fence as present, as expected.
    Plane will support MAV_PROTOCOL_CAPABILITY_MISSION_FENCE, so we assert that it does support it.
    To test ceiling and floor, leverage some existing functions for takeoff, change altitude and land. Check for respective breach.
    Add a floor breach check to copter.
    joshanne committed Mar 3, 2021
    Copy the full SHA
    26f9e7a View commit details
    Browse the repository at this point in the history
  13. Autotest: fix two copter tests after parameter rename

    I'm not sure if a better fix would be to remove the set_parameter() call
    amilcarlucas authored and joshanne committed Mar 3, 2021
    Copy the full SHA
    a989682 View commit details
    Browse the repository at this point in the history
  14. 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
    amilcarlucas authored and joshanne committed Mar 3, 2021
    Copy the full SHA
    49aeb2a View commit details
    Browse the repository at this point in the history
  15. Copy the full SHA
    49765c1 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    d428c3a View commit details
    Browse the repository at this point in the history
  17. Autotest: activate the fence via a mavlink command

    This should not be required in the future, please fix this and revert this commit
    amilcarlucas authored and joshanne committed Mar 3, 2021
    Copy the full SHA
    92b5a74 View commit details
    Browse the repository at this point in the history
  18. Copy the full SHA
    9ad24f1 View commit details
    Browse the repository at this point in the history
  19. Copy the full SHA
    88be28f View commit details
    Browse the repository at this point in the history
  20. AC_Fence: extend pre-arm checks

    Fix comments
    amilcarlucas authored and joshanne committed Mar 3, 2021
    Copy the full SHA
    5d2dc24 View commit details
    Browse the repository at this point in the history
  21. AC_Fence: adjusted AP_GROUPINFO to contain all copters

    Steven Josefs authored and joshanne committed Mar 3, 2021
    Copy the full SHA
    afd427a View commit details
    Browse the repository at this point in the history
  22. Copy the full SHA
    b55977f View commit details
    Browse the repository at this point in the history
  23. Copy the full SHA
    53c747a View commit details
    Browse the repository at this point in the history
  24. Copy the full SHA
    9332df2 View commit details
    Browse the repository at this point in the history
  25. Copy the full SHA
    2b35c03 View commit details
    Browse the repository at this point in the history
  26. AutoTest: Adds additional tests to ArduCopter to test autoenable and …

    …floor
    
    Adds tests for:
    * Testing auto-enable disabled (when no autoenabling of the fence is required)
    * Test auto-enabled always after takeoff (when takeoff complete condition met)
    * Test auto-enabled disable floor only (when land sequence begins)
    * Test auto- on arm/disarm (when vehicle is armed/disarmed)
    * Tests ability to land when fence is breached
    joshanne committed Mar 3, 2021
    Copy the full SHA
    950a06e View commit details
    Browse the repository at this point in the history
  27. Copy the full SHA
    17ebbb0 View commit details
    Browse the repository at this point in the history
  28. Copy the full SHA
    4fddbb9 View commit details
    Browse the repository at this point in the history
  29. Copy the full SHA
    c61820d View commit details
    Browse the repository at this point in the history
  30. Copy the full SHA
    cdafe7b View commit details
    Browse the repository at this point in the history
  31. Copy the full SHA
    96a6790 View commit details
    Browse the repository at this point in the history
  32. Copy the full SHA
    36e0732 View commit details
    Browse the repository at this point in the history
  33. Copy the full SHA
    270e9f3 View commit details
    Browse the repository at this point in the history
  34. Copy the full SHA
    fbefdd7 View commit details
    Browse the repository at this point in the history
  35. Copy the full SHA
    c9ed28c View commit details
    Browse the repository at this point in the history
  36. Copy the full SHA
    34d67f5 View commit details
    Browse the repository at this point in the history
  37. Copy the full SHA
    3dcfc72 View commit details
    Browse the repository at this point in the history
  38. Copy the full SHA
    26d8e07 View commit details
    Browse the repository at this point in the history
  39. Copy the full SHA
    266e993 View commit details
    Browse the repository at this point in the history
  40. Copy the full SHA
    ebd3c2b View commit details
    Browse the repository at this point in the history
  41. Copy the full SHA
    1eeff52 View commit details
    Browse the repository at this point in the history
  42. ArduCopter: Remove fence_checks in AP_Arming because they are common …

    …across all vehicles now
    joshanne committed Mar 3, 2021
    Copy the full SHA
    50b32b7 View commit details
    Browse the repository at this point in the history
  43. ArduRover: Remove fence_checks in AP_Arming because they are common a…

    …cross all vehicles now
    joshanne committed Mar 3, 2021
    Copy the full SHA
    b923b2f View commit details
    Browse the repository at this point in the history
  44. Copy the full SHA
    6319d04 View commit details
    Browse the repository at this point in the history
  45. Copy the full SHA
    30667c6 View commit details
    Browse the repository at this point in the history
  46. AutoTest: Ensure fence state is disabled at end of test

    This appears to be another case of the fence state carrying over from one test to another. Disabling the fence at the end of the test appears to have fixed this problem
    joshanne committed Mar 3, 2021
    Copy the full SHA
    be7dc57 View commit details
    Browse the repository at this point in the history
  47. Copy the full SHA
    423f08d View commit details
    Browse the repository at this point in the history
  48. Copy the full SHA
    3a8fdae View commit details
    Browse the repository at this point in the history
  49. ArduPlane: Retrigger fence breach if mode

    ArduPlane: Move auto enabling code to common fence library
    joshanne committed Mar 3, 2021
    Copy the full SHA
    aec87e1 View commit details
    Browse the repository at this point in the history
  50. Copy the full SHA
    60205be View commit details
    Browse the repository at this point in the history
  51. Copy the full SHA
    b5c8cdd View commit details
    Browse the repository at this point in the history
  52. Copy the full SHA
    ea098e7 View commit details
    Browse the repository at this point in the history
  53. AutoTest: Copter remove FENCE_AUTOENABLE tests

    Addresses comments made in review, removes the FENCE_AUTOENABLE param for copter.
    No param means no tests required.
    joshanne committed Mar 3, 2021
    Copy the full SHA
    b078960 View commit details
    Browse the repository at this point in the history
  54. Copy the full SHA
    baca85d View commit details
    Browse the repository at this point in the history
  55. ArduPlane: corrections to returning to the previous mode if fence was…

    … disabled while under action
    joshanne committed Mar 3, 2021
    Copy the full SHA
    199d953 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2021

  1. Copy the full SHA
    4c3009f View commit details
    Browse the repository at this point in the history
  2. AutoTest: Adds additional autotests to capture mode change while brea…

    …ched
    
    AutoTest: Adds test for fence breach switching to guided mode when no fence return point is present. In upstream, this results in a vehicle fly-away.
    joshanne committed Mar 4, 2021
    Copy the full SHA
    44d4033 View commit details
    Browse the repository at this point in the history