Skip to content
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

Filter ekf variances for failsafe and vibration checks #25621

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

andyp1per
Copy link
Collaborator

From a discussion with @priseborough

@rmackay9
Copy link
Contributor

One important fix but otherwise this looks pretty good to me. We should test the impact of the filtering on the EKF failsafe and vibration failsafe. Knowing how much further or higher the vehicle flies by the slight delay in triggering of the failsafe would be good to know.

@andyp1per andyp1per marked this pull request as ready for review November 26, 2023 12:30
tridge
tridge previously requested changes Jan 1, 2024
@MichelleRos
Copy link
Contributor

MichelleRos commented Jan 1, 2024

I did a test flight of this over the weekend, but my GPS was performing quite poorly for some reason, so it actually EKF failsafed during the flight, but I don't think that's to do with this PR, but I don't think that flight was really a valid test of this PR.

I do think that it would be better if this type of thing was in vehicle or the EKF rather than Copter, though, since EKF changes really should be applied to all vehicles.

This won't affect the frequent lane switching though, will it?

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Jan 2, 2024
@tridge
Copy link
Contributor

tridge commented Jan 3, 2024

waiting for test results!

vel_var = vel_variance_filt.apply(vel_var, dt);
height_var = hgt_variance_filt.apply(height_var, dt);

last_ekf_check_us = now_us;
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: could move this up below the calculation of dt just to keep it close to related calculations.

@rmackay9 rmackay9 dismissed tridge’s stale review February 7, 2024 04:59

Tridge's requests have been addressed.

@rmackay9
Copy link
Contributor

rmackay9 commented Feb 7, 2024

I've tested the vibration failsafe with this PR and it seems to act the same as now. I also think that if FS_EKF_FILT is set to 0 then it should act exactly like master right? so we have that easy backout if required.

Basically I'm happy with this going in. Perhaps we should consider doing the same for Rover but that's not a blocker for this PR.

@andyp1per
Copy link
Collaborator Author

I also think that if FS_EKF_FILT is set to 0 then it should act exactly like master right?

Yes, right

@tridge tridge removed the DevCallEU label Feb 7, 2024
add a parameter to control EKF failsafe filtering
@andyp1per
Copy link
Collaborator Author

Ideally this would go into 4.5.1 - not sure what you think @rmackay9

@rmackay9
Copy link
Contributor

rmackay9 commented Feb 7, 2024

@andyp1per, sure, we're still pretty early in the beta..

@IamPete1 IamPete1 merged commit 780045e into ArduPilot:master Feb 7, 2024
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 4.5.0-beta2
Development

Successfully merging this pull request may close these issues.

7 participants