xioTechnologies / Fusion

MIT License
1.01k stars 241 forks source link

Guidance on tuning Fusion for "responsiveness" #135

Closed copumpkin closed 9 months ago

copumpkin commented 9 months ago

I'm not sure this is the right place to ask, but I'm wondering whether Fusion is well suited to detecting "snap" rotational movements of the IMU. Imagine that the IMU is traveling one direction, and then flips ~180º to travel at roughly the same rate in the other direction within less than a second. I expect Fusion's integration of the gyroscope and magnetometer data would detect this, but I'm not sure if the various smoothing and other compensation mechanisms built into the algorithm will delay detection of such events.

If so, do you have any advice on which parameters to tune in order to make the earth-relative orientation as responsive as possible? Ideally I'd like to be able to distinguish between a "snap" rotation like I described above and a longer smoother rotation, which could also arise in my domain. I imagine that there's a trade-off giving me higher noise for tuning the algorithm like this, but that's probably fine for what I'm doing with it.

I'm also interested in detecting sudden earth-relative accelerations for similar reasons. Not sure if the answer will be different from the orientation question above but I figured I'd ask both 😄

Thank you!

xioTechnologies commented 9 months ago

There is no issue in using Fusion for what you have described. The algorithm does not implement any smoothing or bandwidth-limiting processes. There is no limit to the speed of orientation changes you can measure provided that your sensor measurement ranges and sample rates are high enough.

copumpkin commented 9 months ago

That sounds great, thank you!