0f764d38ec67c293c95ba31d2b8faa1b32d73790
[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 Behaviour MeasureRock
103 take control: (&& Distance dangerous at front not flag set RockMeasured)
104 action:
105 measure Rock
106 set flag RockMeasured
107
108 Behaviour FindParkingL
109 take control: Light on left
110 action:
111 turn left exactly 10 degrees with speed 20 acceleration 1000
112
113 Behaviour FindParkingR
114 take control: Light on right
115 action:
116 turn right exactly 10 degrees with speed 20 acceleration 1000
117
118 Behaviour FindParkingSpace
119 take control: (&& Light on right Light on left)
120 action:
121 right motor backward with speed 80 acceleration 1000
122 left motor backward with speed 80 acceleration 1000
123 wait 1000 ms
124 turn right exactly 180 degrees
125 set flag Parked
126
127 //Mission pushRock
128 // using Drive LocateR LocateL Push StayInFieldB StayInFieldL StayInFieldR and stops when Never
129 //Mission avoidHighRocks
130 // using Drive AvoidHigh BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Never
131 Mission MeasureRocks
132 using Drive StayInFieldB StayInFieldL StayInFieldR MeasureRock and stops when flag set RockMeasured
133 Mission FindParkingSpaceInTheCorner
134 using Wander StayInFieldB FindParkingL FindParkingR FindParkingSpace and stops when flag set Parked
135 //Mission measureLakes
136 // using Drive MeasureRedLake MeasureGreenLake MeasureBlueLake and stops when (&& flag set GreenMeasured flag set BlueMeasured flag set RedMeasured)
137 //Mission findBlueLakeWhileAvoidingRocks
138 // using Wander BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Color is Blue
139 //Mission findAllLakesAndMeasureThem
140 // using Wander MeasureLake StayInFieldB StayInFieldL StayInFieldR and stops when Collected at least Green Blue Red
141 //Mission justWander
142 // using Wander Wander StayInFieldB StayInFieldL StayInFieldR and stops when Color is Cyan