Date: 13-06-12
Duration: 5½ hours
Group members attending: Tore, Troels & Kristian
Goal
We need to improve the algorithm making the point chains. And we will look for other ways to improve the code.
Plan
1. The algorithm making point chains has a flaw, so one line may be divided in two with a small gap.
2. Find other improvements
3. Final tests.
Execution
1. The earlier version of the algorithm had a flaw in the way we found beginnings of lines: if we had a line going straight north west a few pixels, and then straight north east a few pixels, the algorithm would start a line at the bend in stead of at the end. Thus dividing the original line in two. This bug was fixed.
2. The robot still drives a little skew. We found out, that we can set the wheel diameter for each wheel individually and this way make up for the error. This proved rather efficient.
The robot constantly makes very small calculation errors, mostly in the angles, so the angle the robot thinks it is heading is not the angle it is really heading. This small error gets bigger, the longer the robot drives. We changed this, so the error is reset after the robot has recalculated(*1).
We had problems with the robot not turning the correct angles. We had used our own heading counter, which was not effective because the robot would not always turn the correct amount. We now use the heading found in the Odometry class. It did not work too well earlier, when the calibration of the wheels was a bit off. But with further calibrations, this has proved more precise.
3. We drew the same image 4 times, with 4 different colours, on top of each other, to see how precise it was, or how consistent in the errors. Here is the image:
We measured the angle between the right blue and red eye. They are off each other by about 11 cm. The difference in angle between the headings at the origin, when the robot drove out to draw the eyes, are about 6 degrees. When the ultrasonic sensors are not more precise than integer cm, this angle difference is unavoidable, and must be considered acceptable in our case.
It is also worth to notice how close the recalibration dots are to each other (most of them, at least). Shown here:
We have had problems with the right ultrasonic sensor measuring strange distances sometimes. Even though the robot hardly turns and the left sensor only measures a difference in distance of about 1 cm, the right sensor could measure up to a 10 cm difference sometimes. This caused the robot to sometimes turn large angles, even though it should only have turned 1 or 2 degrees. We set a limit, so that it could turn at most 5 degrees, and this seemed to help.
Status
We have spent a great amount of time on getting the wheel distance and diameter correct, and so far have not been very successful because two motors might not turn equally. We finally found a way to fix this effectively by setting the wheel sizes individually.
We came up with a new idea to increase the precision of the heading after recalibration, but we do not have time for it: We could mount two light sensors on the robot. When they are both above a strip of tape on the board, the robot could be considered to be at the correct angle.
References
(*1) http://troelskristiantore.blogspot.dk/2012/05/legolab-code-drive.html
No comments:
Post a Comment