Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

EKF: Improve robustness of yaw reset to bad inertial data #914

Merged
merged 6 commits into from Oct 6, 2020

Conversation

priseborough
Copy link
Collaborator

@priseborough priseborough commented Oct 4, 2020

Preliminary response to the corner case highlighted by https://discuss.px4.io/t/estimator-failure/18790

Testing to date limited to a basic test in SITL with the mag data rotated 180 deg to induce a flyaway, yaw reset and recovery sequence - https://review.px4.io/plot_app?log=b9381141-21c1-4401-af2f-4639690dea49

EKF-GSF convergence
Screen Shot 2020-10-04 at 8 38 05 pm

Further testing is required including a way to simulate the clipping behaviour case encountered.

Another PR forthe PX4/Firmware ekf2 module to change setting of _ekf.set_in_air_status(!_vehicle_land_detected.landed) is recommended to ensure the EKF-GSF activates earlier.

@priseborough
Copy link
Collaborator Author

TODO - update comparison file for reversion diff test.

EKF/control.cpp Outdated Show resolved Hide resolved
EKF/EKFGSF_yaw.cpp Outdated Show resolved Hide resolved
Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, looks good now. However, why is this changing the output of the standard change indicator? If there is no emergency yaw reset, nothing should change.

@priseborough
Copy link
Collaborator Author

priseborough commented Oct 6, 2020

I can't explain that. Maybe it's the compiler version. I was building from a Ubuntu 20.04 machine when I updated the change indicator files.

Edit: Checking back to the CI test result before I pushed the update change indicator files https://github.com/PX4/ecl/runs/1208622495 shows that only the ekf_gsf_reset.csv file was generating a diff.

@priseborough
Copy link
Collaborator Author

There is a time delay between the landed flag going false and the EKF-GSF logging starting, see below. Thinking about this some more, some of the delay can be explained by the fact that the EKF-GSF yaw estimator is running on the same delayed fusion time horizon as the main navigation EKF loop which can introduce a delay of up to 200msec. A further 200msec can be explained by the 200Hz logging rate for EKF-GSF data and a further 200msec by the GPS update rate as the EKF-GSF won't initialise until the next fresh GPS sample is available, then has to wait a further 200msec for the next GPS measurement which explains the majority of the delay.

No further investigation of options for setting theEKF's in-air status earlier is warranted at this time.

Screen Shot 2020-10-06 at 8 15 59 pm

@priseborough priseborough merged commit f666ebb into master Oct 6, 2020
@priseborough priseborough deleted the pr-gsfBugFix branch October 6, 2020 09:50
dagar added a commit to PX4/PX4-Autopilot that referenced this pull request Nov 12, 2020
 - ecl/EKF: Improve robustness of yaw reset to bad inertial data (PX4/PX4-ECL#914)
 - ecl/EKF: Use strength in Gauss (bug fix) (PX4/PX4-ECL#933)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants