To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 23096
23095  |  23097
Subject: 
Re: Light seeker
Newsgroups: 
lugnet.robotics
Date: 
Thu, 2 Dec 2004 23:28:48 GMT
Viewed: 
1238 times
  
in lugnet.robotics John Jordan wrote:

Hi, I was wondering if anyone has any experience programming (NQC) a stationary
light seeking head? I have one made using a rotation sensor for reference, and 2
light sensors but can't seem to get the programming down.
Thanks
John Jordan

Why do you use two light sensors? I have made experience with one light sensor
mounted on top of a motor driven and rotation sensored turret. The mechanics has
two drawbacks.

First, the geartrain between motor and light sensor is somewhat relatively
loose.

Second, the light sensor cable adds mechanical random momentum, which is the
most impact of influence to the somewhat loose geartrain.

To avoid the two drawbacks, i have forced the light sensor to look into a
direction, that is preselected by a given rotation sensor number. To perform a
scan, a "for" loop is executed, forcing the light head to look in each
direction, he can look into.

Imagine, you have a given number of rotation to move onto. You read your current
number and decide, in which direction to move the motor. While the motor is
moving, you read the rotation sensor values, and stop the motor, if sensor value
exceeds the given number. After you have stopped the motor, you look, where you
are now. If the given number is not precisely reached, you switch on the motor
again. Doing this endlessly, until the final position is reached. This algorithm
terminates on a lego robot, as my experience says, as the energy applied to the
motor is getting smaller with iteration steps.

If your robot is moving on the ground, as my lighteye robot does, such a
precision measurement of the light environment must be done, after the robot has
been stopped. It takes some seconds to perform the scan.

My lighteye robot searches for the direction of the maximum light, while he is
stopped. Then he is heading into that direction. Thats another special algorithm
called "tractor beam". While sitting on its place, the robot turns direction.
The value of the maximum light is used, to keep the lighthead pointing into
direction. If the axis of the robot and the light head agree to be looking
absolutely forward, the robot starts to move forward, until he finds the light
is getting too dark. He stops and does a new maximum light scan. I use a bumper,
until he hits the light source.

Note, that you can use the NQC errorlog, to dump values to the PC. Regarding
this, you can understand the robot decisions.

Greetings
Ralph



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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