Skip to content

Something we don't monitor blocking arming on early startup #371

Closed

Description

@hamishwillee

The normal "arm and takeoff" code (as per simple_goto.py example) checks that state is not initialising and that we have a good GPS fix. Then it changes the mode to GUIDED and tries to arm the vehicle.

On the Windows Copter 3.3 dronekit-sitl build this script successfully arms and takes off if you've waited a bit or already connected to mission planner. However if you start the script shortly after the simulator it never arms. This means that there is something the autopilot is waiting on before we can arm - if you call the command to ARM before this "thing" completes the device will never arm.

If you add a delay of around 8 seconds after the vehicle changes to guided, but before calling ARM then the vehicle will ARM. If you just call ARM repeatedly in the loop while waiting for it to arm this also works. To me this again indicates that there is something that we need to wait on before calling ARM.

Any ideas what it might be? The "easy" solution for the example is to just set arm to true in the loop - but this is pretty crap - much better to identify whatever pre-arm condition is stopping us from proceeding.

Thoughts?

Activity

  1. tcr3dr commented on Nov 3, 2015

    @tcr3dr
    Contributor

    This is related to #406 and a question I posed here: https://gitter.im/diydrones/ardupilot?at=56390d46a530033014e3ef33

    Basically armed fails due to >> PreArm: EKF warmup preventing arming from taking off. I'm trying to figure out which condition this is so we can wait on it.

    (Note this does not trigger in Copter 3.3-rc5.)

  2. hamishwillee commented on Nov 3, 2015

    @hamishwillee
    ContributorAuthor

    Great, thanks. What do you mean by "does not trigger"?

  3. tcr3dr commented on Nov 3, 2015

    @tcr3dr
    Contributor

    Rather, this is not an issue on Copter 3.3-rc5 (for whatever reason). Not relevant, just a note to why I wasn't seeing it.

  4. hamishwillee commented on Nov 3, 2015

    @hamishwillee
    ContributorAuthor

    Presumably the check still occurs. If it isn't blocking us, that almost certainly means that our test code for arming isn't running until after this check ... so perhaps some of the waits (for parameters etc) are now longer. This sort of thing scares me - hidden potential race conditions.

  5. tcr3dr commented on Nov 7, 2015

    @tcr3dr
    Contributor

    See #430.

  6. modified the milestone: v2.0.0 on Nov 10, 2015
  7. tcr3dr commented on Nov 11, 2015

    @tcr3dr
    Contributor

    #430 has been merged, giving us a generic way to wait for arming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions