update code
[des2015.git] / dsl / runtime / specs / wander.tdsl
1 Acceleration 1000
2 Speed 150
3
4 Behaviour Wander
5 take control:
6 action:
7 left motor forward
8 right motor forward
9 wait 2000 ms
10 turn randomly 0 to 45 degrees
11 left motor forward
12 right motor forward
13 wait 2000 ms
14
15 Behaviour StayInFieldL
16 take control: Light on left
17 action:
18 turn right exactly 60 degrees
19 wait 500 ms
20
21 Behaviour StayInFieldR
22 take control: Light on right
23 action:
24 turn left exactly 60 degrees
25 wait 500 ms
26
27 Behaviour StayInFieldB
28 take control: Distance dangerous at back
29 action:
30 left motor forward
31 right motor forward
32 wait 1000 ms
33
34 Behaviour MeasureLake
35 take control: (|| Color is Green Color is Blue Color is Red)
36 action:
37 measure
38
39 Behaviour BumpL
40 take control: Touched on left
41 action:
42 left motor backward with speed 50 acceleration 1000
43 right motor backward
44 wait 2000 ms
45
46 Behaviour BumpR
47 take control: Touched on right
48 action:
49 right motor backward with speed 50 acceleration 1000
50 left motor backward
51 wait 2000 ms
52
53 Mission findBlueLakeWhileAvoidingRocks
54 using Wander BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Color is Blue
55 Mission findAllLakesAndMeasureThem
56 using Wander MeasureLake StayInFieldB StayInFieldL StayInFieldR and stops when Collected at least Green Blue Red
57 Mission justWander
58 using Wander StayInFieldB StayInFieldL StayInFieldR and stops when Color is Cyan