by Guest » Mon Dec 06, 2004 1:59 pm
I've played some with laser pointers and USB and firewire cameras.
My plan is to aim some lasers at the floor in front of the camera.
If the camera doesn't see the laser dots in the right place in the image,
that means that the robot shouldn't go that direction. Either there
is an obstruction, so the laser is blocked, or the floor is missing
(top of stairs, edge of cliff, etc...).
The laser modules don't draw much current, so they can be driven directly
from an AVR pin, if one is available. Are any available? I want to start
with five lasers, left wall, left floor, center, right floor, right wall.
If the robot is following a wall on the right side, the right wall laser
should hit the wall, and the right floor laser should not.
In a phased lighting setup, alternate frames are captured with the
phased lights on. Even with many other confusing light sources,
such as children with laser pointers, the robot can distinquish
its own lights from the decoy lights. This requires that the light
controller knows when frames start and end, so it can turn the lights
on and off as appropriate.
Even if the AVRcam doesn't have any available I/O pins, the host computer can
control the lights, if it can get accurate frame timing information from
the AVRcam.
It would be easier if the red laser dot was always red in the image.
On my firewire cameras, a dim red dot is red, as it gets brighter, it
changes color. The USB camera suffered something similar, but with a
different sequence of colors. The cameras were adjusting the gain, white
balance, and other parameters in real time to maintain a "good" image.
So as the ambient light got dimmer, the laser dot got relatively brighter.
I could manually adjust the laser brightness to maintain a constant
relative brightness. If the AVR driving the laser has an available
timer, it could control the laser brightness with pwm.