From 1b1ab7617b326d8c5f4dcd6111d8170c38271e15 Mon Sep 17 00:00:00 2001 From: Miguel Angel Astor Romero Date: Fri, 27 May 2016 16:22:14 -0430 Subject: [PATCH] Changed motor direction in catch ball. --- .../ciens/cicore/icaro/ryabi/behaviors/CatchBallBehavior.java | 3 ++- .../cicore/icaro/ryabi/behaviors/SearchBallBehavior.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/CatchBallBehavior.java b/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/CatchBallBehavior.java index 4da7884..6662d8f 100644 --- a/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/CatchBallBehavior.java +++ b/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/CatchBallBehavior.java @@ -53,7 +53,8 @@ public class CatchBallBehavior extends BaseBehavior { @Override public void action() { - Motor.B.forward(); + pilot.travel(65); + Motor.B.backward(); try { Thread.sleep(2000); } catch(InterruptedException e) { }; /* Turn towards the start line and start moving. */ diff --git a/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/SearchBallBehavior.java b/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/SearchBallBehavior.java index 7629b89..9582ba7 100644 --- a/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/SearchBallBehavior.java +++ b/src/ve/ucv/ciens/cicore/icaro/ryabi/behaviors/SearchBallBehavior.java @@ -106,7 +106,7 @@ public class SearchBallBehavior extends BaseBehavior { if(turnLeft) { /* Search to the left of the robot. */ Rotations.rotateM90(compass, pilot); - pilot.travel(50); + pilot.travel(100); if(queue.hasNextTouchSensorEvent()) { /* If an obstacle is found while searching then start searching @@ -127,7 +127,7 @@ public class SearchBallBehavior extends BaseBehavior { } else { /* Search to the right of the robot. */ Rotations.rotate90(compass, pilot); - pilot.travel(50); + pilot.travel(100); if(queue.hasNextTouchSensorEvent()) { /* If an obstacle is found while searching then give up and go back