PDA

View Full Version : Array of highly directional sensors feasible for distance and bearing?



tylernt
10-04-2013, 04:07 PM
I recently became interested in robot sumo. A lot of people are using various Sharp IR distance sensors, but they are quite slow (38ms for most models, 16ms is the best I've seen) and unless you mount them on a servo or spin your whole robot back and forth to detect the edges, (even slower), you can't get a good bearing on your opponent. As a result, some sumo builders give up on distance and just concentrate on mounting a bunch of proximity sensors. Trying to think of a faster better way to get both a bearing and a distance, I came up with the following. I'm asking here, to see if anyone thinks this idea has merit.

Let's say we install an array of IR sensors (photodiode, phototransistor, whatever) in the front of a robot. Put them all in a line and make them all parallel to each other and perpendicular to the robot (all pointing straight ahead). Let's start with 8 sensors for the sake of discussion. Shroud, or recess them rather deeply, to limit their field of view to a very narrow angle, such that the right-most sensor can't "see" anything placed slightly left of center in front of the robot.

Already I think this will work for passive bearing detection of an IR beacon. But our opponent may not be emitting IR, and we'd also like to know the distance, so...

Now, in the center of our array, let's mount an IR emitter -- probably a narrow-angle IR LED -- and turn it on. Even with a narrow beamwidth, there will be some spread. So the disc of IR reflecting off a distant opponent will have a large diameter, whereas a nearer opponent will be hit with a smaller little dot.

I think we can now determine both a bearing and a distance to the opponent being illuminated. As it moves left or right in our field of view, the 8 sensor readings (let's assume an 8-bit ADC reading on each) can be interpolated and plotted as a curve -- then the bearing can be estimated based on that curve (there's probably already a mathematical name out there somewhere for that curve or for the process of calculating it). As for distance, if only a few sensors detect reflected IR (as from a little dot), the opponent is close -- the more sensors that detect the reflection, the wider the IR beam has gotten meaning the opponent is more distant.

The advantage to this is the speed. Getting ADC readings on 8 sensors and doing a bit of math should be possible in about 1ms. The downside is, we still have to aim our robot in the general direction of the opponent -- but even if an opponent traverses our field of view more quickly than we can spin to follow it, based on the degrees-bearing delta and the distance delta from two or more samples, we can probably calculate it's velocity and heading... neat!

Already I can see one flaw though -- if the opponent is smaller than the IR beam width, it will appear "closer" than it actually is. But for robot sumo, the beam width can be optimized since we already know the maximum distance (dohyo size) and approximate opponent size (based on the class, for example 10cm for mini). And worst case, even if the distance is wrong when it's far away, I will still have a bearing on it and I'll get a good distance once it comes closer.

Obviously there will be some "devils in the details" in the implemention, and I've no idea what kind of precision this can ultimately achieve, but my question is this: is this approach worth pursuing, or am I off in the weeds?

jwatte
10-04-2013, 04:51 PM
Unfortunately, the "bigger circle" of IR hit will be bigger by an amount that is exactly proportional to the distance from the emitter, so the area-angle of the disc as seen by the emitters will not change.

What you really want is a LIDAR. It sends out a very narrow point, and then detects that point with surroundings at a distance offset from the emitter, and the further from the "center" the point is, the more parallax difference there is, and the closer the detected object is.

Scanning LIDARs put this whole thing (or 64 of these things!) on a motor that spins several revolutions per second (up to several hundred per second for the high end.)
A good source of hobby-level LIDAR is the Neaty XV robot vacuum cleaner LIDAR unit, which may be sometimes found as spare parts on eBay.

Btw: 38 ms isn't particularly slow in human or mechanical perception amounts of time. Calculate out how far an opponent can move in 38 ms to see what it actually means.

tylernt
10-05-2013, 01:38 AM
Unfortunately, the "bigger circle" of IR hit will be bigger by an amount that is exactly proportional to the distance from the emitter, so the area-angle of the disc as seen by the emitters will not change.Yes, but the sensors are laterally offset from the emitter:

sensor1-sensor2-sensor3-sensor4-emitter-sensor5-sensor6-sensor7-sensor-8

Sensors 5 through 8 and 4 through 1 have increasing parallax from the emitter. A very close opponent will only reflect emitted IR to sensors 4 and 5; the others "see" nothing because they are deeply recessed so as to block most peripheral vision. As the opponent backs away, sensors 3/6, 2/7, and 1/8 are gradually lit up as the opponent enters their respective fields of view.

I think.

I just tried it with my hand beside my face where I couldn't see it. As I move my hand forward, it gradually comes into view until I can see the whole thing.


What you really want is a LIDARYup LIDAR is definitely cool. That Neaty XV unit looks to be about 10Hz though -- 100ms is even slower than the Sharp rangefinders. :(


Btw: 38 ms isn't particularly slow in human or mechanical perception amounts of time. Calculate out how far an opponent can move in 38 ms to see what it actually means.Some sumo bots with brushless motors go an amazing 96 inches per second (though 48 in/sec is more common). 48 in/sec is roughly 1 inch in 20ms?

If it's traversing our field of view, a 3.9in mini bot can go 2.4in in 38ms, so we could probably detect it, but we have no idea if it was going left-to-right or right-to-left. Some builders put two Sharp sensors on the left and right front of their bot, which is a reasonable solution for getting the traversal direction, but I'm unreasonable. :)

tician
10-05-2013, 06:34 AM
I'm starting to see what you describe as a simple implementation of the sharp rangefinder with discrete components and newer processing hardware (the Sharp rangefinders are now/soon-to-be discontinued and were first released ~1994). To get much accuracy, you will need to ensure that the photodiodes are very accurately spaced and aligned with the photodiode sensing angle suitable for the spacing and intended target sensing range. The simplest method for estimating the approximate center is to find the centroid of the returned light (distance of each photodiode from some fixed point multiplied by the ADC value for that photodiode, then sum all of those and divide by the sum of the photodiodes ADC values to get a distance from that fixed point). There are better methods for determining the center point of the sensed light, but a bit more math is involved. Since you would be using multiple lenses (built into the photodiodes) instead of a single lens for all sensing elements, I am not certain you would be able to use trigonometry to directly calculate the distance of the reflecting target, but you could use a lookup table or fitted function with experimental results (place a ruler on the table and record multiple scans of a target at different distances, then process).


Yup LIDAR is definitely cool. That Neaty XV unit looks to be about 10Hz though -- 100ms is even slower than the Sharp rangefinders. :(
That is a full 360 degree scan every 100ms, not just a single data point like the sharp rangefinder. Unfortunately, the neato lidar does have a minimum sensing distance that might be a bit larger than your bot so that you might not be able to sense another bot ramming into yours. Although the same thing applies to certain versions of the sharp rangefinders (each model has a different intended sensing range).

tylernt
10-06-2013, 12:47 PM
you will need to ensure that the photodiodes are very accurately spaced and aligned with the photodiode sensing angle suitable for the spacing and intended target sensing range. Yep. I'll have to do some math to determine a good emitter beamwidth and how much to limit sensor field-of-view based on, say, a 77cm dohyo and a 10cm opponent. The amount of parallax available will be limited by my own 10cm bot size.


Since you would be using multiple lenses (built into the photodiodes) instead of a single lens for all sensing elements, I am not certain you would be able to use trigonometry Not only that, but the "disc" of IR emitted by a cheap 5mm LED isn't perfectly uniform -- typically the center will have a bright hotspot and a dimmer spill. Also it may have an "astigmatism" or asymmetry. So, manufacturing tolerances in both the emitter and sensor lenses (not to mention my own shroud/recess work) means that a...


lookup table or fitted function with experimental results (place a ruler on the table and record multiple scans of a target at different distances...will most likely be what I end up doing. I'll need to sample an object in a 2-D grid of various distances and various bearings; tedious work but I think it will compensate for various imperfections.


That is a full 360 degree scan every 100ms, not just a single data point like the sharp rangefinder. Hm, that's not so bad then.


Unfortunately, the neato lidar does have a minimum sensing distance that might be a bit larger than your bot so that you might not be able to sense another bot ramming into yours. Although the same thing applies to certain versions of the sharp rangefinders (each model has a different intended sensing range).Secondary close-proximity sensors (simple on/off output at a few cm) on all sides are commonly used. I was thinking of a vibration sensor or accelerometer to sense impacts or pushes too.