Subject:
|
Re: Autonomous Robot
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sun, 6 Aug 2000 06:35:27 GMT
|
Viewed:
|
1295 times
|
| |
 | |
"Mauro Vianna" <mauro_vianna@hotmail.com> wrote:
> > > Although the idea of vertical and horizontal lines seens good, I still
> > > didn't figure out a good algoritm to deal with that. The light sensor
> > > measures a mean light reflection. That means that if it over the edge of
> a
> > > black light and a white paper, the reading could be the same as the one
> > from
> > > a gray line. I confess I still didn't try that. Sometimes you must see the
> > > robot working to figure out a solution...
> >
> > You could measure transitions instead of single values. Sampling some reads
> > at a specified time interval should help you to recognize the situation.
>
>
> Sorry, Mario, I still didn't figure out your proposal. Could you explain
> that better? Did you (or anybody else?) already did that? Maybe if I can
> understand better looking at the code, if available...
It's true that when you're on the border of the tape your light sensor reads
an average value, but if you continue in the same direction you will finally
get into the middle of the tape and supposing the tape is large enough you
will read the pure tape color (reflection intensity). So what you have to do
is keep reading until you pass the maximum (minimum) value and store the
latter to decode the tape.
Hope some meta code can clarify the idea (supposing the tape reads higher
values then the floor):
loop
// while moving around, you monitor the light sensor
max value = light sensor value
if max value > floor reading // tape found!
{
// look for maximum reading while crossing the tape
loop
new value = light sensor value
if new value > max value
max value = new value
else
exit loop // readings are now decreasing so you're getting off
the tape
end loop
// decode max value to a specific tape
if max value in tape1 range values
tape is tape1
else
tape is tape2
// from now on do whatever you want with this info
...
}
end loop
Hope this helps... and works, I didn't test it :-)
Mario
|
|
Message has 1 Reply:  | | Re: Autonomous Robot
|
| (...) Hmmm - but if the robot was driving nearly parallel to a white tape, then hit the boundary (thus getting a prolonged mid-grey value) and then drifted off just enough to get back over dark floor - then the input to the sensor could exactly (...) (25 years ago, 6-Aug-00, to lugnet.robotics)
|
Message is in Reply To:
 | | Re: Autonomous Robot
|
| (...) a (...) the (...) reads (...) Sorry, Mario, I still didn't figure out your proposal. Could you explain that better? Did you (or anybody else?) already did that? Maybe if I can understand better looking at the code, if available... (...) that. (...) (25 years ago, 6-Aug-00, to lugnet.robotics)
|
37 Messages in This Thread:         
      
       
     
  
      
      
    
    
    
             
           
    
     
     
     
   
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|