d592a2520662b2c5828fc347a3b346175cdd5c61
[des2015.git] / dsl / runtime / specs / wander.tdsl
1 Acceleration 1000
2 Speed 150
3
4 Behaviour Drive
5 take control:
6 action:
7 left motor forward
8 right motor forward
9 wait forever
10 Behaviour Wander
11 take control:
12 action:
13 left motor forward
14 right motor forward
15 wait 2000 ms
16 turn randomly 0 to 45 degrees
17 left motor forward
18 right motor forward
19 wait 2000 ms
20
21 Behaviour StayInFieldL
22 take control: Light on left
23 action:
24 turn right exactly 60 degrees
25 wait 500 ms
26
27 Behaviour StayInFieldR
28 take control: Light on right
29 action:
30 turn left exactly 60 degrees
31 wait 500 ms
32
33 Behaviour StayInFieldB
34 take control: Distance dangerous at back
35 action:
36 left motor forward
37 right motor forward
38 wait 1000 ms
39
40 Behaviour MeasureGreenLake
41 take control: (&& Color is Green not flag set GreenMeasured)
42 action:
43 measure Lake
44 set flag GreenMeasured
45 Behaviour MeasureBlueLake
46 take control: (&& Color is Blue not flag set BlueMeasured)
47 action:
48 measure Lake
49 set flag BlueMeasured
50 Behaviour MeasureRedLake
51 take control: (&& Color is Red not flag set RedMeasured)
52 action:
53 measure Lake
54 set flag RedMeasured
55
56 Behaviour LocateL
57 take control: Touched on left
58 action:
59 right motor forward
60 left motor backward
61 wait 500 ms
62 right motor forward
63 left motor forward
64 wait 1000 ms
65
66 Behaviour LocateR
67 take control: Touched on right
68 action:
69 left motor forward
70 right motor backward
71 wait 500 ms
72 right motor forward
73 left motor forward
74 wait 1000 ms
75
76 Behaviour Push
77 take control: (&& Touched on left Touched on right)
78 action:
79 left motor forward
80 right motor forward
81 wait 1000 ms
82
83 Behaviour BumpL
84 take control: Touched on left
85 action:
86 left motor backward with speed 50 acceleration 1000
87 right motor backward
88 wait 2000 ms
89
90 Behaviour BumpR
91 take control: Touched on right
92 action:
93 right motor backward with speed 50 acceleration 1000
94 left motor backward
95 wait 2000 ms
96
97 Behaviour AvoidHigh
98 take control: Distance dangerous at front
99 action:
100 turn randomly 10 to 11 degrees
101
102 //Mission pushRock
103 // using Drive LocateR LocateL Push StayInFieldB StayInFieldL StayInFieldR and stops when Never
104 //Mission avoidHighRocks
105 // using Drive AvoidHigh BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Never
106 Mission measureLakes
107 using Drive MeasureRedLake MeasureGreenLake MeasureBlueLake and stops when (&& flag set GreenMeasured flag set BlueMeasured flag set RedMeasured)
108 //Mission findBlueLakeWhileAvoidingRocks
109 // using Wander BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Color is Blue
110 //Mission findAllLakesAndMeasureThem
111 // using Wander MeasureLake StayInFieldB StayInFieldL StayInFieldR and stops when Collected at least Green Blue Red
112 //Mission justWander
113 // using Wander Wander StayInFieldB StayInFieldL StayInFieldR and stops when Color is Cyan