Let’s talk IMUs
IMU stands for Inertial Motion Unit, basically when you use an IMU it is mostly because you need the orientation of something. You will find 6DOF and 9DOF IMUS (sometimes even 10DOF), DOF are the Degrees of Freedom.
6DOF IMUs have a 3 axis gyroscope (measuring angular acceleration) and 3 axis accelerometer (measuring linear acceleration, and gravity of course).
9DOF IMUs also have a 3 axis compass to measure magnetic fields (and usually find the magnetic north)
So with IMUs you don’t get an orientation right away ! It would be too easy wouldn’t it ? You have to do something called “data fusion”, which pretty much consists in taking the data from those 2-3 sensors, putting them through a badass algorithm (usually a Mahony, Madgwick filter, or a Kalman if you really enjoy using lots of CPU) and getting the orientation out of it.
Doesn’t seem that hard after all right ?
Well you will find out in the next part all we had to go through…
Historical events (oh yes)
In the first version of the Tracker we were using a 6DOF IMU (truly it was a 9DOF but we could only use 6DOF). The problem when you don’t have the compass it that you have no idea where north is. Therefore you could restart the IMU twice in the same place and have a different Yaw. No problem with Pitch and Roll as gravity gives a good reference to the accelerometer.
Not having a good Yaw information meant that you could be walking sideway. So we used a trick : when starting the game we asked users to face the front wall and press a button on the tracker. We could measure the offset and apply it to correct the Yaw. This work well, but only for a few minutes. Without a reference for Yaw, the algorithm would drift at about 1-2° per minute, which is too much. And we can’t do anything about it.
The journey continues with Tag V2
Here we started using a true 9DOF IMU, was it more expensive ? Yes like 2 or 3 times. Did we increased our prices ? No Sir !
In our heads the 9DOF would fix all our problems and maybe even solve world hunger. As you can expect it we were wrong (even for the world hunger thing sadly…).
Even though things were better and we did not have to use our trick anymore we found out that the compass would bring new unexpected issues. The compass is subject to a lot of noise and magnetic perturbations, especially indoor (for example created by computers, metal, magnets) and therefore can quickly drift a lot when moving from a zone to another. Instead of small drift of 1-2° per minute, we could have a 15° drift in a few seconds and then coming back to normal. In average the orientation was good but it was subject to those drift too often.
The solution !
Of course we could improve the fusion algorithm, but for some reason we made a choice in the development and it is the only thing we cannot touch (please give us some credit it’s not a stupid choice, it is to enable multiple IMU on the same tracker for body tracking or finger tracking).
Another solution could have been to map all the magnetic perturbations in the room and apply offsets depending on the tracker position… But we decided the calibration was already painful enough (I am sure we can all agree on that, we are working on it though).
The solution in the end was quite simple ! Mix the 6DOF algorithm and 9DOF algorithm data. Using 6DOF on the short term as it is pretty reliable for a minute, and 9DOF over long term so everyone have the same Yaw and to fix the 1-2° drift per minute.
We might still have to adjust some stuff but it looks already better and is under testing. If testing goes well this could be released within a week or two. But it will require a plugin update…sorry !
The next step is also to have a second IR LED on the tracker that we can turn on to create a vector and fix the drift. We should start working on it in August and I will keep you update on the progress.
I hope this article helped you understand what is going on with orientation, and how we are handling it 🙂