I'm trying to perform an experiment where my aerial robot follows a wall and then turns left when finding an opening (assuming the first opening it sees is a 6 foot doorway on its left of course). I've done it successfully with the Sharp GPSY0A02YK IR sensor but the plane moves back and forth significantly because the sensor is quite noisy.
I wanted to compare the results of this experiment when using ultrasonic sensors and I was wondering if someone could suggest one. I'm looking at 3 in particular:
Please keep in mind that weight is an important factor.
The EZ-1 will by far be the lowest weight, because it is a single horn unit. The others use dual horns, so they have twice as much weight in horns, and about double the PCB area to hold the dual horns.
I don't like to use the EZ-1 because it can't give detail on short range (below 6 inches) otherwise, I and other people I've talked to are as pleased as with performance of any you list. The SRF04 (cheaper, non I2C, version of SRF08) gives very reliable ranges down to .1" I assume the same for the SRF08, although since I don't like I2C communications, I've used much less often than the SRF04. I've tried the PING and written a working interface for it, but have very little practical experience to say much about it.
I will say this. This spring with an SRF04, and this summer with a SRF10 (even smaller dual horn unit with far worse directional specs.) I tried to do wall scanning. I'd have serious doubts about using any of the listed sonars for wall following from an airborne vehicle. I put the sonars on a small bot in an arena, about 6 feet x 4 feet, rotated the robot twice while collecting the returned data. Basically, with the wild reflections I got, for a while, I couldn't figure out which were the walls and which were the corners. I finally grasped the walls had to be the closest returns, but the beams were so wide, that as soon as you got away from almost perpendicular reflections from the walls, your quality of return went to pieces. I went back to Sharps for my wall following.
For what its worth.
-- Randy M. Dumse
Caution: Objects in mirror are more confused than they appear
It sounds like this is the classical non-parallel wall problem. Only at one instant in your scanning was the surface of the sensor parallel to the wall. Remember that for sound just like light, the angle of reflectance is equal to the angle of incidence. The fact that you get a return beam for either is due to absorption of the light/sound of the material you're reflecting against. You would get basically no reading at all (or only distant echos) with an 100% acoustically reflective wall, especially with a narrow beam. Infrared sensors also suffer from these kinds of specular errors, depending on reflectivity of the surface and angle of incidence.
Given a hard surface and a 45 degree incidence, you are about guaranteed an incorrect reading when shooting an ultrasonic beam into a corner of a room. The old Seattle Robotics document often cited for robot ultrasonics shows this well:
Some ultrasonic transducers -- namely the Polaroid units -- sweep frequencies because materials have different sound absorptions at different frequencies. These later sensors typically use a single frequency, and so they have no ability to overcome the problems of reflections from different media. But at 3-5 times the cost, people don't tend to use them as much.
If you use the human senses as the model, we detect gross proximity with sound (also vision, but using more complicated visual analysis), local proximity with sight (light), and immediate proximity with touch. The same basic formula ought to work with robots, too. Ultrasonics have a MUCH longer range than the IR sensors do, and they serve a purpose if used in conjunction with other sensor techniques.
I've never figured out why it's important to know you're 0.1" away from something. Can your motors stop that quickly? Odds are no, so it's irrelevent information as far as avoiding obstacles go. I think it's better not to be that close to something unless you intend it, and if you do get that close, contact switching is cheaper, more reliable, and more useful across a larger cross section of the robot's body. I suppose it's nice to know your sensor is 0.1" from something, but that assumes the object is conveniently directly in front of the sensor. Usually only happens in test environments.
I have to double-down on what Randy has said here. First, I tried the SRF04 but found it had some nasty sidelobe pickup, even from objects that were >12" away. I haven't tried the maxsonar, but ended up using several Ping sonars and like them a lot. No nasty sidelobes, however, I did find they seem to suffer from multiple reflections [as I imagine all sonars will] when the distance to a wall for instance is very short, and the angle is *not* perfectly perpendicular. I concluded the multiple reflections were coming back from the robot itself ... sonar Tx -> wall --> robot --> wall --> sonar Rx.
like this on anything flying around. OTOH, a really good sonar would be smart enough to make multiple samples on the environment, using a set of difference Tx energies, in order to correlate target distances against energy level required to produce an echo.
BTW, Joe Jones in his book Robot Programming spends a lot of time talking about sensor unreliability and the advantages of using redundant checks.
Also, with regards to what the first poster said, the Sharp GPxxx sensors don't do all that well when mounted on moving objects, because they integrate several triangulation readings over a full *50* msec. If your frame is rotating during this time, the readings can be really hoo-ey [to use a formal term :)]. I had one of these sensors mounted on a panning servo, and had loads of trouble with inconsistent readings, even with slow pans.
There is some evidence apparently that indicates the Sharp sensors do better if mounted in vertical orientation for frames that are rotating horizontally, but I never tried this myself.
Interesting. The only thing I can think of is that because these are PSD devices, mounting vertically effectively creates a higher frequency signal -- if mounted horizontally the change is slower, as that is the axis of the PSD sensor inside the unit. This might suggest a more-or-less asymmetrical field of view, and some inherent persistence in the image projected onto the array -- kind of like what a cadmium sulfide cell would exhibit.
Is it possible that some of the sensors that can't measure close up (with a
6" limit for example) will return an unknown or max distance response when objects are too close? If so, this would prevent the bot from "seeing" things that were right in front of it and could be a reason for using the sensors that would not so blind to close objects.
My mini-sumo Seeker 2 suffers from this, so I built a near-IR sensor. The Sharp GP2D12 analog sensors reach their minimum value at a distance of
10cm, and then as the object gets closer, the value the sensor returns starts getting farther away. The near IR sensor only detects things out to about 10-12 cm, so in combination I can get a better idea if the opponent is really close.
There's a closeup of the sensor here:
It uses a Sharp IS471F as the detector/LED driver, and a normal IR led wrapped in heatshrink.
-------------------------------------------------------------- Jon Hylands firstname.lastname@example.org
The issue isn't so much that you need to know when your .1" away from something as it is if you are 5.9" or 5.8" ... 1.1" 1.0" etc. Actually, the application was CAN CAN, and the particular use was to home on a can to be grasped by the "big gripper", and indeed accurate distance and positioning in the sub inch range was necessary to know when to close the gripper, as the setup was constructed. The sonar did much better in that function than it did in the general ability to distinguish the can from the wall.
-- Randy M. Dumse
Caution: Objects in mirror are more confused than they appear
Nifty. Basically it says the way we've been using these things on a moving robot has been wrong! It is "inadvisable" to mount them so that the elements of the PSD array is parallel to the direction of the motion. I didn't find that they said why, but the picture on page 7 is clear.
I plan to redesign my sensor turrets to take this into account.
Contact and near-contact sensing for gripping applications is another matter altogether, and there are numerous concepts floating around in addition to ultrasonic, such as microphonic induction, flex strain cells, etc. Your original message coupled ultrasonics with wider view sensing, which is far less predictable.
My point was that one sensor for everything, especially where the face of the sensor is not parallel to the sensed surface, will natually yield poor results. These are chronically simplistic devices we attempt to shoehorn into incredibly complex roles. Ultrasonics are basically useful for seeing what is directly in front of you, and for measuring the distance to parallel walls on either side. Readings at obtuse (or greater than critical) angle are basically useless, so the idea is to avoid that scenario altogether. It's hard to overcome physics.
There are some very cheap and reliable near-contact light sensors that Sharp sells that are more-or-less immune to ambient light interference. They change their lineup all the time, but I recall they have a number of go/no-go sensors for the 3-12mm range. However, they'd only be useful for that last few millimeters before contact is made.
Better, I think, to offer both methods. As the Budget Robotics turrets use interchangable sensor boards, it's easy enough to offer an alternative for vertical mounting, and let people use the one they want.
The PSD (position sensitive detector) which is used to measure the location of the reflected light spot seems to use only two photodiodes. The reflected light spot must have a dispersal pattern where it's strongest in the center of the spot and drops off after that. So the reflected light spot is designed to fall on both sensors at the same time. The diode which is closest to the center of the spot will have the strongest output. And the effective position of the spot is calculated by the ratio of the outputs of the two diodes.
Now, given this design, think about what happens if the object being detected has an stripe or edge on it so that the spot falls across this stripe. One side of the spot will reflect stronger than the other. When this edge falls on, or between, the detectors, it will cause the detector to incorrectly calculate the distance (one detector will be far stronger not because of the real dot location, but because of the difference caused by the edge.
But, if the edge is in line with the two photodiodes, the ratio will not be effected, and it will still be able to detect a valid distance.
So it's not the motion that is a problem. The problem with the detector is caused when the surface being detected has an edge which runs at any angle which does not line up with the long length of the detector.
If the surface is moving, and it has any edges on it (like the lines draw in the diagram) that cross the sensor, the sensor will give brief spikes of invalid readings as the reflected spot passes over the edge. But if the edge is in line with the sensor they won't create this error as it moves past the sensor (or it will minimize the error).
So, it I'm right, the real trick I think is to pick an alignment of the sensor to minimize the number of edges it will see which are not in line with the sensor. Edges that align with the long axis of the sensor are good, edges that are perpendicular to the long axis of the sensor will cause errors.
If the bot is expected to be moving past vertical stripes, you need to mount the sensor so it's vertical. If there will be lots of horizontal stripes in it's field, it would be better to mount it horizontally.
If anyone has one of the sensors, it would be easy to test this theory simply by using a piece of paper half dark and half light. Holding the paper a constant distance from the sensor, move it back and forth so the light dark boundary passes across the sensor and see what the distance measure does. With the edge aligned on the same axis as the sensor, but the paper moving on the other axis, there should be little error. But with the edge turned the other way, moving in line with the sensor, you should see a large jump in the sensor output as the spot passes over the edge.
You seem to be confusing some of the illustrations in that document. Later they show a sensor with two sensing elements. That's for something different. In a PSD sensor, specifically in a lateral effect PSD, there is just one diode, which is designed to generate a varying resistance as light strikes across its length. All diodes exhibit this response, but this behavior is expressly developed in diodes for PS applications. If you open up one of these Sharp sensors you see the PSD device has a very large sensing window of maybe 3x3 millimenters. There's just one. There are four leads: anode, cathode, and the two ohmic connectors for taking the measurement.
The type of sensing you describe is also in use (like in a CD player) but it works best with a more defined gaussian beam profile. You need a laser operating in TEM00 mode to do these elements justice and (from my own experience) even highly collimated light yields mediocre results. I very seriously doubt this is how any of the Sharp distance judgement sensors work.
You're right that it is not motion per se, but it is the effect of changing distances caused by that motion. The change will be more abrupt when the sensor is in the vertical. In whatever way the sensor is averaging our those 32 "snapshots" it seems to favor the higher resolution signal created by perpendicular motion rather than parallel motion.
I think the stripes are there to make the drawing simpler. These sensors are intended to measure distance and if the sensor is working correctly, stripes on a piece of paper should have little or no effect. If what you suggest DOES happen, these sensors aren't what Sharp says they are. They are indeed reactive to changes in surface color and reflectance, and they are supposed to be largely immune to these
It's not the illustration I was confusing, it was the wording. I'd cut and paste it but it won't let me - I guess it's an image. It's the last two paragraphs in 12.2.1 on the principle of operation.
The wording that led me to believe this was where it said, "an application of photodiodes", (note the s), and where it made reference to the "ratio of the two outputs". But now that you point out it's a single device, you are probably right - there's no indication in the wording it was two diodes - I just assumed it.
The document talks about where this was "explained" in section 5.5. Let me look for a principle of operation of these PSDs and see if I can figure out what's going on.
I think you are talking about detectors that measure phase shift in the light which works when you want to get delta measurements accurate down to the wavelength of the light. That's not what I was thinking about.
What I was suggesting makes them fairly immune to reflectance levels as well because they measure the ratio of the two signals and not the absolute value of the signals. The idea is that the intensity of the spot would be constructed so that it created a bell curve with the center of the spot being the brightest and the spot getting dimmer as you went out from the center. The spacing of the two sensors would set so that within the working range of the sensor, the center of the spot would be located on or between the two sensors (never outside the sensor).
At the closest range, the center of the dot would be on the outside sensor making it the strongest signal, and the inside sensor the weakest. At the fairest range, this would be reversed, with the center of the dot in the inside sensor. The ratio of the two signals would determine the location of the center of the spot. The ratio might be 2:1 for example when the distance was at one end of the range. If the reflectance of the surface changed, it would reduce both signals by an equal percentage (in theory) so the ratio would stay the same.
The sensor would only get confused, if the reflectance of the surface was different from one side of the spot to the other. So only if a strong edge was located in the middle of the spot would the sensor get confused.
What you are suggesting however, is that the spot is actually very small, and travels across the face of the diode. And the two outputs change as a function of the location of this spot on the surface.
I suspect the effect I'm thinking of happens anyways. I doubt the LED and the optics (not to mention the variable reflective quality of the random surface that is hit) will allow for a very accurate light dot to be focused on the surface of the detector. I strongly suspect it's a fairly defuse spot that covers a wide range of the detector. A laser pointer I have here for example has a beam about 3mm wide which is what you say the surface of the detector is. With a fixed focus lens system designed to operate over a wide range of distances, I don't really understand how they could get a high resolution spot.
So if this is the case, the sensor is still going to be performing some sort of average of the light intensity over the length of the sensor surface for the purpose of estimating where the center of the dot is. And if this is so, I think it's still going to be momentarily confused when the spot crosses a sharp change in the reflective surface.
Either way, it's easy to test how true this is. Anyone that has one of these set up, can just move a target with a sharp reflective change back and forth and see if it causes distance errors with one orientation and not the other.
I'm going to go off now and see if I can find more on how these PSDs actually work so I can learn something else new....
Add in motion that entails changes in depth (distance) and the sensor will also average the effect of the motion. This is true of PID sensors, which are normally positioned so that the two sensing elements are horizontal. That arrangement accentuates the effect of the change, which is exactly what you want in a PID sensor -- detect motion. If you mount a PID sensor vertically, the sensitivity drops.
I suspect some variation but whether it will be enough to change overall accuracy I don't know. One of the uses of these sensors -- the ones with a closer image range -- is for paper handling in printers and printing presses. If they were all that affected by the black ink they wouldn't be as useful for this application.
Sharp has historically offered little hard theory of operation on the PSDs they use in these IR sensors, though I'm sure somewhere on their vast Web site they actually sell the damn things. But other people make them, too. Look up 'lateral effect PSD' or words to that effect and you should come up with something.