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

Files at this revision

API Documentation at this revision

Comitter:
chrigelburri
Date:
Fri Apr 26 06:36:57 2013 +0000
Parent:
15:cb1337567ad4
Child:
17:f0a973f17917
Child:
18:306d362d692b
Commit message:
Testat2 check

Changed in this revision

defines.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/defines.h	Fri Apr 26 06:02:41 2013 +0000
+++ b/defines.h	Fri Apr 26 06:36:57 2013 +0000
@@ -58,7 +58,7 @@
 /**
  * @brief Distance of the wheel, given in [m] Greater --> turn more
  */
-#define WHEEL_DISTANCE        0.1870f
+#define WHEEL_DISTANCE        0.1873f  // 0.1870f 
 
 /**
  * @brief Sets the start X-point, given in [m]
--- a/main.cpp	Fri Apr 26 06:02:41 2013 +0000
+++ b/main.cpp	Fri Apr 26 06:36:57 2013 +0000
@@ -36,7 +36,7 @@
 #include "defines.h"
 #include "State.h"
 #include "RobotControl.h"
-#include "android.h"
+//#include "android.h"
 
 /**
  * @name Hallsensor
@@ -105,12 +105,12 @@
  * @brief <code>adkTerm</code> object is for the communication with a smartphone.
  * The operation system must be a android.
  */
-AdkTerm adkTerm(&robotControl, &s, PERIOD_ANDROID);
+//AdkTerm adkTerm(&robotControl, &s, PERIOD_ANDROID);
 /*! @} */
 
 
 // @todo PC USB communications DAs wird danach gelöscht
-Serial pc(USBTX, USBRX);
+//Serial pc(USBTX, USBRX);
 
 /**
 * @brief Main function. Start the Programm here.
@@ -123,7 +123,7 @@
      * start the timer for the Logging to the file
      * and start the Task for logging
      **/
-    //state.initPlotFile();
+    state.initPlotFile();
     state.startTimerFromZero();
     state.start();
 
@@ -131,17 +131,17 @@
      * Clear all Errors of the ESCON Module, with a disabled to enable event
      */
     robotControl.setEnable(false);
-    wait(0.1);
+    wait(0.01);
     robotControl.setEnable(true);
     wait(0.1);
 
     /**
      * Set the startposition and start the Task for controlling the roboter.
      */
-    robotControl.setAllToZero(0, 0, PI/2 );
-    //robotControl.setAllToZero(START_X_OFFSET, START_Y_OFFSET, PI/2 );
+    //robotControl.setAllToZero(0, 0, PI/2 );
+    robotControl.setAllToZero(START_X_OFFSET, START_Y_OFFSET, PI/2 );
     robotControl.start();
-    
+    /*
     pc.baud(460800);
     pc.printf("Welcome to adkTerm\n\n\n\n\n\n\r");
     pc.printf("here we go... \n");
@@ -153,7 +153,7 @@
     
     adkTerm.start();
 
-  /*
+  */
 
     //  Epä Parkour fahrä
     
@@ -170,7 +170,7 @@
             state.savePlotFile(s);
         };
 
-        robotControl.setDesiredPositionAndAngle(-0.55f, 3.0f,  PI/2); //0.75
+        robotControl.setDesiredPositionAndAngle(-0.5f, 3.0f,  PI/2); //0.75
         while(!(robotControl.getDistanceError() <= 0.7)) {
             state.savePlotFile(s);
         };
@@ -197,7 +197,7 @@
         };
 
         robotControl.setDesiredPositionAndAngle(-2.65f, 1.30f,  -PI/2);
-        while(!(robotControl.getDistanceError() <= 0.1)) {
+        while(!(robotControl.getDistanceError() <= 0.4)) {
             state.savePlotFile(s);
         };
         robotControl.setDesiredPositionAndAngle(-2.65f, 0.80f,  -PI/2);
@@ -205,8 +205,8 @@
             state.savePlotFile(s);
         }
 
-    */
-     
+    
+     /*
         while (1) {
             USBLoop();
             
@@ -219,8 +219,8 @@
             
             pc.printf( "To Android: x: %f   y: %f   t: %f; \n \n", robotControl.getxActualPosition(),
              robotControl.getyActualPosition(),
-             robotControl.getActualTheta());*/
-        }
+             robotControl.getActualTheta());
+        }*/