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

Kalman flipped resets attitude #1244

Open
knmcguire opened this issue Mar 3, 2023 · 2 comments
Open

Kalman flipped resets attitude #1244

knmcguire opened this issue Mar 3, 2023 · 2 comments

Comments

@knmcguire
Copy link
Member

With the Kalman filter, if a crazyflie is flipped and the kalman resets, the attitude estimate is reset as well.

test

I guess this won't cause issues for the tumble detection as that should be based on sensor data on the accelerometer, but I would imagine this might be very confusing.

Perhaps we should rethink the supervisor resetting kalman a bit? I guess there will be no way to seperate the attitude with the position reset. ?

@matejkarasek
Copy link
Contributor

matejkarasek commented Mar 13, 2023

Just triggered some LH issue (#1250) causing the EKF to reset in flight. Then this is particularly annoying, as this ends up with a flip and crash...

I guess the EKF would need to be split somehow such the the attitude part keeps running... Not sure that is possible.

Maybe running complementary filter in parallel and switching to that attitude estimate when position filter needs to be reset?
Even better would be to wait till the EKF converges, before switching back... Then we would only get some position drift, but not an immediate crash...

@krichardsson
Copy link
Contributor

krichardsson commented Mar 14, 2023

The estimator resets because the state is out of bounds (position far away or velocity very high). A quick test shows that the attitude is equally messed up.

image
The graph is from a Crazyflie on my desk.

I'm not sure it would be possible to only reset the position and velocity, but even if it was the attitude state might not be that useful anyway.

There has been some discussions of running a "fail safe" system (estimator + controller) in the background that can take over when the s**t hits the fan, but I don't know of anyone trying it out.

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

3 participants