X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=dsl%2Fruntime%2Fspecs%2Fwander.tdsl;fp=dsl%2Fruntime%2Fspecs%2Fwander.tdsl;h=be30d5adc314267f53997fef02b58d833fafd84b;hb=1b13ccb59263b66abc763fb8f298b14bdebc9582;hp=80cd16915b8953ec0abe97f5757495ea56107e41;hpb=9fa82649c6bc8e21f6ecfeb95c8c15db7c8f8352;p=des2015.git diff --git a/dsl/runtime/specs/wander.tdsl b/dsl/runtime/specs/wander.tdsl index 80cd169..be30d5a 100644 --- a/dsl/runtime/specs/wander.tdsl +++ b/dsl/runtime/specs/wander.tdsl @@ -1,25 +1,58 @@ Acceleration 1000 Speed 150 + Behaviour Wander take control: action: left motor forward right motor forward - wait forever + wait 2000 ms + turn randomly 0 to 45 degrees + left motor forward + right motor forward + wait 2000 ms + Behaviour StayInFieldL take control: Light on left action: - turn right 90 + turn right exactly 60 degrees + wait 500 ms + Behaviour StayInFieldR take control: Light on right action: - turn left 90 + turn left exactly 60 degrees + wait 500 ms + Behaviour StayInFieldB take control: Distance dangerous at back action: - wait 750 ms -Behaviour Measure - take control: Color is Green + left motor forward + right motor forward + wait 1000 ms + +Behaviour MeasureLake + take control: (|| Color is Green Color is Blue Color is Red) action: measure -Mission stayinfield using Wander Measure StayInFieldL StayInFieldR and stops when Color is Blue \ No newline at end of file + +Behaviour BumpL + take control: Touched on left + action: + left motor backward with speed 50 acceleration 1000 + right motor backward + wait 2000 ms + +Behaviour BumpR + take control: Touched on right + action: + right motor backward with speed 50 acceleration 1000 + left motor backward + wait 2000 ms + +Mission findBlueLakeWhileAvoidingRocks + using Wander BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Color is Blue +Mission findAllLakesAndMeasureThem + using Wander MeasureLake StayInFieldB StayInFieldL StayInFieldR and stops when Collected at least Green Blue Red +Mission justWander + using Wander StayInFieldB StayInFieldL StayInFieldR and stops when Color is Cyan \ No newline at end of file