bcf2f3bac4f4e7628426eca72830f41b1be89ecf
[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
11 Behaviour Wander
12 take control:
13 action:
14 left motor forward
15 right motor forward
16 wait 2000 ms
17 turn randomly 0 to 45 degrees
18 left motor forward
19 right motor forward
20 wait 2000 ms
21
22 Behaviour StayInFieldL
23 take control: Light on left
24 action:
25 turn right exactly 60 degrees
26 wait 500 ms
27
28 Behaviour StayInFieldR
29 take control: Light on right
30 action:
31 turn left exactly 60 degrees
32 wait 500 ms
33
34 Behaviour StayInFieldB
35 take control: Distance dangerous at back
36 action:
37 left motor forward
38 right motor forward
39 wait 1000 ms
40
41 Behaviour GreenLake
42 take control: (&& Color is Green not flag set GreenMeasured)
43 action:
44 measure Lake
45 set flag GreenLake
46
47 Behaviour BlueLake
48 take control: (&& Color is Blue not flag set BlueMeasured)
49 action:
50 measure Lake
51 set flag BlueLake
52
53 Behaviour RedLake
54 take control: (&& Color is Red not flag set RedMeasured)
55 action:
56 measure Lake
57 set flag RedLake
58
59 Behaviour MeasureRock
60 take control: (&& Distance dangerous at front not flag set Measured)
61 action:
62 measure Rock
63 set flag Measured
64
65 Behaviour PushL
66 take control: Touched on left
67 action:
68 right motor forward
69 left motor backward
70
71 Behaviour PushR
72 take control: Touched on right
73 action:
74 left motor forward
75 right motor backward
76
77 Behaviour PushB
78 take control: (&& Touched on left Touched on right)
79 action:
80 set flag Pushing
81 left motor forward
82 right motor forward
83 wait forever
84
85 Behaviour StopPushing
86 take control: (&& not Touched on left not Touched on right flag set Pushing)
87 action:
88 set flag Pushed
89
90 Mission FindAndMeasureLakes
91 using Wander StayInFieldR StayInFieldL StayInFieldB GreenLake RedLake BlueLake
92 and stops when (&& flag set GreenLake flag set RedLake flag set BlueLake)
93 Mission FindAndMeasureRocks
94 using Wander StayInFieldR StayInFieldL StayInFieldB MeasureRock
95 and stops when flag set Measured
96 Mission PushRocks
97 using Wander PushL PushR PushB StopPushing StayInFieldR StayInFieldL StayInFieldB
98 and stops when flag set Pushed