Servo output stops in FBW modes after GPS lock

After powering on and switching to FBWA mode, I see all the expected servo response when moving the airframe (A small foam flying wing)
Later, a few seconds after obtaining a GPS fix, and immediately after “EKF2 IMU0 is using GPS” is reported in the log, the servos center and no further changes in servo output are observed unless I switch to manual and move the stick. If I arm, the motor runs, but the servos don’t move.

I see the same behavior in RTL and Circle modes. Once the GPS gets a good lock, no more servo output.
This is not what I expected! Why does the autopilot seem to stop trying to stabilize the plane after GPS lock?

I’m currently running on a skyviper V2450GPS board set with code built from clean ArduPlane-3.9.4 source.
I’ve also ported Toy mode to ArduPlane, but this testing was with only Tools/Frame_params/SkyViper-2450GPS/defaults.parm modified from the released code.
I’ve been using and occasionally contributing bug fixes to arducopter for several years but this is my first plane, so please educate me. I must be missing something fundamental.

I have uploaded my defaults.parm file and a log with pre-arm logging enabled for reference here in case the answer is not obvious:
https://drive.google.com/open?id=1-6oT2F8qC8iTpgxiSjbYlUmv5fxEya0q

I’ve spent the last few days scanning the Arduplane Docs and trying various things, but I can’t see anything I’ve missed. Can someone clue me in?

Thanks!
–Brad

It’s been over a month with no response to this query. I would really appreciate it if someone could at least tell me if this behavior is normal. It’s certainly not what I expected. I’ve tried resetting all parameters to defaults. I tried updating to the latest master branch code. Nothing helps.

I thought it might be useful to be able to hand launch in FBWA mode but as soon as the GPS gets a fix, the servos stop responding to stick and attitude changes. I’ve been browsing the code and haven’t yet found the reason the system seems to stop trying to stabilize the plane once the the EKF starts using the GPS. I thought I might find code which disables servo output when the velocity is low, but though the integrator is indeed zeroed at very low speed and the deflection is scaled inversely with speed, I didn’t find any reason for the servo outputs to be clamped at center when the speed is zero.

Both EKF2 and EKF3 exhibit this behavior. I also tried setting AHRS_EKF_TYPE to 0. This restores the expected behavior with the servos operating as expected with or without a GPS fix but I’d like to use the EKF. What am I missing?

Thanks!

–Brad

sounds like you have broken something, it certainly behaves correctly in the stable release. Maybe you can try that.

Thanks for the response! Was 3.9.4 not considered a stable release? Which release do you suggest I try?

I thought I had broken something in the code as well, that’s why I also tested without my code changes (only defaults.parm was modified to account for use with servos instead of brushed motors).

Any other thoughts?

–Brad

not with toy-mode and changes to defaults.

I think the skyviper code has loads of stuff removed with ifdefs to make it fit. Could be that some stuff that is needed for plane is not there. I’m not even sure it has the ekf’s. Obviously plane code is not released for skyviper.

As I said, I also tested without toy mode and the only changes to the defaults were those I would have had to make anyway to work with servos and an ESC instead of the brushed motor outputs the V2450GPS board originally used.

The V2450GPS board runs the full copter code just fine. Yes, it has the ekf code built and it’s hard to imagine why there would be any board specific code which could cause this behavior . You may be thinking of the newer skyviper scout which has only half the ram.

Any other thoughts? As you said, there are no pre-built plane binaries for this board but I guess I can bench test a pre-built plane binary on the pixhawk I’m currently running copter on just to confirm it works there.

Thanks for at least confirming this is not the expected behavior for FBWA mode.

–Brad

I stand corrected, not really sure what else to suggest. Maybe you could build copter and confirm copter works as it should from your branch. Or as you say build plane for a different flight controller. I guess everything else works as it should when the gps gets singnal? ie the gps is not locking up everything?

Other people do run copter from the master branch on the V2450gps with no reported issues. I last ran the copter code built from my branch around the time I first posted this question, and it worked fine, both on the original airframe and on a larger home built quad with ESCs interfaced with voltage level shifters. My changes to add toy mode to plane touch no file outside of the ArduPlane directory and wouldn’t affect copter.

And yes, everything else seems to work even after the EKF starts to use the GPS. At that point, for example, I can arm and the throttle works to control the motor. It’s just the control surface servos that go quiet and respond to neither attitude changes or stick movements.

Thanks for your suggestions. I’ll let everyone know what I learn from testing on the Pixhawk 1.

–Brad