woensdag 15 juni 2011

Finalizing the code

The three tactics have been thoroughly tested and found to be working individually (see other video's). However untill the very last moment, problems had to be overcome with the camera. Sending coordinates proved not to be robust and with limited available test time, it didn't help that the earth computer stalled every two or three tries. If the camera is fully operational tomorrow, we hope to be able to show the tactics working together in a single program, and to find all the lakes within a reasonable timespan!

Tactics part 3

Goal
- Measure lake temperature

Tactics
- When mars rover is not standing above a lake the mars rover drives in a straight line until lake is found with one of the light sensors
- When lake is found the measuring device is let down. If the device hits mars instead of the lake the touch sensor (seen the picture below) is not pressed and the measurement is neglected. The rover will than turn a certain amound of degrees and try again until touch sensor is pressed and measurement is valid.
- Temperature is sent to earth computer
- Turn to tactics part 1



Execution:
Tactics part 3 has been tested as can be seen in the movie below.



Tactics part 2

Goal:

- Drive to lake

Tactics
- Transform camera coordinates to mars coordinates 
- Plan path to lake using map (straight if no edge detected)
- Drive to lake, approaching up to 30 cm. 
- Use camera to position marsrover straight in front of lake, turn to tactics part 3 (also when no coordinates received)

Execution:
Transforming the camera coordinates to lake coordinates was enough to crash the brick time after time. The transformation of the coordinates and the path planning exist in code form but have never been tested due to the crashing. We decided to comment this part and first make sure tactics part 1 and 3 would work properly.
Tactics part 2 now turns the rover in such a way that it is standing straight in front of the lake and than turns to tactics part 3. This has been tested. All intelligence is turned off for now, we hope to be able to use it in the end, but priority is now to get it to work as simple as possible.

Tactics part 1

Goal:
- Find coordinates

Tactics
- The mars-rover turns 360 degree searching for lake coordinates. (Turn certain amount of degree, waits for coordinates, if no coordinates received turn again certain amount of degree with maximum total of 360 degree).
- If no coordinates are found after turning 360 degree the marsrover drives a random distance and again starts turning and searhing for coordinates,
- If during turning coordinates are received the software turns to tactics part 2.
- If during random driving a lake is found the software turns to tactics part 3.


Execution:
Tactics part one is created and tested. It works fine.

Moving on Lightsensors

Due to our extended calibration file we were able to move quite well on the lightsensors. However, during testing on mars, especially at lower light intensities, moving on the lightsensors seemed to be not robust enough. Updating the tresholds during driving was necassary.

New method:
During calibration ten measurements are performed (per sensor) and stored in an array. A new measurement is now compared to the average of this array. If the new measurement doesn't differ much the robot concludes that it is probable on mars and the new measurement is stored in the array. In this way the array is completely renewed every ten measurements, allowing the surface to vary.

zaterdag 11 juni 2011

Presentation and line tracker contest

Last friday we did succesfully our presentation about the mission to mars contest. The slides can be found here.

The line tracker contest didn't went that well. In the morning, during testing, the tracker worked fine. But the focus will now be totally on the mars mission!

donderdag 9 juni 2011

Earth communication

Since multiple groups are still struggling to achieve communication with the earth computer we decided to release our code which allows communication with the earth station. The code consist of the comm.c library with some modifications to make everything work smoothly and the camera.c which consists of a function which sends a temperature to earth and reads the camera. In order for the code to work, cam_x and cam_y should be initialized as integers thread id's need to be created and communication should be initialized the same way as usual. The files are listed below:

http://dl.dropbox.com/u/15883361/camera.c
http://dl.dropbox.com/u/15883361/com.c