User Tools

Site Tools


marvin:lab10

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
marvin:lab10 [2008/11/28 09:07] devamarvin:lab10 [2008/11/28 09:16] (current) deva
Line 5: Line 5:
  
 ====Project Goal==== ====Project Goal====
-In this lab session we will investigate how a behaviour-based architecture(([[http://lejos.sourceforge.net/nxt/nxj/tutorial/Behaviors/BehaviorProgramming.htm]])), has been implemented in the subsumption API of leJOS NXJ. We will investigate the interface lejos.subsumption.Behavior and the class lejos.subsumption.Arbitrator and try to make an alternative implementation of the Arbitrator.\\+In this lab session we will investigate how a behaviour-based architecture(([[http://lejos.sourceforge.net/nxt/nxj/tutorial/Behaviors/BehaviorProgramming.htm]])), has been implemented in the subsumption API of LeJOS NXJ. We will investigate the interface lejos.subsumption.Behavior and the class lejos.subsumption.Arbitrator and try to make an alternative implementation of the Arbitrator.\\
 \\ \\
 {{marvin:lab10-1.jpg?300}}\\ {{marvin:lab10-1.jpg?300}}\\
 //Marvin// //Marvin//
 +
  
 ====Plan==== ====Plan====
-The plan for today is devided into two parts. First we will investigate and evaluate the behaviour of BumperCar((BumperCar.java can be found in the example folder of the LejOS source code - http://lejos.sourceforge.net/nxj-downloads.php)). And second we will change the behaviour of Arbitrator for BumberCar(([[http://legolab.daimi.au.dk/DigitalControl.dir/NXT/Lesson10.dir/Lesson.html]]))+The plan for today is devided into two parts. First we will investigate and evaluate the behaviour of BumperCar((BumperCar.java can be found in the example folder of the LejOS source code - http://lejos.sourceforge.net/nxj-downloads.php)). And second make suggestions on how to improve the Arbitrator in LejOS to better suite the model described in Krink.
  
 ===Part One=== ===Part One===
Line 17: Line 18:
   * Behaviour of BumberCar((BumperCar.java can be found in the example folder of the LejOS source code - http://lejos.sourceforge.net/nxj-downloads.php))   * Behaviour of BumberCar((BumperCar.java can be found in the example folder of the LejOS source code - http://lejos.sourceforge.net/nxj-downloads.php))
   * Investigate the source code for the Arbitrator((http://lejos.sourceforge.net/nxt/nxj/api/lejos/subsumption/Arbitrator.html))   * Investigate the source code for the Arbitrator((http://lejos.sourceforge.net/nxt/nxj/api/lejos/subsumption/Arbitrator.html))
-  * Implement a third behaviour called Exit that will react on Escape button +  * Implement a third behaviour called ExitOnEscape that will react on Escape button 
-  * Implement a fourth behaviour called Playsound that will react on Enter button+  * Implement a fourth behaviour called PlaySound that will react on Enter button
  
 ===Part Two=== ===Part Two===
-Implementation of an alternative Arbitrator that will make sure that takeControl of all behaviours are called each time through the loop. When the Arbitrator is working we will compare it to the lejos Arbitrator. +Suggest alternative implementation of an Arbitrator that will make sure that ''takeControl'' of all behaviours are called each time through the loop. 
 + 
  
 ====Execution==== ====Execution====
-The program bumberCar.java is run in the NXT and we observe what happens when the touch sensor is kept pressed constantly. We expect the hitWall behaviour to be active making Marvin go backwards and turn over and over. This is not what happens though and the reason for this is found by inspection of the arbitrator within the Lejos system. The source code for the arbitrator is shown below. +The program BumberCar.java is run in the NXT and we observe what happens when the touch sensor is kept pressed constantly. We expect the ''HitWall'' behaviour to be active making Marvin go backwards and turn over and over. This is not what happens though and the reason for this is found by inspection of the arbitrator within the LejOS system. The source code for the arbitrator is shown below. 
  
-The lejOS Arbitrator+The LejOS Arbitrator
 <code java> <code java>
 public class Arbitrator { public class Arbitrator {
marvin/lab10.1227859632.txt.gz · Last modified: 2008/11/28 09:07 by deva