-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
ekf2: Move handling of invalid range finder data inside ecl library #12950
Conversation
The ecl library EKF is able to use vehicle motion and in-air status to better determine when the default on-ground range finder reading can be used. The description for the EKF2_MIN_RNG parameter has been updated to make its use clearer. Requires ecl at commit 267195a or later.
@nicovanduijn have you tested this? |
I've tested a combination of things, and was not very happy with the position hold (https://review.px4.io/plot_app?log=0a0d6b14-f9e7-4550-b083-5c74fae4103d) As to what's relevant to this PR, I think PX4/PX4-ECL#640 will be required for this to have any effect at all |
Height above ground before takeoff and after climbout is correct. The issue is the combined inertial and Baro errors during the transition period which results in an initial incorrect height above ground estimate before range finder data is used. Poor position hold post climbout is a separate issue give that the estimated bottom distance is correct and shouldn't be a reason for blocking this PR. The ground motion test inside ecl is there to ensure fusion of the 'faked' range finder measurement stops when takeoff starts if vehicle_land_detected.landed transition to false is delayed. This may cause more issues than it solves for vehicle that are subject to on ground vibration induced by wind and other external disturbances . Because vehicle_land_detected.landed message goes false at takeoff without delay, I would support removal of the check. |
@nicovanduijn I just noticed in your log that you have set EKF2_RNG_AID = 1. Given a range finder that doesn't work until after takeoff and a baro altitude that is subject to significant propeller disturbance, this is causing issues with setting of the baro offset during takeoff. Other options are to set EKF2_RNG_AID = 0 and either enable terrain hold in the position controller instead by setting MPC_ALT_MODE = 2 or force the EKF to use range finder as the default sensor by setting EKF2_HGT_MODE = 2. The combination of a range finder that doesn't read on the ground and a noisy baro sensor with a metre of offset when flying out of ground effect makes switching between range finder and baro problematic. |
until priseborough's and nicovanduijn's pr #12950
until priseborough's and nicovanduijn's pr #12950
I think the issues I was seeing with poor performance are unrelated to this PR:
Bottom line: if @priseborough agrees, LGTM |
Flight test with a rebased version of this: Two things, both unlikely to be related to this PR:
Not sure yet what caused the second one. |
Merged in #12988 |
PX4/Firmware side of PX4/PX4-ECL#639 change
The ecl library EKF is able to use vehicle motion and in-air status to better determine when the default on-ground range finder reading can be used.
The description for the EKF2_MIN_RNG parameter has been updated to make its use clearer.
Requires ecl at commit 267195a or later.
TODO testing with this PX4/Firmware version