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

Improve EKF alt-hold with VL53 sensor #190

Closed
ataffanel opened this issue Jan 12, 2017 · 1 comment
Closed

Improve EKF alt-hold with VL53 sensor #190

ataffanel opened this issue Jan 12, 2017 · 1 comment
Milestone

Comments

@ataffanel
Copy link
Member

When flying with the VL53 time of flight sensor facing down and the EKF (see #174), the EKF is trying to correct roll and pitch even though there is not information available for X and Y.

Another problem is that the velocity output of the EKF has a drift which makes the Crazyflie slowly go down.

The first problem could be solved by decoupling X,Y,PX and PY states from the EKF like so:

# Pseudo code by Mike Hamer
for i in [STATE_X, STATE_PX, STATE_Y and STATE_PY]:
  # set all covariances 0
  for j in ALL_STATES:
    S[i][j] = 0

  # set state variance maximum
  P[i][i] = MAX_COVARIANCE
  # set state zero
  X[i] = 0
ataffanel added a commit that referenced this issue Jan 12, 2017
Helps flying manually with a ranging sensor for only Z. Can
be enabled by adding in config.mk:

ESTIMATOR=kalman
CFLAGS += -DUPDATE_KALMAN_WITH_RANGING -DKALMAN_DECOUPLE_XY
@ataffanel
Copy link
Member Author

The commit 2b0958d implements the pseudo-code from @mikehamer and it works fine. It is still implemented as a compile flag and might need to be done automatically in the future (like disabling X/Y/Z by default and enabling them only if some meaningful sensor update enters the EKF).

ataffanel added a commit that referenced this issue Jan 12, 2017
@krichardsson krichardsson added this to the next-version milestone Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants