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

linear acceleration of zero breaks the filter #140

Open
timonegk opened this issue May 29, 2021 · 3 comments
Open

linear acceleration of zero breaks the filter #140

timonegk opened this issue May 29, 2021 · 3 comments

Comments

@timonegk
Copy link

I am using the imu complementary filter and noticed that when the linear acceleration input to the filter is [0, 0, 0], the filter returns [nan, nan, nan, nan] as orientation and continues to do so forever.
The input of [0, 0, 0] happens in my case in simulation when the robot falls. I think the best way to handle this would be to simple skip a linear acceleration of [0, 0, 0].

@robertogl
Copy link
Collaborator

That is because of the normalization of a zero norm vector. Sure, skipping that case sounds a reasonable solution.

@robertogl
Copy link
Collaborator

robertogl commented Nov 10, 2021

Not sure if we want to track the orientation of a falling object, but we can do it (within a reasonable amount of time) just by using the prediction. So, if acceleration has zero norm then we do not use the correction and clearly we avoid the normalization. Note that a perfect zero norm would only happen in simulation, in real life we would have a small norm (<9.81) which I think is already handled by the adaptive gain.

@TuanLBT
Copy link

TuanLBT commented Jun 9, 2024

@robertogl Hi, can you recommend me the way to skip this case. Im new to Ros and got the same issue that the filter give NaN value (0, 0, 0) leads the rviz to shutdown sometime.

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

4 participants