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

Pre flight failure with Optical Flow on Ground #20929

Closed
AlexKlimaj opened this issue Jan 14, 2023 · 10 comments
Closed

Pre flight failure with Optical Flow on Ground #20929

AlexKlimaj opened this issue Jan 14, 2023 · 10 comments

Comments

@AlexKlimaj
Copy link
Member

AlexKlimaj commented Jan 14, 2023

In current main, with optical flow fusion enabled, I am unable to arm in altitude or position mode. If I take off in manual I am able to switch to altitude and position no problem.

On a larger quad with long landing gear, this issue doesn't present itself. It appears to be a problem with the optical flow close to the ground.

https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/ekf2/Utility/PreFlightChecker.cpp#L85-L91

image

@AlexKlimaj
Copy link
Member Author

#20940

@AlexKlimaj
Copy link
Member Author

It looks like this is still an issue that was introduced with this commit.
#20414

https://github.com/PX4/PX4-Autopilot/pull/20414/files#diff-a40788d784ca3877b825cbf025e2f84b154faf5182ae81a27defa625f27cffa3R943
Starts off with real values then goes INF pretty quickly.

 I0NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
0I.NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
.I0NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
0I0NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
0I0NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
0I0NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
0I0NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
0I      NFO  [ekf2] test_ratio_max: 0.00000     of_vel: 0.00006 vel: 0.00006
        IoNFO  [ekf2] test_ratio_max: 0.00000   of_vel: 0.00006 vel: 0.00006
oIfNFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
fI_NFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00006 vel: 0.00006
_IvNFO  [ekf2] test_ratio_max: 0.00308  of_vel: 0.05552 vel: 0.05552
vIeNIFO  [ekf2] test_ratio_max: 0.00003 of_vel: 0.00563 vel: 0.00563
eIlNNFO  [ekf2] test_ratio_max: 0.00003 of_vel: 0.00563 vel: 0.00563
lI:NFFO  [ekf2] test_ratio_max: 0.00006 of_vel: 0.00783 vel: 0.00783
:I NOFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
 I0N FO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
0.. 00004       vel: 0.00004
I0N[FO  [ekf2] test_ratio_max: inf      of_vel: inf     vel: inf
0IuNFO  [ekf2] test_ratio_max: 0.00000  of_vel: 0.00004 vel: 0.00004
I0NaFO  [ekf2] test_ratio_max: inf      of_vel: inf     vel: inf
II0NvFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
WARN  [health_and_arming_checks] Preflight Fail: velocity estimate error
N0FcO  [ekf2] test_ratioINFO  [ekf2] test_ratio_max: inf        of_vel: inf     vel: inf
_I      NaFO  [ekf2] test_ratio_max: inf        of_vel: inf     vel: inf
mIvNnFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
aex:: 0.00000   of_vel: 0.00004 vel: 0.00004
IlN1FO  [ekf2] test_ratio_max: inf      of_vel: inf     vel: inf
II:N2FO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
N F5O  [ekf2] test_ratio_max: 0.00000   of_vel: 0.00004 vel: 0.00004
I0N:FO  [ekf2] test_ratio_max: inf      of_vel: inf     vel: inf
II.NuFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
N0FaO  [ekf2]INFO  [ekf2] test_ratio_max: inf   of_vel: inf     vel: inf
 I0NvFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
tI0NcFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
e0sat_ratio_max: 0.00000        of_vel: 0.00004 vel: 0.00004
I0NnFO  [ekf2] test_ratio_max: inf      of_vel: inf     vel: inf
II
NnFO  [ekf2] test_ratio_max: inf        of_vel: inf     vel: inf
NIFNoFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
INFO  [ekf2] test_ratio_max: inf        of_vel: inf     vel: inf
OIINdFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf
 INNeFO  [ekf2] test_ratio_max: inf     of_vel: inf     vel: inf

@DronecodeBot
Copy link

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-april-04-2023/31415/1

@DronecodeBot
Copy link

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-april-11-2023/31524/1

@DronecodeBot
Copy link

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-may-02-2023/31955/1

@dirksavage88
Copy link
Contributor

dirksavage88 commented May 8, 2023

I'm seeing the "Preflight Fail: velocity estimate errors" when only using optical flow.

Using commit hash: 7eb6535

Pretty much the same optical flow issues in #21055

Is there a way around this for the time being, or just wait for the fix? For reference I'm using the Bitcraze flowdeck v2 (pmw3901) over SPI bus. I am able to see the optical flow sensor messages and have a vl53l1x distance sensor. Tried raising the drone 1m off the ground as you had done in #21358 but still getting constant spamming of velocity estimate errors in the system console.

Could the conditional rangefinder param (EKF2_RNG_CNTRL) be a factor here? I have it enabled but not conditional. Also no GPS to fall back on either, just optical flow and the distance sensor.

@junwoo091400
Copy link
Contributor

Is there a way around this for the time being, or just wait for the fix?

During a community qna call, @dagar hinted that we can have a quick safeguard fix to get around this issue. Could you comment on this?

@DronecodeBot
Copy link

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-may-23-2023/32245/1

@AlexKlimaj
Copy link
Member Author

#21769

@bresch
Copy link
Member

bresch commented Jul 20, 2023

Fixes merged

@bresch bresch closed this as completed Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants