dinsdag 14 juni 2011

Real time testing of the (semi-) final code

Today we had our last 2 official test hours before the actual Mars Mission. We made some minor adjustmunts to the code.
For example, we first had some problems with the Rover getting stuck while turning in the random drive mode due to the rough surface. Because the encoder then does not count anything in that case, the motor kept running for eternity, because the Rover is not moving. Now the 'random drive' will stop if after a while the counts are not met, so the Rover can continue. We also tried an extra burst to let the Rover come loose again, but this can be too dangerous near an edge.
Another bug was that sometimes the Rover wanted to measure the lake twice before proceeding, this bug is also fixed now.

We tried several test runs today and made some adjustments while testing. The resulting best Mars Mission is depicted in the video below:
In this Mission all the 3 lakes are found, but only 2 are measured and transmitted to Earth correctly.
The Rover starts and directly finds the first lake. It then turns towards it and drives closer. When it is closer, it again recheives coordinates and adjusts the turn-angle once more before it drives to the first lake. The Rover stops in time and measures a temperature of 22 degrees Celcius. After the temperature measurement, the Rover advoids the lake and goes into 'random drive' mode. It then turns left and right is such a way that a field on vision of 180 degrees is obtained. Note that the Rover stops at the maximum turn-angles and does regular stops, so the video processing has enough time to detect lakes.
When the Rover has found the second lake, it first drives closer to the lake. When it is close, the Rover turns and starts driving towards the lake untill the middle lightsensor detects the lake. However, the middle lightsensor already triggers a too big change and thinks the lake is there already (before the actual lake is reached). This results in a fake second measurement.
But the Rover again 'avoids' the 'lake' and starts to drive 'randomly' as we programmed. In the meanwhile, the Rover detects an edge and adjusts for it as we designed (drive a little bit backwards and then turn to the right direction, which is in this case turning right).
Then it again starts the random drive sequence (because still no coordinates are received) untill it finds the last lake. This lake is again measured perfectly, resulting in a temperature of 21 degrees Celsius.
The Rover now thinks it has measured 3 lakes, so it BEEPS and 'END' is displayed on the lcd screen of RCX 1. The mission was a (partial) succes!


Our Rover still does not perform perfectly and still some small bugs are in the program. However, (testing) time is limited, there are a lot of groups and the deadline is tight. We will possibly try to adjust some minor things tomorrow (the day before the real mission) and off course we will test this. (If we can borrow some time from other groups).
However, we assume that we now have our (semi-) final code, because more testing and debugging is almost impossible.

Hopefully we will perform well in the actual mission, as we did at the linetracking contest!

Geen opmerkingen:

Een reactie posten