From: Mart Lubbers Date: Mon, 19 Oct 2015 20:19:54 +0000 (+0200) Subject: update and hand in X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=ac063bb1415e843f4f0bddb192f23474aecf1f76;p=des2015.git update and hand in --- diff --git a/mart/ev3/ex1/explanation.txt b/mart/ev3/ex1/explanation.txt new file mode 100644 index 0000000..dec6427 --- /dev/null +++ b/mart/ev3/ex1/explanation.txt @@ -0,0 +1,15 @@ +The robot is programmed following the subsumption architecture where an +arbitrator controls a list of behaviours. The arbitrator asks all the +behaviours if they need control and hands the control to the behaviour that +wants it and has the highest priority. + +A general avoidance behaviour is the base for all other avoidance behaviours +that interact with different sensors. All sensors are calibrated at first to be +able to cope with different environment. + +All the feedback and output is printed on the LCD display. The LCDPrinter class +takes care of the input and as they are queued a different thread prints them +on the LCD making sure the lines are wrapped and all the text is displayed. + +The state of the robot is expressed by sound files that are played. The sound +files can be generated using espeak and SoX. diff --git a/mart/ev3/ex1/nl/ru/des/LCDPrinter.java b/mart/ev3/ex1/nl/ru/des/LCDPrinter.java index 125bb1c..84094ac 100644 --- a/mart/ev3/ex1/nl/ru/des/LCDPrinter.java +++ b/mart/ev3/ex1/nl/ru/des/LCDPrinter.java @@ -9,7 +9,7 @@ import lejos.hardware.lcd.GraphicsLCD; import lejos.utility.Delay; public class LCDPrinter extends Thread { - public static final int PRINTDELAY = 50; + public static final int PRINTDELAY = 200; private static Deque buffer = new LinkedList(); @@ -53,4 +53,4 @@ public class LCDPrinter extends Thread { Delay.msDelay(PRINTDELAY); } } -} \ No newline at end of file +} diff --git a/mart/ev3/ex1/nl/ru/des/explanation.txt b/mart/ev3/ex1/nl/ru/des/explanation.txt deleted file mode 100644 index 168386e..0000000 --- a/mart/ev3/ex1/nl/ru/des/explanation.txt +++ /dev/null @@ -1,5 +0,0 @@ -This program is developed using Subsumption architecture in LeJos where we define some behaviors in different part of code and load all of them in an arbitrator. -Every behaviors have its own condition to apply, this condition is defined in TakeControl method in each of behaviors. For example: the condition in AvoidLowObjectBehavior is if the left/right sensor of the robot is pressed, then this behavior will become active and do the robot movement which is defined in Action method (turn left/right). -This robot is able to retrieve user input (button press). We use this for the calibration of the white color line, black color line, and for the distance calibration. In this way, the robot is able to define what is the value of black colour and white color, also the object distance treshold dinamically. -In addition, the program can print text as the output which will automatically fit in robot's LCD screen. -Furthermore, this robot can play the custom wav files while it is moving. It also makes a sound in some situations, for instance when the light sensor reaches the black line, etc. \ No newline at end of file