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:
Sat May 25 05:44:14 2013 +0000
Parent:
33:ac39982fd3b2
Child:
36:4226e50a0bcd
Commit message:
vor dem rauskicken der adb;

Changed in this revision

MicroBridge/androidADB.h Show annotated file Show diff for this revision Revisions of this file
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/MicroBridge/androidADB.h	Tue May 21 17:42:50 2013 +0000
+++ b/MicroBridge/androidADB.h	Sat May 25 05:44:14 2013 +0000
@@ -12,10 +12,28 @@
 #include <stdlib.h>
 
 /**
-* @brief Takes an string, a vector of strings for the delimited tokens, and a with the
-* @param str
-* @param tokens
-* @param delimiters
+ * @author Arno Galliker
+ *
+ * @copyright Copyright &copy; 2013 HSLU Pren Team #1 Cruising Crêpe
+ * All rights reserved.
+ *
+ * @brief
+ *
+ * This File is for the connection to te self written java android app.
+ * The connection works with the ADB class from rom Junichi Katsu.
+ * For more information see here: <a href="http://mbed.org/users/jksoft/code/MicroBridge/">http://mbed.org/users/jksoft/code/MicroBridge/</a>
+ */
+ 
+ /**
+ * @file androidADB.h
+ */
+
+/**
+* @brief Takes an string, a vector of strings for the delimited tokens. 
+* Tokens is the array to separated with the delimiters.
+* @param str to 
+* @param tokens is the vecotr array
+* @param delimiters of the string
 */
 void Tokenize(const string& str,
               vector<string>& tokens,
--- a/defines.h	Tue May 21 17:42:50 2013 +0000
+++ b/defines.h	Sat May 25 05:44:14 2013 +0000
@@ -57,17 +57,17 @@
 /**
  * @brief Distance of the wheel, given in [m] Greater --> turn more
  */
-#define WHEEL_DISTANCE        0.1721f  // org.0.17500f alt: 0.173f
+#define WHEEL_DISTANCE        (0.1700f-0.001f)  // org.0.17500f alt: 0.173f  //(0.1700f-0.004f) immer zu weit links  (0.1700f-0.006f) war mal gut aber jetz zu weit rechts 
 
 /**
  * @brief Sets the start X-point, given in [m]
  */
-#define START_X_OFFSET        -0.8f
+#define START_X_OFFSET        -0.850f//-0.8f
 
 /**
  * @brief Sets the start Y-point, given in [m]
  */
-#define START_Y_OFFSET        0.8f
+#define START_Y_OFFSET        0.775f//0.8f
 /*! @} */
 
 /**
@@ -193,24 +193,9 @@
 /**
  * @brief 10Hz Rate for the Android communication , given in [s]
  */
-#define PERIOD_ANDROID        0.025f
+#define PERIOD_ANDROID        (0.025f*2)
 /*! @} */
 
-/**
- * @name Android Buffer Size for communication
- * @{
- */
-
-/**
- * @brief Buffer Output
- */
-#define OUTL 100
-
-/**
- * @brief Buffer Input
- */
-#define INBL 100
-/*! @} */
 
 /**
  * @brief struct state
--- a/main.cpp	Tue May 21 17:42:50 2013 +0000
+++ b/main.cpp	Sat May 25 05:44:14 2013 +0000
@@ -113,13 +113,13 @@
 {
 
     /**
-     * Check at first the Battery voltage. Starts when the voltage 
+     * Check at first the Battery voltage. Starts when the voltage
      * is greater than the min is.
      * start the timer for the Logging to the file
      * and start the Task for logging.
      **/
     state.start();
-    
+
     while(s.voltageBattery < BAT_MIN) {
         for (float f = 0.1f; f < 6.3f; f += 0.1f) {
             for(int i = 0; i <= 3; i  ++) {
@@ -144,7 +144,7 @@
     state.initPlotFile();
     state.startTimerFromZero();
     robotControl.start();
-
+/*
     /**
      * Clear all Errors of the ESCON Module, with a disabled to enable event.
      */
@@ -198,14 +198,14 @@
                                             robotControl.getyActualPosition(),
                                             robotControl.getActualTheta());
     robotControl.stop();
-    state.savePlotFile(s);
     leftMotor.setVelocity(0.0f);
     rightMotor.setVelocity(0.0f);
+    wait(2);
+
 
     /**
      * Close the File PLOTS.txt to read the file with the computer afterwards and draw a diagramm.
      */
-    state.savePlotFile(s);
     state.closePlotFile();
     state.stop();
     robotControl.setEnable(false);
@@ -230,5 +230,4 @@
         }
         wait(0.05);
     }
-    
 }