Hi,
The robot must drop the payload within a 6x6 inch square BLACK target area (a poster board on the floor), that is within a larger 18x18 inch square WHITE area. Both squares have 1 inch thick black outlines.
Do you have a link to a sketch or a photo of this?
As I understand it, if driven in a straight line through the course you'll drive on:
~8½' on a (here) undefined surface color
1" of black outline
5" of white
another 1" of black outline
6" of black dumping site
yet another 1" of black outline
5" of white
last 1" of black outline
~8½' on a (here) undefined surface color
I don't understand why there has to be a border around the already black dump site, and if it is so, I'd just define it as an 8" black - can you confirm if it is indeed what it looks like?
An
IR reflectance sensor would work well in combination with odometry.
With an encoder disc on each wheel, you can make it go straight
and count the approximate distance to the first black border, then let the IR detect whether you're over black or white and when the block is in place, revert to odometry to get to the goal line.
If you load the block manually, it should be unloaded at the back of the 'bot, or you'll have to drive around it, which will likely take you off the straight and narrow.
Is there any markers/borders/whatewer that you can use to keep the straight line?
If not, I doubt that you can get it to run as straight as needed. Aiming for the middle of the 6", the distance of 120" means that if one wheel is marginally faster (like travelling 0.04" more than the other on the 10'), it will not hit the dump site and your 'bot will have to search for it - much more involved to make software for.
Here is a basic idea of pseudocode for this:
IF visual sensor senses sudden change from white to black THEN
stop motor after 0.5 seconds (the bot drops off the rear, so it needs to move forward a bit)
tell Servo to rotate out of the way of payload
start motor
END IF
I'd mount the sensor in the front or somewhere under its "belly" and look for the black-to-white transition when it is on its way out of the dump site and then let it slide the block off and continue - I take it that "anywhere in the black square" is OK, as long as the block doesn't touch white?
The 1 inch thick black outlines of the target areas scare me though. Will this throw off my robot's sensor? Should I instead program it to ignore the first line it sees and stop at the next?
You know that the "wrong" black line/border is 1" and that will be easy to measure, by counting clicks from the encoders.
With optimum placement of the sensor, you can dump the block when you see the black/white transition - you may even be able to dump it without stopping and land it right in the middle.
Only one sensor means that you cannot be absolutely sure that the block will land at dead center - you decide how importans that is.
Since you are allowed up to a 12" square footprint, 3 to 4 sensors could be used to make sure you are right over the 6" square.
If you have any links to this, do post them, as it will help us help you