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

[Bug] Multi EKF vehicle local positions starting with large offset on quad indoors #24206

Open
patrikpordi opened this issue Jan 13, 2025 · 5 comments
Assignees

Comments

@patrikpordi
Copy link
Contributor

patrikpordi commented Jan 13, 2025

Describe the bug

I’ve been facing significant issues with quads using optical flow for localization indoors(no GPS and EKF2_HGT_REF=RANGE). The estimators have a large offset from each other(20-500 m), if the estimator switches the drones tries to compensate. It happens occasionally.

To Reproduce

Fly indoors with no GPS and EKF2_HGT_REF=RANGE in the latest main in position/offboard.

Expected behavior

If the estimator switches the drone should should stay where it is since the estimates should align.

Screenshot / Media

image
image

Flight Log

https://review.px4.io/plot_app?log=6c072e4a-e0aa-4a46-9833-78db51355d37
https://review.px4.io/plot_app?log=6e490f75-ed41-477a-9d91-771896215a7d

Software Version

Main

Flight controller

ARKV6X Flight Controller

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

I am also having issues with dist_bottom_valid behaving weirdly and invoking fail safe even though the drone seemed fine otherwise.

@patrikpordi patrikpordi changed the title [Bug] Multi EKF vehicle local positions starting with large offset on quad [Bug] Multi EKF vehicle local positions starting with large offset on quad indoors Jan 13, 2025
@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-sync-q-a-jan-15-2025/43274/3

@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-sync-q-a-jan-15-2025/43274/1

@patrikpordi
Copy link
Contributor Author

This is an offboard example, the drone is trying to takeoff, then the estimator switches and the drone jumps to the side
https://github.com/user-attachments/assets/d08212b3-de05-443a-b41e-0f8d2d4f6da9

@patrikpordi
Copy link
Contributor Author

I have investigated it more I think something is probably wrong with the optical flow math. I walked around with two different drones in the office.
Screenshot from 2025-01-14 10-00-55
Screenshot from 2025-01-14 10-09-13
Logs:
https://review.px4.io/plot_app?log=3c96872f-acd1-4f5f-bb4e-ae06cf65c081
https://review.px4.io/plot_app?log=2777fc99-72a0-4338-886a-ff27403c66d5

I also recorded a log with the GPS on, the same behavior is visible while the GPS is setting up, but it eventually gets resolved once the GPS got the signals.

Screenshot from 2025-01-14 10-23-34
Log:
https://review.px4.io/plot_app?log=3fc313f0-193a-405f-8798-7eadbbb54054

@patrikpordi
Copy link
Contributor Author

patrikpordi commented Jan 15, 2025

I have recorded three logs based on @dagar suggestions.
I rebooted the flight controller and did not move the drone before flying to get clean logs.
Taking off and flying in a circle with the radius of 2 m in manual mode and then switching to position.
In the first two cases the drone triggered failsafe when switching to position and if you check the logs you can see that the position estimates are blowing up.

Image

Setups:
EKF2_HGT_REF=RANGE and EKF2_RNG_CTRL=1
https://review.px4.io/plot_app?log=7f4b6b0c-074d-4512-b66e-8edef373ce94
EKF2_HGT_REF=RANGE and EKF2_RNG_CTRL=2
https://review.px4.io/plot_app?log=e9694d80-3fc4-40c7-a3c7-ea718ac1f4a6
EKF2_HGT_REF=Default and EKF2_RNG_CTRL=1
https://review.px4.io/plot_app?log=89041761-4655-4135-a31f-811554fd1ae2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

No branches or pull requests

4 participants