KuraIthys
13 years agoHonored Guest
Thought experiments in magnetic tracking.
OK, so the lack of hardware of any kind to test with is really killing me here, because it means all of this is pure speculation.
However, while thinking through the issues of the hydra's tracking accuracy once again (latest comments suggest the position can vary in unexpected ways, but is deterministic in nature - that means the error could be calibrated out of the system if you could cross-reference the tracking against some other form of tracking...)
OK, so what has that got to do with anything? Well, I now have a hydra on the way, but also a PS move controller.
The PS move uses optical tracking, which is reasonably accurate too, but suffers from occlusion.
So my initial thought was to strap a Move to a hydra to cross-reference the tracking data.
But then I started looking at the issue more carefully and something much more significant struck me:
The hydra's tracking is magnetic...
The PS move contains, amongst other things, a magnetometer!
Thus, a new thought occurred - What happens to the magnetometer readings of a PS move controller when you have it near a working hydra base-station?
Now, maybe the hydra's magnetic tracking works in a way that would render this useless, but maybe, just maybe, a device with a magnetometer can read enough data to use the hydra base station to perform 3d position tracking!
Implications:
Any device with a magnetometer would potentially be able to track a 3d position by itself.
The PS move in particular would benefit hugely from it, because the optical tracking and magnetic tracking would be complementary. Optical tracking can calibrate out the problems with the magnetic tracking, and the magnetic tracking could be used where the optical tracking doesn't work (when it's occluded for instance.)
But, and this is where it gets more interesting,
The rift headset also contrains a magnetometer - So if my idle speculation is correct, merely having an active hydra base station nearby would mean you could perform magnetic tracking of the headset without attaching any additional hardware to it...
That means that all the ideas about strapping a hydra controller to your head become redundant, and we suddenly have a positional tracking mechanism using the internal hardware of the rift alone!
(Obviously, the problems with magnetic tracking mean you'd want to supplement it with something else - I would suggest a form of optical tracking; This would have issues in not being able to see the headset at all times, but as a supplement to magnetic tracking, can help to transparently remove the error from the magnetic tracking data.)
However, there is one obvious pitfall. - I don't actually know if this works.
Once my Hydra and PS Move (or rift) arrive, I can test this for myself, but until then I have no idea if this is all just wildly optimistic.
But, for everyone else, maybe you can test this now, and get back to me?
What you'll need:
1. A razer hydra
2. A device containing a magnetometer (that you have access to the raw data output for) - This includes the PS move, many mobile phones and tablet computers, The Wii U gamepad (assuming you know of any way to read it's sensor data), and of course, the Oculus rift headset...
If you have the hardware, try the following:
Get the raw magnetometer readings from your device, and see what happens when the hydra base-station is on, compared to what the readings look like with it switched off.
If there's no change whatsoever, then clearly the idea falls apart.
But, if you get some kind of obvious change, get the sixsense/hydra sdk, and see if you can read the raw sensor data from a hydra controller. - Then compare it with your device containing a magnetometer while holding it in approximately the same position.
If this works, anyone with a hydra can eventually get positional head tracking (with a few accuracy problems, mind you) for free, without losing the use of any of the hydra's controllers...
If it doesn't work... Well... It was worth testing at least, wasn't it?
Update: So... No responses to this so far... That's fine. I'll just have to wait then... XD
But meanwhile, I've done some extra research.
http://janoc.rd-h.com/archives/212 - gives some basic info about how the hydra works.
It all makes sense really. The question is if a magnetometer will pick up the fields sufficiently to mimic the coils in the hydra, and if it can operate quickly enough.
There's also a minor concern that this method would require using software to process something the hydra does using a dedicated DSP.
But in short, this appears to be a summary of how the hydra works:
The base station contains 3 coils pointed along perpendicular axes.
The controllers contain something similar.
The base station switches on each coil in sequence, then pauses for a moment.
The trackers then read the effect of each coil being turned on. The orientation can be determined by the fact that the magnetic field is weakest when a coil is perpendicular to one in the base station, and strongest when parallel to it. (this is related to the dot product of the vectors between the two coils). Thus, for each pulse, you can determine the relative angles of all 3 coils in the tracker, relative to the single activated coil in the base station.
The distance from the base station is then calculated from the based on the fact that the signal to each coil in the tracker changes at about the same rate when moving towards or away from the base station.
This is thus repeated for each of the 3 coils, giving several orientation and distance values.
So far, so good. No reason why a 3 axis magnetometer wouldn't be able to do the same.
An interesting observation here by the way is that this positioning scheme clearly lends itself more naturally to polar coordinates than to cartesian coordinates, given that we have a set of relative orientation values, and a distance.
A second observation is that the magnetic field most likely obeys an inverse square law, which implies reduced accuracy with range.
Combined with a system naturally based on polar coordinates, this only worsens the range/accuracy relation.
Now we get to the problem areas though. - the timing for each sensor reading is such that the pulses are 2 ms long, with a gap of 2ms between readings. Each reading takes a total of 8 ms, but this involves 3 steps of 2 ms in duration.
The Nyquest theorem therefore states that when using a magnetometer with a digital output, we'd need at least 2 samples for each, and ideally 5 or more.
Meaning... For this to work effectively, it would seem to require a magnetometer with an update rate of between 1000 and 2500 hz... Which is a pretty substantial demand.
We'd also have to be able to get the computer to process it at this rate.
Ideally then, we'd want a magnetometer with a tracking rate of about 2500 hz, but with dedicated hardware that can buffer about 25-100 updates, and send them to the PC as a batch.
Processing a batch of 100 readings all at once is probably less of a hassle than processing 100 individual sensor readings...
In any event, this would seem to put a bit of a dent in the theory, since ideally it would seem to require some amount of hardware support (And a very fast magnetometer), which defeats the purpose of the whole idea anyway...
But... Only time will really tell, and I may be wrong on several possible points about this...
By turning on each coil in the base station one at a time, you get 3 references
However, while thinking through the issues of the hydra's tracking accuracy once again (latest comments suggest the position can vary in unexpected ways, but is deterministic in nature - that means the error could be calibrated out of the system if you could cross-reference the tracking against some other form of tracking...)
OK, so what has that got to do with anything? Well, I now have a hydra on the way, but also a PS move controller.
The PS move uses optical tracking, which is reasonably accurate too, but suffers from occlusion.
So my initial thought was to strap a Move to a hydra to cross-reference the tracking data.
But then I started looking at the issue more carefully and something much more significant struck me:
The hydra's tracking is magnetic...
The PS move contains, amongst other things, a magnetometer!
Thus, a new thought occurred - What happens to the magnetometer readings of a PS move controller when you have it near a working hydra base-station?
Now, maybe the hydra's magnetic tracking works in a way that would render this useless, but maybe, just maybe, a device with a magnetometer can read enough data to use the hydra base station to perform 3d position tracking!
Implications:
Any device with a magnetometer would potentially be able to track a 3d position by itself.
The PS move in particular would benefit hugely from it, because the optical tracking and magnetic tracking would be complementary. Optical tracking can calibrate out the problems with the magnetic tracking, and the magnetic tracking could be used where the optical tracking doesn't work (when it's occluded for instance.)
But, and this is where it gets more interesting,
The rift headset also contrains a magnetometer - So if my idle speculation is correct, merely having an active hydra base station nearby would mean you could perform magnetic tracking of the headset without attaching any additional hardware to it...
That means that all the ideas about strapping a hydra controller to your head become redundant, and we suddenly have a positional tracking mechanism using the internal hardware of the rift alone!
(Obviously, the problems with magnetic tracking mean you'd want to supplement it with something else - I would suggest a form of optical tracking; This would have issues in not being able to see the headset at all times, but as a supplement to magnetic tracking, can help to transparently remove the error from the magnetic tracking data.)
However, there is one obvious pitfall. - I don't actually know if this works.
Once my Hydra and PS Move (or rift) arrive, I can test this for myself, but until then I have no idea if this is all just wildly optimistic.
But, for everyone else, maybe you can test this now, and get back to me?
What you'll need:
1. A razer hydra
2. A device containing a magnetometer (that you have access to the raw data output for) - This includes the PS move, many mobile phones and tablet computers, The Wii U gamepad (assuming you know of any way to read it's sensor data), and of course, the Oculus rift headset...
If you have the hardware, try the following:
Get the raw magnetometer readings from your device, and see what happens when the hydra base-station is on, compared to what the readings look like with it switched off.
If there's no change whatsoever, then clearly the idea falls apart.
But, if you get some kind of obvious change, get the sixsense/hydra sdk, and see if you can read the raw sensor data from a hydra controller. - Then compare it with your device containing a magnetometer while holding it in approximately the same position.
If this works, anyone with a hydra can eventually get positional head tracking (with a few accuracy problems, mind you) for free, without losing the use of any of the hydra's controllers...
If it doesn't work... Well... It was worth testing at least, wasn't it?
Update: So... No responses to this so far... That's fine. I'll just have to wait then... XD
But meanwhile, I've done some extra research.
http://janoc.rd-h.com/archives/212 - gives some basic info about how the hydra works.
It all makes sense really. The question is if a magnetometer will pick up the fields sufficiently to mimic the coils in the hydra, and if it can operate quickly enough.
There's also a minor concern that this method would require using software to process something the hydra does using a dedicated DSP.
But in short, this appears to be a summary of how the hydra works:
The base station contains 3 coils pointed along perpendicular axes.
The controllers contain something similar.
The base station switches on each coil in sequence, then pauses for a moment.
The trackers then read the effect of each coil being turned on. The orientation can be determined by the fact that the magnetic field is weakest when a coil is perpendicular to one in the base station, and strongest when parallel to it. (this is related to the dot product of the vectors between the two coils). Thus, for each pulse, you can determine the relative angles of all 3 coils in the tracker, relative to the single activated coil in the base station.
The distance from the base station is then calculated from the based on the fact that the signal to each coil in the tracker changes at about the same rate when moving towards or away from the base station.
This is thus repeated for each of the 3 coils, giving several orientation and distance values.
So far, so good. No reason why a 3 axis magnetometer wouldn't be able to do the same.
An interesting observation here by the way is that this positioning scheme clearly lends itself more naturally to polar coordinates than to cartesian coordinates, given that we have a set of relative orientation values, and a distance.
A second observation is that the magnetic field most likely obeys an inverse square law, which implies reduced accuracy with range.
Combined with a system naturally based on polar coordinates, this only worsens the range/accuracy relation.
Now we get to the problem areas though. - the timing for each sensor reading is such that the pulses are 2 ms long, with a gap of 2ms between readings. Each reading takes a total of 8 ms, but this involves 3 steps of 2 ms in duration.
The Nyquest theorem therefore states that when using a magnetometer with a digital output, we'd need at least 2 samples for each, and ideally 5 or more.
Meaning... For this to work effectively, it would seem to require a magnetometer with an update rate of between 1000 and 2500 hz... Which is a pretty substantial demand.
We'd also have to be able to get the computer to process it at this rate.
Ideally then, we'd want a magnetometer with a tracking rate of about 2500 hz, but with dedicated hardware that can buffer about 25-100 updates, and send them to the PC as a batch.
Processing a batch of 100 readings all at once is probably less of a hassle than processing 100 individual sensor readings...
In any event, this would seem to put a bit of a dent in the theory, since ideally it would seem to require some amount of hardware support (And a very fast magnetometer), which defeats the purpose of the whole idea anyway...
But... Only time will really tell, and I may be wrong on several possible points about this...
By turning on each coil in the base station one at a time, you get 3 references