|
|
# Group 4
|
|
|
|
|
|
## Lab Notebook 9
|
|
|
|
|
|
**Date:** 05/05 2015.
|
|
|
**Group members participating:** Tine Hansen, Daniel Moltzen, Mads Eriksen, Lars Høeg.
|
|
|
**Activity duration:** 39 hours.
|
|
|
## Structure
|
|
|
The report is structured as follows;
|
|
|
|
|
|
- Goal: The goal for the lab report.
|
|
|
- Plan: What are we going to do.
|
|
|
- Experiments with the BumberCar.
|
|
|
- Opening tests with the sumo robot.
|
|
|
- Final Results: Contains our final results and what we have done to reach our goal.
|
|
|
|
|
|
|
|
|
## Goal
|
|
|
Our goal in this session is to construct and program a sumo wrestling LEGO robot. We also want to try sumo wrestling against another LEGO robot in a specific arena. Another goal, is of course, to experiment with different setups and designs. Aswell, we will experiment with different ways of conducting the software program.
|
|
|
|
|
|
|
|
|
## Plan
|
|
|
The plan is to build a BumberCar to try out the different experiments with. After doing the mandatory assignments we want to add more parts to the robot to make it stronger in a fight against an enemy.
|
|
|
|
|
|
|
|
|
## Experiments with the BumberCar
|
|
|
Press the touch sensor and keep it pressed. What happens? Explain.
|
|
|
|
|
|
When conducting the first experiment with the bumbercar (Figure 1) we experienced that when the touch sensor was activated, the robot started to go through the detectWall class, which was driving firstly driving backwards and then turn a bit, still going backwards, after a couple of seconds it starts driving forward again to see if the coast is now clear.
|
|
|
|
|
|
![IMG_1760](http://gitlab.au.dk/uploads/u4099/legolabtimadala/f008cef598/IMG_1760.JPG)
|
|
|
##### Figure 1: BumberCars frontview
|
|
|
|
|
|
- Implement a third behavior, Exit. This behavior should react to the ESCAPE button and call System.Exit(0) if ESCAPE is pressed. Exit should be the highest priority behavior. Try to press ESCAPE both when DriveForward is active and when DetectWall is active. Is the Exit behavior activated immediately ?
|
|
|
|
|
|
After implementing the third behavior, Exit, we tried out the behavior and experienced that it was not triggered immediately when pushing the grey button very quickly. We then tried to push the button slower and then it work fine and thereby exits the program and stops driving.
|
|
|
|
|
|
- Both DriveForward and DetectWall have a method takeControl that are called in the Arbitrator. Investigate the source code for the Arbitrator and figure out if takeControl of DriveForward is called when the triggering condition of DetectWall is true.
|
|
|
|
|
|
When detecting a wall via the touch sensor, both the takeControl method for detectWall and DriveForward is set to true (fig 1) [7]. Even though, the takeControl method of drive forward is called, it is being suppressed since it has a lower priority than detect wall in the Arbitrator array. |
|
|
\ No newline at end of file |