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

EKf3: control scaling while using Optical Flow leads to drift in high winds #28242

Open
rmackay9 opened this issue Sep 26, 2024 · 0 comments
Open

Comments

@rmackay9
Copy link
Contributor

rmackay9 commented Sep 26, 2024

When the EKF uses optical flow it provides a control scaler which is used by the position controller to limit the velocity feed-forward and acceleration. This works OK in calm conditions but if the wind is strong enough the control outputs are not enough to allow the vehicle to control its position and it drifts away

This can be reproduced in SITL by doing the following:

  • use sim_vehicle.py to start a Copter
  • load the copter-optflow.parm file and restart SITL (some instructions on the wiki here)
  • param set RNGFND1_MAX_CM 7000
  • param set SIM_WIND_SPD 10
  • arm and takeoff to 50m and note that the vehicle drifts
  • map set showsimpos 1 (<-- to prove that the EKF is estimating the position correctly, it's the controller's that can't keep up)

AC_PositionControl consumes the EKF3 control limits here

This issue is based on this discussion

To solve this issue we have at least three choices:

  • add a bit to an option parameter to allow disabling the control limiting. PSC_OPTIONS (which doesn't exist yet) would be the most obvious place but other alterantives include FLOW_OPTIONS, EK3_SRC_OPTIONS or EK3_OPTIONS.
  • completely remove the EKF3 feature to impact the position controller scaling. This is very old code and it's unusual for the control and estimation systems to tell each other what to do
  • find a better method for the position controller to limit its response so that the flow sensor is not overwhelmed. this could include moving some code out of the EKF
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

1 participant