Thoughts on Prop suitability for something like this...
mark
Posts: 252
http://www.hizook.com/blog/2015/05/17/valves-lighthouse-tracking-system-may-be-big-news-robotics
I've been interested in this position/orientation tracking system since Valve first announced it, but the technical details had been pretty hard to come by. After I read the blog, I couldn't help that the first thought after "Neat!" was to wonder if the prop could handle the workload. I suspect that for the most part it could, but it might have a problem with the modulated signalling operating in the MHz range. I'm thinking the counters could help here, but would it be necessary to assign one to each photodiode?
I'm curious what hardware they're using. I can't think of any uC, at least on the front end, that would be suitable except perhaps the xmos chips. Other than that, probably an FPGA?
Any thoughts?
I've been interested in this position/orientation tracking system since Valve first announced it, but the technical details had been pretty hard to come by. After I read the blog, I couldn't help that the first thought after "Neat!" was to wonder if the prop could handle the workload. I suspect that for the most part it could, but it might have a problem with the modulated signalling operating in the MHz range. I'm thinking the counters could help here, but would it be necessary to assign one to each photodiode?
I'm curious what hardware they're using. I can't think of any uC, at least on the front end, that would be suitable except perhaps the xmos chips. Other than that, probably an FPGA?
Any thoughts?
Comments
EDIT: Actually, a 2D version of the technique would be the old optical mice that used a gridded mouse pad.
EDIT: EDIT: Hehe, Doh! Not reading enough before commenting. That's not a reader! The Lighthouse is only a transmitter. Cool, I like it.
It's just like two of the cheap *** hobbyist servo signals. The reader only has to WAITPEQ for a single digital input so using a Cog would breeze in. Just use CNT values. It's all sequential with large wait times so that Cog can do any maths as well.
@evanh
Yep, it consists of the lighthouse transmitters which are simple synced IR led and XY laser scanners, and the receivers which consist of an array of photosensors with a processor used to calculate the amount of time it took for the exposed sensors to be hit with the X and Y beams after they received the led sync pulse. Based on known values such as the laser line scan rate, it can fairly easily determine position and orientation. It really is slick. Here's a video of what appears to be a prototype tx in action:
https://www.youtube.com/watch?v=5yuUZV7cgd8
The hardware for this is so simple it can easily be built by hobbyists.
A single motor driving two mechanically linked mirrors, two ir laser diodes, and an ir led for the synch signal is basically all you need. The motor speed does not even need to be all that high or precise. Measure the time between synch flashes and calculate the x and y location based on the time of the laser pulses in relation to that.
Of course you would want the photodetectors to match the wavelength of the tx laser/diodes as closely as possible. That helps reduce potential interference sources but not all. That's part of the reason why the tx also needs to be modulated - otherwise we can get interference from all the various unwanted sources that emit at that wavelength. The other reason, which I mentioned earlier was that in order to get full 360 degree coverage, two transmitters are needed - one facing the other. Each is modulated differently so that the receiver can distinguish which source it's picking up, which is particularly important when part of the RX is detecting the light from one source, and the other part from another source. How these are modulated (simple fixed frequency?) has yet to be revealed. Valve is interested in making this a royalty-free standard, so hopefully we'll find out all the details soon.
"After a little more thought I am wondering if demodulating the signal with counters would need more than one or two counters. The multiple diodes look like they are only there to make sure the beam can be seen regardless of the robot's orientation, so the signals could be summed before being processed. Seems like it might be possible to do it all with one cog."
The multiple photodiodes arranged in a specific pattern are likely very important to determine orientation. One tx might work if the receiver has an array of sensors offering 360 degree coverage, but for certain designs, this isn't practical, so two transmitters are needed to get full coverage and limit problems due to occlusion. Here's an image of the current prototype HMD:
http://i.kinja-img.com/gawker-media/image/upload/t_original/1149099751047904872.jpg
There's no sensors on the back of the devices mounted to the strap, so this is why it needs at least 2 transmitters. Even if it did just use one tx, I don't see how it would be possible to use just a counter or two without making a lot of assumptions. Perhaps if a pin goes high, a counter can be assigned to it and then read and cleared and then wait for another pin to get assigned to. I never got very familiar with counters, so I don't know how quickly this could be done. And of course, this is assuming that it's a simple fixed frequency modulation and that the rx needs more photodiodes than the number of available counters. The other option is to just use multiple Props
I think the rotation rate needs to be reasonably precise. This hardware is capable of measuring 6DoF to sub-mm accuracy at 100Hz in a typical sized room in a house! So an accurate laser scan rate plays an important part in that. Shouldn't be too difficult, though. Precision brushless motors are common enough in consumer products such as laser disc and hard drives. I suppose they could do as you say and increase tolerances by relying on sync pulses to indicate the actual rotation rate, but at the cost of a "frame" of latency. Not sure if they do that though.
100 HZ sample rate requires 6000 rpm! Balancing a 45 degree mirror for this speed is not trivial. maybe a multi-faceted mirror, 5 facets would take that down to 1200 rpm, but with only 72 degrees of coverage. All doable, but not so easy.
100 hz sweep at 10 feet passes a .1" photodiode in .1/(10*12*2*pi)=.000133 seconds at one hz, that's ,00000133 seconds at 100 hz. If you wanted to see at least 5 cycles of the modulated carrier, it would need to be at least 5*(1/.00000133)=3.7 MHZ. Making a good filter at this frequency can be a little tricky, but again, doable.
With an 80 MHZ granularity in timing, , that is, .000000012 second, and we know from above that 1/10" is .00000133 seconds, Propeller could theoretically give .00000133/.000000012 = .0104" resolution at 10'. WOW! When do you start!
I think you may be getting carried away and making this more difficult than it has to be. First thing to consider is how fast your robot can move. Then take in to account how far it can travel before needing an updated position. Now recalculate everything.
Agreed, This level of performance is waaay overkill most of the time, I was focused on giving a real answer to the original question, which framed the parameters for the calculations. Even at this mega overkill rate we get about 1/100" resolution at 10' out of the prop, possibly without even invoking the counters!
Personally, I would keep the high sample rate and implement a Kalman filter, or at least keep a rolling average to smooth out the jitter inherent in this kind of measurement.
Thanks for the figures.
Looking at the video I linked to above, there seems to be some kind of disc-shaped optics attached to the front of the motors which wouldn't have such extreme balancing requirements as a bulky mirror.
How do we get 80MHz in timing granularity? Using a pin wait instructions? I suppose we would detect a modulated signal at that rate in software but it ties up a cog to process one photodiode. It would probably require come clever cog<->pin assignments if we're using more sensors than available cogs.
@kwinn
Of course the performance to the demo hardware might be a bit extreme for many uses, but I was specifically focusing on the type of hardware it was developed for (VR HMDs and related peripherals). Since I assumed that Valve is using a more complex (and expensive) circuit than the Propeller, I was wondering if the Prop would be suitable in their design at that level of performance. It seems like it could be a pretty big design win for Parallax if they could get their chips in that hardware.
I don't see how the rpm would affect the position accuracy, but it does determine the update rate, which could be important. Since the speed and orientation of the robot is being measured continuously the next expected position could be calculated and used to eliminate spurious readings.
Slower rpm would equate to MORE accuracy, provided the rotation was constant
I like your earlier statement about the ceiling mounted device. 3 receivers on the bot would easily give position and orientation if you give an omnidirectional IR blast to sync to the rotation. Just look for simultaneous pulse for all three sensors, then time from that. This way the transmitter could be dumb and require only power to operate. This could operate fairly slowly, and therefore be very easy to make. Predicting the next pulse/position is exactly how the Kalman filter works.
http://www.ebay.com.au/itm/400781449348?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Of course, horizontal spinning line lasers are widely used in the construction industry for levelling (this one has a vertical line as well);
http://www.ebay.com.au/itm/Baumr-AG-Self-Leveling-Cross-Line-Laser-Level-Rotating-Rotary-Levelling-/130578601475?pt=LH_DefaultDomain_15&hash=item1e67175603
Jim
http://www.edmundoptics.com.tw/optics/optical-mirrors/flat-mirrors/right-angle-mirrors/1930/
Erco,
Help!
Can you find us a cheap one of these (right angle mirror)!