User Tools

Site Tools


Lab report 6

Date: October 7th 2008
Duration of activity: 8-13
Participants: Kasper, Bent and Johnny

Purpose The purpose of this exercise is to make a line following robot to compete in the robot race. We have abandoned the idea of drive the wheels in opposite directions and instead make a more intelligent steering based on the thesis that it is better move forward at all times when working on a car which is intented for time trials.

Test run 1

We decided to continue from the basis program from Lab5. To improve the car's turning ability we now decrease the motor power when turning. We found that the turning ability was highly affected when we changed from small diameter tires to large diameter tires. Of course the top speed was improved, but it seemed that the steering suffered from the high speed. In order to improve this we need to reduce the motor power while turning. After some trials we found that 90% power while turning improved the car's ability to stay on track. We now await what happens when the battery power is reduced. We have decided not to implement any kind of gearing because we consider this assignment a software implementation opposed to a mechanical implementation.

Test run 2

Here another attempt is made to find the optimal lengt of the sensor arm as it seems that the sharpness of the turns and the following oscillations between left and right could be reduced by reducing the lenght of the sensor arm. Some tests seemed to make oscillations even worth and the ability to track sharp corners on the track was reduced. This led us to reconsider the software once again to implement a memory of the last sensor inputs in order to use this memory to turn with different angles. This idea was proposed in Lab5, but was not implemented

Test run 3

We have implemented a counter, which is incremented each time the program decides to make a turn in a similar direction. This allows us to increase the turning angle as the counter is incremented by adding more power to the turning wheel. The tests have shown better performance, but it is difficult to find the right numerical values of the parameters. The main problem is still oscillations between right and left as they make the car run slowly or in worse case - it gets lost. At least now we have a more adaptive approach to the turning problem that increase the turning angle proportional to the sharpness of the turns.

Test run 4

In relation to this test we have adjusted on the motor power in forward mode. If this power is too big e.g. the car is coming out of a right turn and into a left turn, the car will spin off the track since the sensors will detect a forward mode between the turns. Another ajustment to the forward power was done to the first part of the race track. There are 2 tight corners in the beginning. Therefor we decided is was nessesary to adapt to this fact. We gradually increased the power delivered to each motor. This was done by a division factor applied to the motor power starting at 1.2 and decreasing to 1 (as in no division factor applied). This helped Marvin to make those tight turns in the beginning af the track.

Test run 5

In this test we have changed the tires and made further mechanical improvements to stiffen the coachwork of the car. Thereafter we needed to change the numerical values of the light sensor variables in the program, because the distance from the sensors to the lane had been changed. The first tests showed some problems, but we adjusted the readings to the following

White: RCX=32, NXT=55
Black: RCX=26, NXT=37
Blue: RCX=26, NXT=39

After implementing the new values the car ran proporly again, but the battery was now too low to measure any improvements regarding time trials. We also implemented a read out of the time from start to end by using the function currentTimeMillis(). The elapsed time is shown in the display after each testdrive.

The fastest time we ended up with was 28.7 seconds according to the readout fra Marvin.

Some thoughts on succes

During development of The fastest Marvin we discussed what our success criterion was… And literally how success was measured. If the goal is to make Marvin drive as fast as possible from A to B on a known track (as the one in the lab) it would be something like go forward 5 cm from start, turn 90 degrees untill black is detected then turn 90 degrees until blue is detected. It is the fastests way from A to B. But is this the sufficient to say that the track has been driven? We think not. For a rabot to have completed a track we think that the robot must be on the track, that is with the black line between the wheels, for a certain procentage of the time it takes to complete the track. So instead of having full speed all the time and hope for the best we decided, among other things, to slow down in corners to avoid big oscillations. We have also made an attempt to make Marvin universial in the sense that Marvin could race on any track with a black line on white background.

Conclusion - Future development

To make Marvin go faster we could experiment with gearing. We also believe that we could squeeze a second or two with tweaking the power applied to each motor even more.

We believe that we have covered som of the fundamental issues regarding development of a race car line follower and have made a decent product.


marvin/lab6.txt · Last modified: 2008/10/31 08:56 by rieper