X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=dsl%2Fruntime%2Fspecs%2Fwander.tdsl;h=0f764d38ec67c293c95ba31d2b8faa1b32d73790;hb=e16db9e5dda67e0d25aff8a89f287e6fd5afdf4c;hp=04b78a09f706f0f293fa152c4b1dc3e2a074969c;hpb=844ff9a744d2c253bd5b76475a84370435329405;p=des2015.git diff --git a/dsl/runtime/specs/wander.tdsl b/dsl/runtime/specs/wander.tdsl index 04b78a0..0f764d3 100644 --- a/dsl/runtime/specs/wander.tdsl +++ b/dsl/runtime/specs/wander.tdsl @@ -98,13 +98,42 @@ Behaviour AvoidHigh take control: Distance dangerous at front action: turn randomly 10 to 11 degrees - + +Behaviour MeasureRock + take control: (&& Distance dangerous at front not flag set RockMeasured) + action: + measure Rock + set flag RockMeasured + +Behaviour FindParkingL + take control: Light on left + action: + turn left exactly 10 degrees with speed 20 acceleration 1000 + +Behaviour FindParkingR + take control: Light on right + action: + turn right exactly 10 degrees with speed 20 acceleration 1000 + +Behaviour FindParkingSpace + take control: (&& Light on right Light on left) + action: + right motor backward with speed 80 acceleration 1000 + left motor backward with speed 80 acceleration 1000 + wait 1000 ms + turn right exactly 180 degrees + set flag Parked + //Mission pushRock // using Drive LocateR LocateL Push StayInFieldB StayInFieldL StayInFieldR and stops when Never //Mission avoidHighRocks // using Drive AvoidHigh BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Never -Mission measureLakes - using Drive Drive MeasureRedLake MeasureGreenLake MeasureBlueLake and stops when (&& flag set GreenMeasured flag set BlueMeasured flag set RedMeasured) +Mission MeasureRocks + using Drive StayInFieldB StayInFieldL StayInFieldR MeasureRock and stops when flag set RockMeasured +Mission FindParkingSpaceInTheCorner + using Wander StayInFieldB FindParkingL FindParkingR FindParkingSpace and stops when flag set Parked +//Mission measureLakes +// using Drive MeasureRedLake MeasureGreenLake MeasureBlueLake and stops when (&& flag set GreenMeasured flag set BlueMeasured flag set RedMeasured) //Mission findBlueLakeWhileAvoidingRocks // using Wander BumpR BumpL StayInFieldB StayInFieldL StayInFieldR and stops when Color is Blue //Mission findAllLakesAndMeasureThem