right motor forward
wait 1000 ms
-Behaviour MeasureLake
- take control: (|| Color is Green Color is Blue Color is Red)
+Behaviour MeasureGreenLake
+ take control: (&& Color is Green not flag set GreenMeasured)
action:
measure Lake
+ set flag GreenMeasured
+Behaviour MeasureBlueLake
+ take control: (&& Color is Blue not flag set BlueMeasured)
+ action:
+ measure Lake
+ set flag BlueMeasured
+Behaviour MeasureRedLake
+ take control: (&& Color is Red not flag set RedMeasured)
+ action:
+ measure Lake
+ set flag RedMeasured
Behaviour LocateL
take control: Touched on left
take control: Distance dangerous at front
action:
turn randomly 10 to 11 degrees
-
+
+Behaviour MeasureRock
+ take control: (&& Distance dangerous at front not flag set RockMeasured)
+ action:
+ measure Rock
+ set flag RockMeasured
+
+Behaviour FindParkingL
+ take control: Light on left
+ action:
+ turn left exactly 10 degrees with speed 20 acceleration 1000
+
+Behaviour FindParkingR
+ take control: Light on right
+ action:
+ turn right exactly 10 degrees with speed 20 acceleration 1000
+
+Behaviour FindParkingSpace
+ take control: (&& Light on right Light on left)
+ action:
+ right motor backward with speed 80 acceleration 1000
+ left motor backward with speed 80 acceleration 1000
+ wait 1000 ms
+ turn right exactly 180 degrees
+ set flag Parked
+
//Mission pushRock
// using Drive LocateR LocateL Push StayInFieldB StayInFieldL StayInFieldR and stops when Never
-Mission avoidHighRocks
- using Drive AvoidHigh BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Never
-//Mission measureLake
-// using Drive MeasureLake and stops when Never
+//Mission avoidHighRocks
+// using Drive AvoidHigh BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Never
+Mission MeasureRocks
+ using Drive StayInFieldB StayInFieldL StayInFieldR MeasureRock and stops when flag set RockMeasured
+Mission FindParkingSpaceInTheCorner
+ using Wander StayInFieldB FindParkingL FindParkingR FindParkingSpace and stops when flag set Parked
+//Mission measureLakes
+// using Drive MeasureRedLake MeasureGreenLake MeasureBlueLake and stops when (&& flag set GreenMeasured flag set BlueMeasured flag set RedMeasured)
//Mission findBlueLakeWhileAvoidingRocks
// using Wander BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Color is Blue
//Mission findAllLakesAndMeasureThem