-
Notifications
You must be signed in to change notification settings - Fork 16.8k
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
Copter: EKF3 still initialising pre-arm message when trying to arm with no compass (attempt2) #16094
Comments
@priseborough I can also still reproduce this. Happy to try and get a replay log if it will help. |
Here a log with master ArduCopter V4.1.0-dev (4dc5162) on OmnibusNanoV6 LOG_REPLAY=1 https://drive.google.com/file/d/1McLge3sId_26OQb7iSStFRMaKVcw70Bg/view?usp=sharing |
maybe we need this code in EKF3? |
Looks like this fixes it for me! I have created a PR. |
@rmackay9, further investigation of the log you posted shows the issue is that the vertical position innovations for the second EKF instance go outside the 1m limit set for on-ground operation. The inclusion of the patch from #16314 does successfully reset this behaviour, see graph from replay below comparing vertical position (baro innovation) and estimted Z accel bias for the original [1] and replayed [101] EKF data. There is step in the baro before which does coincide with the change to BARO1_GND_PRES and a arming event. This does cause a jump in innovations which should be avoided, but this is not the underlying issue. I'll keep picking away at that log. |
So hopefully here is an example replay log with yaw drift: I also videoed it: |
@rmackay9 @priseborough here is a replay log with EKF3 and severe yaw draft on a copter without a compass. The copter has rotated by a full 180 by the end of the log. It was a little difficult to keep it airborne due to DPS310 baro issues: I also tried to do an EKF2 log for comparison, not sure its as good: |
@rmackay9 I've been through the log you shared with this issue and also replayed it and can't find an internal issue with the EKF for IMU0. The XKF4.SS is 65701 or 0001 0000 0000 1010 0101 which means the following solution status flags are true which is consistent with the sensors being used.
However the EKF using the second IMU does drop to a solution status of zero due to the vertical position innovation exceeding check limits: Replaying with master shows that the error in the EKF using the second IMU does disappear after the automatic reset, so there have been changes made since the log was generated that improve this behaviour, eg: Interestingly the second IMU has a significant Z accel bias error of 0.4 m/s/s, eg: Including the patch from #16842 makes no difference to the replay using master. |
My issues appear to be fixed by #16842 |
It looks like the source issue is the on ground not moving check used to constrain yaw drift when on ground and enable learning of the yaw bias before flight is too stringent for the noisier IMU's. I'm now in the process of enabling logging of the check metrics when required for each EKF instance and adding a parameter enabling it to be adjusted if necessary. |
I've pushed a couple of additional patches to #16842 which solve the failure of the second EKF in @rmackay9 's log to detect the on ground not moving condition. This adds a parameter enabling the sensitivity fo the test to be adjusted. @rmackay9 can you check if #16842 resolves the issue with your board. |
@andyp1per Your yaw spin issue was caused by the EKF trying to learn gyro biases when fusing in the 'fake' position measurements that are used to stop roll/pitch angle error buildup. Any axis aligned with the gravity vector is inherently unobservable unless an external source of horizontal position or velocity is being used . I've added a couple fo patches that fix this behaviour. Here are obtained by replaying your log at commit dff864a The replayed data [100] vs the original data [1] shows: The EKF yaw angle is consistent with the observed yaw spin: The estimated yaw gyro bias doesn't keep building up: The X and Y gyro bias estimates look sensible: |
Oh very nice @priseborough - thanks so much! |
Fixed by #16842 |
This is a follow-up to issue #15967 which may have actually been two separate issues one of which is now fixed.
The issue is that "EKF3 still initialising" may appear if both the compass and GPS are disabled. I was able to reproduce the issue (once) on a CubeBlack by doing this:
I've placed a replay log here: https://www.dropbox.com/s/g6pn8ijcg8jof5f/randy-ekf3-still-initialising-master-18Dec2020.bin?dl=0
FYI @andyp1per
The text was updated successfully, but these errors were encountered: