donderdag 9 juni 2011

Chess Line-Tracking Competition

Because tomorrow the final Chess Line-tracking competition will start, it is time for us to reveal our strategy for the line-tracking.
We have held the exact details of our code and strategy secret to make sure other teams do not copy our ideas. We do the same with our Mars Mission. Tomorrow in the presentation most of our ideas will be showed, but also just before the Final Mars Mission we will update our blog with our strategy and code for the Mission.

The first idea for the line tracking is to keep things as simple and effective as possible. This is the reason that we chose for one RCX brick. On this brick we use the following things:
RCX 1:   Light sensor 1      Determine the start and the end of the line and reject cracks on the way.
              Light sensor 2      Track the edge of the line with a PD controller
              Encoder 1            To measure the distance of the tape
              Motor 1               Drive the left front wheel
              Motor 2               Drive the right front wheel

This idea is also visualized in the figure below. The tape detection light sensor is placed a little bit up front to the PD line following light sensor in order to find upcoming disturbances, cracks and of course the beginning and the end of the tape.


First the rover is placed at the beginning of the tape and started. It then calibrates the light values of the tape for both the sensors (because the sensors are not the same). It then drives backwards and calibrates the light values of the surface for both sensors. Note that we read out the raw data of the light sensors, so we have a better resolution which will give us an advantage in tracking the line and to be more robust. After this, the Rover drives towards the tape and stops when the beginning of the line is detected. It then BEEPS and starts the tracking.
The first light sensor tracks the line and when a crack with a too high variation from the original tape light value (this can be both a lighter or a darker disturbance on the tape) or the end of the tape is detected, the PD controller will be shut down for a certain time and the Rover drives straight until again the tape is found. If it takes too long before a tape is found, the Rover assumes it was the end of the tape, stops driving, BEEPS again and displays the length of the tape in [mm] on the screen.
The second light sensor tracks the EDGE of the tape (and thus the transition between the tape and the surface) with a PD controller. In this way the line can be tracked very smooth and precise. The P action makes sure it tracks the edge of the line by letting the Rover make small corrections on the speed of the motors. The D action is used to correct errors that ‘haven’t even occurred yet’ and thus to let the Rover drive smoother. In our first implementation we also used an I action (PID controller) to let the error go to zero. But we know we only have to drive a ‘straight’ line and because the distance measurement is very important, we preferred the smoother PD controller.
Another very nice thing about this PD controller is that we scaled the error such that the PD controller is tuned the same for every possible tape and surface.
To have an accurate measurement of the length of the tape in [mm], it was demanded to have at least a resolution of 1 [mm/ encoder increment]. We made a special gearbox with a different transmission ratio form the motor to the wheels to acquire a certain amount of torque and speed and a ‘different’ transmission ratio from the wheels to the encoder. A transmission ratio of 0.948413 [mm/encoder increment] is achieved with this method, giving very accurate measurements of the line.

Even better would be to also use the second encoder, so we can average the length of both encoders in case there is a lot of curvature in the line. To implement this, a second RCX brick is needed together with communication. Because of the tight schedule for the Mars Mission and a Line-tracking design that is already satisfying our requirements, we decided to put our (limited) time and energy into more important things.

A last movie of the line tracking is depicted below. We have a lot of confidence that our Line-tracking Rover will perform well and hopefully finish in the top 3 at least.


Geen opmerkingen:

Een reactie posten