torsdag den 27. september 2007

The war has begun

The goal with this weeks labsession is to get our Borg warrior through bootcamp, so that it will be ready for next weeks big race.
We will experiment with some prewritten color detection sensorprograms and try to get some insight into the simpler linefollower programs. We will then proceed to write a color detection program of our own, that is able to destinguish between black, white and green. We will then incorporate this into version 1 of our "race" program.

And the Borg said: "Let there be green"
..and he saw that it was good. Or at least better than monochrome vision.
Our initial experiments with the black and white sensor program was encouraging. The calibration feature is clever, since it allows the robot to function under various indirect lightsources without having to recode constant values. We did however stumble into a potential problem with the "ducktape" black color. It comes off as very light since it is very reflective of light. This means that the red light from the diode gets reflected instead of absorbed by the black color, hence making the values for white and black very close to each other. One thing that can be done about this is to turn the red light off, but this somewhat limits the functionality of the sensor in darker areas.
We will have to keep this in mind, and make a decision about what to do (or if it is even a crucial problem) once the race track is set up on friday.

After having played around with the black and white detector, we then wrote a ColorSensor program which could also see green, in addition to blackand white. It was basicly just a small addon to the excisting program, with an extra value.
To see if we are reading a green value, we compare the read value to the green light value (which we determine when we calibrate), but with a +- 1 margin to the value, to accomodate changing indirect light in some manner. We also make sure that we are not reporting a black or white value, if we are actually reading a green value.
This seems to work relatively well, as long as the shade of green is pretty constant, and the indirect light doesn't change too dramaticly.

Mr. Borg, take us to warp 3!
To be able to actually have a fast robot, we figured we would play around with some gearing. We dismantled the robot and rebuilt it with gears, levers and stabilitators. After all the work was done though, we did not see any performance inhancement. It seems that the motors simply does not have enough power to be able to handle any heavy gearing. Also the gears from the lego kit is not the best in terms of performance and stability. They are fine if you want to make something run slower (or more stable) at higher power, but it is harder to make it go faster.
We are still toying with a few ideas however, and the robot will probably end up tweaked out in some way eventually. We will definantly try out a few more ideas before giving up entirely in any ways.
Simultaniously we managed to create a simple linefollower program that uses the new color sensor. This means that we can now follow a line, untill we get to a green color, and the stop and output the travel time. This means that we at least have the minimum requirements up and ready for the competition, which is always a good thing.

Ready, set, think!
Untill next labsession, we will try to come up with intelligent ways to drive fast along a line. It will be easier to determine the best approaches, once we see the actual racetrack, but we are already playing around woth ideas about several lightsensors in action at once. By placing two lightsensors next to each other, eg. in front of each wheel, we would be able to make smoother turns, and hence keep up the speed longer.
One thing we have yet to decide on as well is in what manner to take sharp turns. But again, we will have to see the racetrack for final considerations.
Untill then, the work on the Borgs forward motion continues, but where it stands now, we fear that we have to do a total reconstruction, in order to apply proper gearing. Time will tell.

Ingen kommentarer:

Bidragydere