This program is for an autonomous robot for the competition at the Hochschule Luzern. http://cruisingcrepe.wordpress.com/ We are one of the 32 teams. http://cruisingcrepe.wordpress.com/ 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: http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf

Dependencies:   mbed

Fork of autonomous Robot Android by Christian Burri

Revision:
7:34be8b3a979c
Parent:
6:48eeb41188dd
Child:
8:696c2f9dfc62
--- a/main.cpp	Sat Mar 23 13:52:48 2013 +0000
+++ b/main.cpp	Tue Mar 26 08:29:43 2013 +0000
@@ -108,10 +108,10 @@
 
    // robotControl.setDesiredPositionAndAngle(START_X_OFFSET, START_Y_OFFSET, PI/2);
   //  robotControl.setDesiredPositionAndAngle(0, 0, PI/2);
-    wait(0.1);
+   // wait(0.1);
     
     //////////////////////////////////////////
-    
+    /*
             robotControl.setDesiredPositionAndAngle(0.0f, 1.0f,  PI);
         while(!(robotControl.getDistanceError() <= 0.1)) {
             state.savePlotFile(s);
@@ -126,13 +126,31 @@
         while(!(robotControl.getDistanceError() <= 0.1)) {
             state.savePlotFile(s);
         };
+        
+                robotControl.setDesiredPositionAndAngle(0.0f, -0.8f,  PI/2);
+        while(!(robotControl.getDistanceError() <= 0.05)) {
+            state.savePlotFile(s);
+        };
+        
+                        robotControl.setDesiredPositionAndAngle(0.0f, -0.2f,  PI/2);
+        while(!(robotControl.getDistanceError() <= 0.05)) {
+            state.savePlotFile(s);
+        };
 
         robotControl.setDesiredPositionAndAngle(0.0, 0.0f,  PI/2);
-        while(!(s.millis >= 55000)) {
+        while(!(s.millis >= 65000)) {
             state.savePlotFile(s);
         };
+  */  
     
+    ///////////////////////stay
     
+            robotControl.setDesiredPositionAndAngle(0.0, 0.0f,  PI/2);
+        while(!(s.millis >= 65000)) {
+            state.savePlotFile(s);
+        };
+        
+   //////////////////////////stay
     
     
     
@@ -147,28 +165,37 @@
     
     
 
-    //Zum Umfang einstellen
-    /*
-    robotControl.setDesiredPositionAndAngle(0.0f, 1.0f,  PI/2);
-    while(!(s.millis >= 20000)) {
+    //Zum Umfang einstellen 2m fahren
+    
+    robotControl.setDesiredPositionAndAngle(0.0f, 2.0f,  PI/2);
+    while(!(s.millis >= 30000)) {
         state.savePlotFile(s);
     };
     
 
-*/
+
 
     ///////////////oder//////////////////
 
 
     // Zum radabstand einstellen
-      
+    
     /*
-    int sek = 1000;
-    int step = 1000;
+        robotControl.setDesiredPositionAndAngle(-0.94f, 0.68f,  PI);
+    while(!(s.millis >= 30000)) {
+        state.savePlotFile(s);
+    }
+   /* 
+      
+  /*  
+    int sek = 0;
+    int step = 5000;
     int i = 0;
-    int totalTurns = 5;
+    int totalTurns = 2;
 
-    while(i >= totalTurns) {
+   sek += step;
+
+    while(i <= totalTurns) {
         robotControl.setDesiredPositionAndAngle(0.0f, 0.0f,  PI);
         while(!(s.millis >= sek)) {
             state.savePlotFile(s);
@@ -195,6 +222,8 @@
 
         i++;
     }
+    
+    
 */