... | @@ -247,3 +247,34 @@ When we ran the code and observed the behaviour of the Legocar, we saw that the |
... | @@ -247,3 +247,34 @@ When we ran the code and observed the behaviour of the Legocar, we saw that the |
|
Although, we observed that the Follow class was prioritized above the Cruise function which is in line with figure 9.9. This is seen more clear when observing the robot running, namely due to the lack of forward movement when the movable light sensor is taking light measurements.
|
|
Although, we observed that the Follow class was prioritized above the Cruise function which is in line with figure 9.9. This is seen more clear when observing the robot running, namely due to the lack of forward movement when the movable light sensor is taking light measurements.
|
|
|
|
|
|
|
|
|
|
|
|
## Exercise 5 - The classes SharedCar and Arbiter
|
|
|
|
### Goal
|
|
|
|
First we want to describe how the classes SharedCar and Arbiter implements the arbitration. Second we want to compare this with the arbiter of Fred Martin [4, page 214-218].
|
|
|
|
|
|
|
|
|
|
|
|
### Results
|
|
|
|
In [7] they describe the Arbitrate function as a message passer between other processes. The function implements wiring instructions as an ordered list with statements. In the case when more outputs direct to the same input, those that occur later overwrites the ones that are represented earlier. This is also called subsumption.
|
|
|
|
|
|
|
|
As described in [14] is the basic principle about the prioritization algorithm that each process has a priority level, pair of output values representing its left and right motor commands, an enable, disabled state indicator, and a process name character string associated with each process displayed for the user. This prioritize() process runs alongside all of the behavior processes. It cycles through the list of enabled processes and finds the one with the highest priority. Hereafter it outputs the preset motor commands to the motors.
|
|
|
|
|
|
|
|
As we see it, the SharedCar.java is made with opposite prioritization list than in the Arbitrate function in [7]. The SharedCar class prioritizes the ones in top, higher than the ones in the bottom in the array.
|
|
|
|
|
|
|
|
In regards to the prioritize() process described in [14] the only difference is again the way the list i processed when executed. However, the end result in the behavior would after our opinion be the same.
|
|
|
|
|
|
|
|
### Conclusion
|
|
|
|
The similarities with the different prioritization functions are canning. The only thing we can see is that the way the different lists is gone through. However, we can not see why any of this would affect the behavior of the robot, if you prioritize the different list after how they are being processed.
|
|
|
|
|
|
|
|
|
|
|
|
### References
|
|
|
|
1. [Programs.zip](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson7.dir/Programs.zip).
|
|
|
|
2. [Base car with extensions](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson7.dir/ExpressBot.pdf).
|
|
|
|
3. [Video 1: Ultrasonic vehicle, that avoid obstacles ](https://youtu.be/0X5SQltdXz0)
|
|
|
|
4. [Video 2: Ultrasonic vehicle, that fails](http://youtu.be/Wn6aq8CE_xo)
|
|
|
|
5. [Exercise1.java](https://www.dropbox.com/s/83mj1wuzkk4evv9/Exercise1.java?dl=0)
|
|
|
|
6. [Video 3: Ultrasonic vehicle, with changes](http://www.youtube.com/watch?v=vxkc_psuFeE)
|
|
|
|
7. Jones, Flynn, and Seiger, ["Mobile Robots, Inspiration to Implementation"](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson7.dir/11128_Mobile_Robots_Inspiration_to_Implementation-Flynn_and_Jones.pdf), Second Edition, 1999.
|
|
|
|
8. [Video 4: ](http://www.youtube.com/watch?v=6-VHqw5FNXI)
|
|
|
|
9. [Video 5: ](http://www.youtube.com/watch?v=HoA4X3ayZ7c)
|
|
|
|
10. [Video 6: Escape Behavior](https://youtu.be/1lsKNla-ex0)
|
|
|
|
11. [Escape.java](https://www.dropbox.com/s/54pg3bsidb0jn4c/Escape.java?dl=0)
|
|
|
|
12. [Video 7: Motorpowered Lightsensor](https://youtu.be/ISU8eYocQm4) |
|
|
|
\ No newline at end of file |