You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Something we don't monitor blocking arming on early startup #371
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.
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.
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.
Activity
tcr3dr commentedon Nov 3, 2015
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 warmuppreventing 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.)
hamishwillee commentedon Nov 3, 2015
Great, thanks. What do you mean by "does not trigger"?
tcr3dr commentedon Nov 3, 2015
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.
hamishwillee commentedon Nov 3, 2015
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.
tcr3dr commentedon Nov 7, 2015
See #430.
tcr3dr commentedon Nov 11, 2015
#430 has been merged, giving us a generic way to wait for arming.