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

Resetting Kalman filter with invalid quaternion results in crash #453

Closed
bgromov opened this issue Aug 11, 2019 · 4 comments
Closed

Resetting Kalman filter with invalid quaternion results in crash #453

bgromov opened this issue Aug 11, 2019 · 4 comments

Comments

@bgromov
Copy link

bgromov commented Aug 11, 2019

Setting initial quaternion (kalman/initialQ[x,y,z,w]) to zero and resetting the filter (kalman/resetEstimation = 1), results in immediate firmware crash. CF spits out a part of the regular boot log, but then freezes and does not respond to commands anymore.

@knmcguire
Copy link
Member

Hi! Interesting that this happens. Could you tell a bit more how you set this? Through the parameters or hard coded in the firmware?

@bgromov
Copy link
Author

bgromov commented Aug 12, 2019

Through the parameters. Initially I thought it has something to do with the convergence of the filter (see #402), but then I noticed I am actually setting a malformed quaternion (all terms set to 0). Everything is fine when the quaternion is set to [0, 0, 0, 1].

@knmcguire
Copy link
Member

Hmm okay. Did you make your own parameters for the initial quaternions? It doesn't exist in the current master, and it is set starting from this line:

initialQuaternion[0] = arm_cos_f32(initialYaw / 2);

Just making sure what is changed in your version before we try to recreate your problem.

@bgromov
Copy link
Author

bgromov commented Aug 12, 2019

Seems like we are on a pretty old version indeed. Sorry for this. We will try to merge from the upstream and see if we have any related issues. Thanks

@bgromov bgromov closed this as completed Aug 12, 2019
cafeciaojoe pushed a commit to cafeciaojoe/crazyflie-firmware that referenced this issue Sep 27, 2024
This is fixing the client in python 3.9. When vispy releases its next
version, the special handling for python 3.9 can be removed.
cafeciaojoe pushed a commit to cafeciaojoe/crazyflie-firmware that referenced this issue Sep 27, 2024
cafeciaojoe pushed a commit to cafeciaojoe/crazyflie-firmware that referenced this issue Sep 27, 2024
Fixes running client on Python 3.9
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