From 0e906d3d29d1ea5acfdb8f737fd21b04cc00e934 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Tue, 12 Jan 2016 12:15:51 +0100 Subject: [PATCH] added parking --- dsl/runtime/specs/wander.tdsl | 45 ++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/dsl/runtime/specs/wander.tdsl b/dsl/runtime/specs/wander.tdsl index bcf2f3b..1dc70fd 100644 --- a/dsl/runtime/specs/wander.tdsl +++ b/dsl/runtime/specs/wander.tdsl @@ -87,6 +87,46 @@ Behaviour StopPushing action: set flag Pushed +Behaviour FoundLineL + take control: Light on left + action: + set flag LeftLine + +Behaviour FoundLineR + take control: Light on right + action: + set flag RightLine + +Behaviour FollowLGood + take control: (&& flag set LeftLine Light on left) + action: + left motor forward with speed 75 acceleration 1000 + right motor backward with speed 50 acceleration 1000 + +Behaviour FollowLBad + take control: (&& flag set LeftLine not Light on left) + action: + left motor forward with speed 75 acceleration 1000 + right motor forward with speed 100 acceleration 1000 + +Behaviour FollowRGood + take control: (&& flag set RightLine Light on right) + action: + right motor forward with speed 75 acceleration 1000 + left motor backward with speed 50 acceleration 1000 + +Behaviour FollowRBad + take control: (&& flag set RightLine not Light on right) + action: + right motor forward with speed 75 acceleration 1000 + left motor forward with speed 100 acceleration 1000 + +Behaviour FoundParkingSpace + take control: (&& (|| flag set LeftLine flag set RightLine) Color is White)// (|| Light on left Light on right)) + action: + set flag Parked + + /* Mission FindAndMeasureLakes using Wander StayInFieldR StayInFieldL StayInFieldB GreenLake RedLake BlueLake and stops when (&& flag set GreenLake flag set RedLake flag set BlueLake) @@ -95,4 +135,7 @@ Mission FindAndMeasureRocks and stops when flag set Measured Mission PushRocks using Wander PushL PushR PushB StopPushing StayInFieldR StayInFieldL StayInFieldB - and stops when flag set Pushed \ No newline at end of file + and stops when flag set Pushed*/ +Mission Park + using Drive FoundLineL FoundLineR FollowLBad FollowLGood FollowRBad FollowRGood FoundParkingSpace + and stops when flag set Parked \ No newline at end of file -- 2.20.1