... | ... | @@ -357,10 +357,27 @@ Describe how the classes SharedCar and Arbiter implements the arbitration sugges |
|
|
|
|
|
#### Result:
|
|
|
|
|
|
SharedCar:
|
|
|
The SharedCar class checks if the instruction classes Cruise, Follow, Avoid and Escape can be run and sets the current triggering condition to true or false.
|
|
|
|
|
|
Arbiter:
|
|
|
The arbiter class looks at the array and decides what command to run dependant on priority and if the triggering conditions are met I.E true. The priority is highest at place 0 because it is the first to be checked in the array.
|
|
|
|
|
|
![IMG_8268](http://gitlab.au.dk/uploads/group-22/lego/21a33a9b19/fig_9.9.png)
|
|
|
##### Fig.16 - Illustration from [2]
|
|
|
##### Fig.16
|
|
|
|
|
|
As we can see in fig.16: Cruise is always active unless it is overruled by one of the command classes with higher priority.
|
|
|
|
|
|
Jones, Flynn, and Seiger use a method, void arbitrate() (Fig. 17) to check a flagged status on each behavior. If two behaviors are flagged at the same time, the behavior that is last in the while loop takes highest priority. This is because motor_input is overwritten by the last command to arrive.
|
|
|
|
|
|
|
|
|
![IMG_8268](http://gitlab.au.dk/uploads/group-22/lego/0165cb92a7/211.png)
|
|
|
##### Fig.17
|
|
|
|
|
|
The advantage of this method, is that it is easy to maintain an overview of what command classes affects the behaviour of the robot, since they are all prioritized in one arbitrator class [2 p.306-309.]
|
|
|
|
|
|
|
|
|
## References:
|
|
|
|
|
|
[2], Jones, Flynn, and Seiger, "Mobile Robots, Inspiration to Implementation", Second Edition, 1999.!
|
|
|
[4], Fred G. Martin, Robotic Explorations: A Hands-on Introduction to Engineering, Prentice Hall, 2001.![fig 9.9] |
|
|
\ No newline at end of file |
|
|
[4], Fred G. Martin, Robotic Explorations: A Hands-on Introduction to Engineering, Prentice Hall, 2001.![fig 9.9]![211] |
|
|
\ No newline at end of file |