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

EKF estimates diverge from the Rangefinder and EV inputs in Z-axis #1025

Open
canberkgurel opened this issue Jul 8, 2021 · 9 comments
Open

Comments

@canberkgurel
Copy link

The EKF2_AID_MASK is set to 24, EKF2_HGT_MODE is set to Range sensor.

The plot below shows what the problem is. Given what the EKF2_AID_MASK & EKF2_HGT_MODE are set to, the EKF must be using the rangefinder and the EV estimates (along with the FCU IMU) to generate the local_position/pose, which is diverging from the two inputs in Z-axis as the drone flies. The controller uses the local_position/pose to reach the given setpoints, as you'd expect, I'm observing a severe amount of drift in the altitude axis. In particular, the drone is too high between 15-50 and too low between 80-90 on the time axis. I ran this experiment many times (>35) and I'm seeing a similar pattern in every flight. Please find the attached ulg file.

@dagar @julianoes Any help is appreciated.

image

05cf0242-6e90-446d-8099-83d617e61a3e.zip

@dagar
Copy link
Member

dagar commented Jul 8, 2021

Uploaded to flight review for convenience. https://logs.px4.io/plot_app?log=c8fb4085-d231-41b8-9a2d-5d09b2f99881

Would you be able to try reproducing on v1.12? Quite a lot of work (and testing) has gone into ekf2 (ecl/EKF) since v1.11.

@canberkgurel
Copy link
Author

@dagar Thanks! That's good to know that there have been some improvements in the ecl/EKF. I know you've been working on creating a stable v1.12 release, last time I checked it was at the release candidate stage, I was planning to wait until the stable v1.12 release. Would you recommend the v1.12.0-rc1 for this experiment?

@garlinplus
Copy link

image
From this log,the terrain estimation may be not accurate.

@garlinplus
Copy link

garlinplus commented Jul 26, 2021

And the height sensor is baro,you can select ranger or ev as height estimation sensor.Terrain estimation is depending on baro and ranger.If baro has a drift,the terrain will be not accurate.

@canberkgurel
Copy link
Author

@garlinplus Hi! The EKF2_HGT_MODE is set to Rangefinder, and I have a Rangefinder that's plugged into the FCU. I confirmed that the data is coming thru by monitoring the distance measurements using the Mavlink Inspector. Are you saying that the drone wasn't using the Rangefinder, but rather it was switching to the Barometer?

@priseborough
Copy link
Collaborator

This log indicates an old version of the code - what version of the ecl EKF are you using?

@canberkgurel
Copy link
Author

@priseborough I believe the version of ecl EKF is ecl @ ec93490. I found the last PX4-Autopilot commit that the drone had and then looked up the corresponding ecl EKF commit.

Here is the commit link: https://github.com/PX4/ecl/tree/ec934908900b23ee273d1a9f82364b7b38423200

@m1baldwin
Copy link

Rangefinder is also showing initial condition of about 10-13cm estimated as the height of the sensor off the ground. This platform is the px4vision dev kit with a leddar One module used instead of the default altitude sensor that comes with the platform. Just wondering if this can be causing a problem?

Also, plots of the drone's estimated z-position compared to the z-setpoint shows the internal estimator and controls think the drone is achieving the correct behavior, but the rangefinder is showing that there is actually a "slope" to the height the drone has throughout the mission

@m1baldwin
Copy link

e.g.
image

vs.

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants