Subject:
|
Re: IR collision avoidance
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Thu, 27 Feb 1997 06:03:49 GMT
|
Original-From:
|
Richard Vannoy <richardv@#avoidspam#abac.com>
|
Reply-To:
|
richardv@abac.comSPAMLESS
|
Viewed:
|
2419 times
|
| |
 | |
> ** My only question is how do you keep the bot at a constant 18 inches
> ** away from the wall with a collision detection algorithm? Is it
> ** possible to get analog outputs from a sensor indicating the
> ** distance from a wall? Or is there is better way to do this?
Good question! We had a lot of noise problems and learning curve
stumbles along the way. Our first bad news was that we had a range of a
few inches. We finally beat that one fooling with frequencies, caps,
etc. and then found out our range was SIX FEET!!! We didn't want that
either, so James (in the Cc above) had a bright idea. He put a pot in
series with the output LED to see if he could control range with current
and sure enough it worked! About 1 mA and he got two feet (which as
programmer, I needed to make sure our bot could turn and avoid
walls/obstacles). Let me see if I can draw it...
|
| A
| / B
| /
| /
| /
| /
| /
| /
| /
| /
| /
-------------
| X Y |
| |
| |
| robot |
--------------|
A = forward looking IR
B = IR pointed at 45 degrees from forward (actually NOT 45 in this
drawing)
X+Y = the IR transmitters located just above the receivers.
Now close your eyes and imagine you are the bot. Also when you stick
your left arm directly out in front of you that is front IR, and when
you stick your right hand out at 45 degrees, that's your right IR. Now
here is pseudo code...
Step 1: Stick out your left hand. Did it hit anything?
If YES, TURN LEFT 90 DEGREES RIGHT IMMEDIATELY, you are about
to hit the wall! Skip step 2 and go on with other things.
If NO, go to step 2
Step 2: Stick your right hand out at 45 degrees. Did you hit
anything?
If YES, you are too close to the wall, so move the steering
wheel to LEFT 10 degrees to ease AWAY from the wall.
If NO, then you are not near any walls, so move the steering
wheel 5 degrees to the right. This will put you in a long
slow arc to the right until you get close to a wall.
Step 3: Do other sensor checking and go back to step 1.
Step 2 is the key! Notice what happens when you are close to the wall.
You are either too close or too far all the time, so you are correcting
a lot by shifting the wheel from 5 degrees right to 10 degrees left. As
you watch our bot it seems (to someone who doesn't know what's
happening) that it travels in a straight line 18 inches from the wall,
but if you look close, the wheel shifts back and forth about once or
twice a second, correcting constantly. See the wall? move away. Don't
see it? move closer, over and over. It really comes out quite smooth.
So the formula for a wall hugger is the IR range divided by 1.414 =
range from the wall.
|\
| \ Not to scale, but hypoteneuse of a square is one
side
A| \ B times 1.414
| \
| \
------
C
A = distance to wall
B = IR beam
C = WALL
If B = 2 feet, and B = A * 1.414, then A = 24 inches / 1.414
or 16.973 inches, or as we say, about 18 inches.
|
|
Message is in Reply To:
 | | Re: IR collision avoidance
|
| (...) ** My only question is how do you keep the bot at a constant 18 inches ** away from the wall with a collision detection algorithm? Is it ** possible to get analog outputs from a sensor indicating the ** distance from a wall? Or is there is (...) (28 years ago, 27-Feb-97, to lugnet.robotics.handyboard)
|
6 Messages in This Thread:   
        
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|