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

manual control selection and cleanup #17404

Merged
merged 90 commits into from
Nov 9, 2021
Merged

Commits on Nov 8, 2021

  1. [WIP] manual_control selector hacks

    dagar authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    025de50 View commit details
    Browse the repository at this point in the history
  2. ROMFS: start manual_control for SITL

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    67dd62c View commit details
    Browse the repository at this point in the history
  3. manual_control: add selector class [WIP]

    This adds a selector class with unit tests.
    The idea is to have a valid flag in manual_control_septoint and set that
    according to the selection and/or timeout of manual_control_inputs.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    c0fd9a4 View commit details
    Browse the repository at this point in the history
  4. rc_update: rename update method

    This reflects better what it actually does.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    2aa6243 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    427f3a3 View commit details
    Browse the repository at this point in the history
  6. manual_control: add instance to selector

    This instance is then used to schedule the callback for the
    subscription.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    9b3e51b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    74fe748 View commit details
    Browse the repository at this point in the history
  8. manual_control: move override detection

    This also removes the option to ignore throttle for the override
    detection as it's not really required anymore.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    8ef0b2f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7b88a45 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e0a89bb View commit details
    Browse the repository at this point in the history
  11. Fix style

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    0abe7fa View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    46ffdc4 View commit details
    Browse the repository at this point in the history
  13. mavlink: remove unused methods

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    2cd54e5 View commit details
    Browse the repository at this point in the history
  14. commander: move main_state_transition out

    This is a first step to having a desired main state.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    34964e0 View commit details
    Browse the repository at this point in the history
  15. commander: only move to POSCTL when armed

    I don't think we want to switch to POSCTL when the sticks are moved when
    armed.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    e1f2798 View commit details
    Browse the repository at this point in the history
  16. manual_control: send initial mode in the beginning

    In order for commander to know the desired mode we need to send the
    initial position of the mode slot.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    0d3c786 View commit details
    Browse the repository at this point in the history
  17. commander: move valid mission check inside

    I think it makes more sense to move this check inside of
    main_state_transition.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    33deed7 View commit details
    Browse the repository at this point in the history
  18. commander: always reset posvel validity

    I assume reseting posvel validity is ok for any case, not just all cases
    except manual, acro, stabilized.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    bc9c4d9 View commit details
    Browse the repository at this point in the history
  19. commander: add desired main state

    This is an intermediate solution to carry forward the initial state of
    the mode slot. Basically, it allows that we start up in Stabilized but
    switch to POSCTL as soon we have the required GPS.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    4d27a00 View commit details
    Browse the repository at this point in the history
  20. commander: move manual_control and switches out

    This moves the remaining handling of the manual control stuff out
    of commander. All communication between manual control now goes through
    vehicle commands, and the landing gear topic.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    2b6513f View commit details
    Browse the repository at this point in the history
  21. manual_control: use filter to check user override

    Instead of only looking at the diff between two RC samples to decide
    whether a user wants to override, we now look at the filtered diff over
    one second. This should be more robust to RC sent at various or varying
    rates.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    6f891ce View commit details
    Browse the repository at this point in the history
  22. commander: only override according to param

    This got lost in the refactor earlier.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    a0a1316 View commit details
    Browse the repository at this point in the history
  23. manual_control: ORBIT and PRECLAND not supported

    ORBIT and PRECLAND are not actually possible on the flight mode switch.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    762dee4 View commit details
    Browse the repository at this point in the history
  24. manual_control: support arming button

    The arming button required some refactoring in order to support to
    toggle arm/disarm using the vehicle_command. Otherwise manual_control
    would have to subscribe to the arming topic and we would spread out the
    logic again, and risk race conditions.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    b9a27ea View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    bebdb46 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    b072a41 View commit details
    Browse the repository at this point in the history
  27. msg: whitespace only

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    18f315f View commit details
    Browse the repository at this point in the history
  28. msg: re-use manual_control_input in setpoint

    This way we avoid duplication between manual_control_input and
    manual_control_setpoint.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    d74edad View commit details
    Browse the repository at this point in the history
  29. ROMFS: whitespace

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    eb02420 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    d0fb4f0 View commit details
    Browse the repository at this point in the history
  31. manual_control: add reset to diff

    This should prevent triggering user override right after RC re-appears.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    0758872 View commit details
    Browse the repository at this point in the history
  32. manual_control: update first, get diff after

    Not sure why I had this the wrong way round.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    6c1d5fc View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    1f992d9 View commit details
    Browse the repository at this point in the history
  34. manual_control: handle NAN

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    00c1079 View commit details
    Browse the repository at this point in the history
  35. commander: add valid check

    Better checking once too much than once too little.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    5c23655 View commit details
    Browse the repository at this point in the history
  36. manual_control: fix tests

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    79fb31d View commit details
    Browse the repository at this point in the history
  37. ManualControlSelectorTest: add constantly outdated samples case

    Reviewing the code I saw this case arising from the order things
    get checked.
    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    d61f989 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    9c74b2c View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    55e54e5 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    5ce7ef2 View commit details
    Browse the repository at this point in the history
  41. manual_control: don't switch gear on first init

    This will ignore the first transition from NONE to something.
    This matches the behaviour that existed before.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    9470132 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    068ec5b View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    ee1bca5 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    3fa0a39 View commit details
    Browse the repository at this point in the history
  45. manual_control: method can be static

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    175b124 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    879c6d2 View commit details
    Browse the repository at this point in the history
  47. manual_control: add missing 7

    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    0661e01 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    49115bb View commit details
    Browse the repository at this point in the history
  49. mc_rate_control: always allow landing gear control

    Except of course when landed and we try to put it up.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    f72c8a7 View commit details
    Browse the repository at this point in the history
  50. commander: remove unused mode/main_state methods

    With the previous changes these seem no longer required.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    dfa51a5 View commit details
    Browse the repository at this point in the history
  51. commander/manual_control: use msg enum for params

    Instead of using a private enum class we should define the enum in the
    vehicle_command message and then use it consistently.
    julianoes authored and MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    e138b9d View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    414cdef View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    455a200 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    493888c View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    9cfc29f View commit details
    Browse the repository at this point in the history
  56. state_machine_helper: rever explicitly handling unavaialble mission

    It was already handled by the existing condition.
    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    87d2fa2 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    6158e02 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    0c999d1 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    381ef7f View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    0bc7586 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    843480b View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    8eb181b View commit details
    Browse the repository at this point in the history
  63. Commander: don't publish RC_IN_MODE to vehicle_status

    This just contains the content of the parameter which
    is redundant and results in multiple sources of truth.
    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    d28fd54 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    82ce058 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    3bf0ce8 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    5b5e4fb View commit details
    Browse the repository at this point in the history
  67. ManualControl: fix arm button logic during testing

    The latching logic has to be different than for the arm switch
    this difference got lost in the rewrite of the old obfuscated
    arming trigger logic.
    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    47e1ae3 View commit details
    Browse the repository at this point in the history
  68. ManualControlSelector: simplification refactoring

    - clang tidy did't like {bool} == true in a condition
    - setpoint_from_input() got small enough ot just put in line
    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    694e389 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    9a6a49c View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    a3e38e4 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    c2dfd06 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    ba7a745 View commit details
    Browse the repository at this point in the history
  73. Replace arm_request and mode_request with combined action_request

    Which saves flash space, log size and is extensible to handle e.g.
    the VTOL transition and future actions.
    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    f81b5cb View commit details
    Browse the repository at this point in the history
  74. Commander: fix "Manual control lost" showing double in QGC

    because of the missing tab in the deprecated message.
    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    8f144d9 View commit details
    Browse the repository at this point in the history
  75. Configuration menu
    Copy the full SHA
    8f3d2cf View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    9bd18d9 View commit details
    Browse the repository at this point in the history
  77. Configuration menu
    Copy the full SHA
    292c5ab View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    c3439ec View commit details
    Browse the repository at this point in the history
  79. Fix landing gear processing

    MaEtUgR committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    f980603 View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    4510675 View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    53dfe0e View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    ec1f1f7 View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    fe27469 View commit details
    Browse the repository at this point in the history
  84. Configuration menu
    Copy the full SHA
    545be15 View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    bb6a608 View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    9293c03 View commit details
    Browse the repository at this point in the history
  87. Configuration menu
    Copy the full SHA
    0f82b49 View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    effc78c View commit details
    Browse the repository at this point in the history
  89. Configuration menu
    Copy the full SHA
    39ec0d0 View commit details
    Browse the repository at this point in the history
  90. Configuration menu
    Copy the full SHA
    f6421f5 View commit details
    Browse the repository at this point in the history