To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 45
44  |  46
Subject: 
Re: Light sensor initialization?
Newsgroups: 
lugnet.robotics.rcx
Date: 
Thu, 15 Jul 1999 20:51:13 GMT
Viewed: 
1877 times
  
In lugnet.robotics.rcx, Matthew Miller writes:
That doesn't work in the case where you don't want your bot to start out by
going in a circle.

Huh? You mean, your robot doesn't work unless you point it in a certain
direction before starting the program? That doesn't sound too robust.

Okay, let's change the algorithm:

(this is for a line tracker that follows "dark" lines and relies on its
orientation at startup)

1. Check the light level.
2. Start moving forwards. Take some light readings.
3. As soon as the reading has changed a "significant" amount (a constant that
depends on whether you're reading in raw mode or light-sensor mode) look and
see what direction it has changed in.
4. If it went up (brighter) a significant amount, that means you were on a line
and just went off. Split the difference between the lowest and highest readings
you've seen so far and use this as the cutoff from now on. Also, turn to locate
the line again and continue.
5. If it went down (darker) a significant amount, that means you weren't on a
line but just found it. Split the difference to get the cutoff value. Continue
moving forward because you're on the line.
6. From here on you do your standard line following algorithm.

How's that? That will adapt to the ambient light level and differences in
surface darkness and doesn't do any initial turning.

- Robert Munafo



Message has 1 Reply:
  Re: Light sensor initialization?
 
(...) Partly, I can think of cases where that might be ugly. But more importantly, I often want to set up a scenario so that two robots will bump into each other in a certain place. (For making movies, showing off to friends, etc.) Can't do that as (...) (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)

Message is in Reply To:
  Re: Light sensor initialization?
 
(...) going in a circle. (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)

10 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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR