This program is for an autonomous robot for the competition at the Hochschule Luzern. We are one of the 32 teams. <a href="http://cruisingcrepe.wordpress.com/">http://cruisingcrepe.wordpress.com/</a> The postition control is based on this Documentation: Control of Wheeled Mobile Robots: An Experimental Overview from Alessandro De Luca, Giuseppe Oriolo, Marilena Vendittelli. For more information see here: <a href="http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf">http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf</a>

Dependencies:   mbed

Fork of autonomousRobotAndroid by Christian Burri

Revision:
26:a201dcd4e618
Parent:
24:08241be546ba
Child:
27:a13ede88e75f
Child:
28:b3e195e80439
Child:
35:0e9ba5f20512
--- a/main.cpp	Sun May 19 15:12:04 2013 +0000
+++ b/main.cpp	Mon May 20 09:41:47 2013 +0000
@@ -125,10 +125,10 @@
 int main()
 {
 
-    int garagenumber = 1;
+    int garagenumber = 2;
     float x = -2.954f + 0.308 * garagenumber;
     float ypre = 1.30f;
-    float ygoal = 0.80f;
+    float ygoal = 0.60f;
 
     /**
      * Check at first the Battery voltage. Starts when the voltages greater as the min is.
@@ -178,7 +178,8 @@
     robotControl.setAllToZero(START_X_OFFSET, START_Y_OFFSET, PI/2 );
     robotControl.start();
     robotControl.setDesiredPositionAndAngle(START_X_OFFSET, START_Y_OFFSET, PI/2);
-    wait(0.1);
+    
+    wait(0.02);
     state.savePlotFile(s);
 
     /**
@@ -198,14 +199,9 @@
     while(!(robotControl.getDistanceError() <= 0.55)) {
         state.savePlotFile(s);
     };
-
+//QR
     robotControl.setDesiredPositionAndAngle(-1.5f, 3.6f,  PI);
-    while(!(robotControl.getDistanceError() <= 0.05)) {
-        state.savePlotFile(s);
-    };
-
-    robotControl.setDesiredPositionAndAngle(-2.1f, 3.0f,  -PI/2);
-    while(!(robotControl.getDistanceError() <= 1.0)) {
+    while(!(robotControl.getDistanceError() <= 0.075)) {
         state.savePlotFile(s);
     };
 
@@ -219,11 +215,20 @@
         state.savePlotFile(s);
     };
     robotControl.setDesiredPositionAndAngle(x, ygoal, -PI/2);
-    while(!(s.millis >= 19000)) {
+    while(!(robotControl.getDistanceError() <= 0.2)) {
         state.savePlotFile(s);
     }
 
 
+/// STOP Setze actueler Wert
+    robotControl.setDesiredPositionAndAngle(robotControl.getxActualPosition(), robotControl.getyActualPosition(), robotControl.getActualTheta());
+    robotControl.stop();
+    state.savePlotFile(s);
+    leftMotor.setVelocity(0.0f);
+    rightMotor.setVelocity(0.0f);
+    while(!(s.millis >= 15000)) {
+        state.savePlotFile(s);
+    };