Difference between revisions of "Alpha testing"

From The Relativty Wiki
Line 16: Line 16:
 
However, to those of us who are not so mathematically adept, the algorithms are rather hard to understand. Thankfully, various people have taken them & wrapped them up in nice, approachable Arduino libraries which are pretty straightforward to use. The library that we will be using was created from Kris Winer's code by Hideaki Tai in Japan - however, as is normal in this field, there is a hardware gotcha that you have to be aware of.  
 
However, to those of us who are not so mathematically adept, the algorithms are rather hard to understand. Thankfully, various people have taken them & wrapped them up in nice, approachable Arduino libraries which are pretty straightforward to use. The library that we will be using was created from Kris Winer's code by Hideaki Tai in Japan - however, as is normal in this field, there is a hardware gotcha that you have to be aware of.  
  
The breakout boards that are widely available are supposed to be based on a specific sensor chip: The InvenSense MPU 9250 Nine-Axis (Gyro + Accelerometer + Compass) MEMS MotionTracking™ Device. Or, as your or I would call it, a 9250 chip. However, most of the boards that are now in circulation on eBay ad AliExpress are actually based on a 9255 chip instead! It's still made by InvenSense and, as far as we're concerned, it's pretty much identical to the 9250 in every respect bar one. The chips have information storage slots inside them called registers, one of which is called '''Who_am_I''' - which returns a simple hexadecimal code that identifies the chip - and thus the sensor. The 9250 chip '''Who_am_I''' register returns '''0x71''' whereas the 9255 chip '''Who_am_I''' register returns '''0x73'''. It's a small, but rather significant difference, as it causes all the sanity checks inside the library to fail. If the chip doesn't identify itself as '''0x71''' (ie a 9250), nothing runs and everything errors.
+
[[File:MPU-9250.png|150px|thumb|left]] The breakout boards that are widely available are supposed to be based on a specific sensor chip: The InvenSense MPU 9250 Nine-Axis (Gyro + Accelerometer + Compass) MEMS MotionTracking™ Device. Or, as you or I would call it, a 9250 chip. However, most of the boards that are now in circulation on eBay ad AliExpress are actually based on a 9255 chip instead! It's still made by InvenSense and, as far as we're concerned, it's pretty much identical to the 9250 in every respect bar one. The chips have information storage slots inside them called registers, one of which is called '''Who_am_I'''. This register lives up to its name, and just returns a simple hexadecimal code that identifies the chip - and thus the sensor. The 9250 chip '''Who_am_I''' register returns '''0x71''' whereas the 9255 chip '''Who_am_I''' register returns '''0x73'''. It's a small, but rather significant difference, as it causes all the sanity checks inside the library to fail. If the chip doesn't identify itself as '''0x71''' (ie a 9250), nothing runs and everything errors.

Revision as of 10:30, 25 April 2019

Relativty has recently been working on some fairly major technical advances to our existing codebase. In addition to the hardware switch from the Arduino Due to the STM32 board for our main 6DoF tracker, we have also been working towards a full 9DoF upgrade. Positional tracking is complex field, full of obtuse terms and complicated mathematics. In a nutshell though, for those of you wondering what this upgrade will give us, it'll fix the main problem that 6DoF trackers have, which is drift.

This is best explained in the two 1 minute videos below, from Sebastian Madgwick - the guy who developed the sensor fusion algorithms that we all use as part of his Ph.D research at the University of Bristol in 2009. Basically, the direction that your 6DoF headset tracker thinks is forwards slowly drifts sideways because of sensor errors, so you have to keep on recalibrating it - but not if you have a 9DoF headset tracker. A 9DoF tracker also measures the earth's magnetic field, alongside the standard 6DoF measurements, & uses a mathematical algorithm to continually compensate for the 6DoF errors.



YouTube: 6Dof Demonstration of Basic Concepts and Drift



YouTube: 9Dof Demonstration of Zero Drift


The hardware has moved on since Sebastian Madgwick was first playing with it, as have the mathematical algorithms. An American called Kris Winer took Madgwick's algorithm and applied them to new Arduino compatible MPU-9250 sensor boards that had recently become available. He released his work to the world as "Beerware" - which means that anyone can do whatever they like with it, but if they ever get the chance, they should buy him a beer. His work is beyond epic, so if you ever meet him, please, buy him as much beer as you can!

However, to those of us who are not so mathematically adept, the algorithms are rather hard to understand. Thankfully, various people have taken them & wrapped them up in nice, approachable Arduino libraries which are pretty straightforward to use. The library that we will be using was created from Kris Winer's code by Hideaki Tai in Japan - however, as is normal in this field, there is a hardware gotcha that you have to be aware of.

MPU-9250.png

The breakout boards that are widely available are supposed to be based on a specific sensor chip: The InvenSense MPU 9250 Nine-Axis (Gyro + Accelerometer + Compass) MEMS MotionTracking™ Device. Or, as you or I would call it, a 9250 chip. However, most of the boards that are now in circulation on eBay ad AliExpress are actually based on a 9255 chip instead! It's still made by InvenSense and, as far as we're concerned, it's pretty much identical to the 9250 in every respect bar one. The chips have information storage slots inside them called registers, one of which is called Who_am_I. This register lives up to its name, and just returns a simple hexadecimal code that identifies the chip - and thus the sensor. The 9250 chip Who_am_I register returns 0x71 whereas the 9255 chip Who_am_I register returns 0x73. It's a small, but rather significant difference, as it causes all the sanity checks inside the library to fail. If the chip doesn't identify itself as 0x71 (ie a 9250), nothing runs and everything errors.