Hello Everyone,
First of all, I must say that prior to this month, I never really worked with Sensors, Maths, Electronics, Arduino & C/C++ altough I’m pretty tech Savvy & used to programming.
I’m experiencing since few days a system using an Arduino & some IMU (To be exact the MinIMU-9 V5 & the 6 DoF LSM6DS33, both from Pololu) to control Armature’s bone within the 3D Software Blender, in order to build a kind of “Puppet” to control & animate rigs in real time.
Basically, what the full stack does is reading the raw data from the IMUs/Magnetometer, processing it through sensor fusion (Currently using Magdwick Filter) & then sending it to a Blender custom plugin I made in order to use the processed data.
While the introduction above is just for general context, the Blender part of it is outside the scope of my questions, as I’m having some pretty OK results by myself.
I made some tests using both 6 & 9 DOF.
- All tests for Gyroscope/Accelerometer are done using the Pololu LSM6 Arduino Library
- All tests for 9-DOF are done using the library mentionned above + the LIS3M Arduino Library by Pololu
- The Magnetometer is, in theory, calibrated (but it might be messy, I will try to figure out Monday at work if I did it right)
- I am using the same Sensitivity settings for both 6 & 9 dof Gyro & Accelero
- In both cases, the data is then processed using MagdwickAHRS Arduino Library to obtain Quaternions.
After testing :
- Precision is exactly what I expected for all axis, even though I got a bit of noise on X & Y axis (Pitch & Roll / Roll & Pitch don’t remember the order) while keeping the IMU Stationnary, using both 6 & 9 DOF (But I think I can handle this by filtering)
- On the 6-DOF, as expected, there is a lot of Z (Yaw) drift over time, probably due to error accumulation but this isn’t a problem as 6-DOF will only be used for X & Y (and that X & Y are precise enough/don’t drift at all).
- But here comes the problem : on the 9-DOF, the Z drift is like worse than on the 6-DOF + I got a bit of drift on X & Y aswell, but it appears to be for different reasons.
- The drift isn’t constant, it’s more like a “delay” on the Z axis position. Like even though X & Y will instantly update to the correct position, Z will take 5 to 10 seconds and will be really slow
So it appears to be related to the magnetometer (On my 6 DOF, the Z rotation is barely perfect, but obviously it lacks long-term accuracy), maybe the Sensitivity ?(I now realize that I didn’t really tried to change it). Or might it be the Magdwick Algo that needs time to estimate with more accuracy ?
How can I reduce this drift ? Do I need to calibrate Gyro & Accelerometer aswell ? If so, how can I do this ?
Is this long delay simply part of the game & non-avoidable ? What could be the causes ?
Is Magdwick the better Sensor Fusion Algorithm or is the Mahony Filter a better choice ?
Thanks by advance for all your answers !