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:
3:92ba0254af87
Parent:
2:d8e1613dc38b
Child:
4:3a97923ff2d4
--- a/StateDefines/defines.h	Sun Mar 03 16:26:47 2013 +0000
+++ b/StateDefines/defines.h	Thu Mar 07 09:47:07 2013 +0000
@@ -3,13 +3,13 @@
 
 #include "mbed.h"
 
-//Physical dimensions.
-#define PI         3.141592654f
+// Physical dimensions
+#define PI                    3.141592654f  // Physical dimensions π. 
 
-// Motor  #339282 EC 45 flat 30W and GEAR
-#define POLE_PAIRS            8u            // 8
+// maxon motor #339282 EC 45 flat 30W and GEAR 
+#define POLE_PAIRS            8u            // Number of of pole pairs
 #define GEAR                  1.0f          // Gear on the motor
-#define PULSES_PER_STEP       6u            // 6 step for Hallsensor
+#define PULSES_PER_STEP       6u            // Pulses per step Hallsensor have 6 steps
 
 // Physical Dimension of the car
 #define WHEEL_RADIUS          0.042f        // radius of the wheel, given in [m]
@@ -21,7 +21,7 @@
 #define STATE_LEFT            4u            // Bit2 = left ESCON in error state
 #define STATE_RIGHT           8u            // Bit3 = right ESCON in error state     
 
-// ESCON Dimenstion
+// ESCON Constands
 #define ESCON_SET_FACTOR      100.0f        // Speed Factor how set in the ESCON
 #define ESCON_GET_FACTOR      100.0f        // Speed Factor how get in the ESCON       
 
@@ -33,12 +33,11 @@
 #define ACCELERATION          0.25f         // maximum translational acceleration, given in [m/s2]
 #define THETA_ACCELERATION    1.0f          // maximum rotational acceleration, given in [rad/s2]
 
-// Gains of the position controller
+// position controller
 #define GAIN                  0.30f         // Main Gain
 #define K1                    1.0f * GAIN
 #define K2                    3.0f * GAIN
 #define K3                    2.0f * GAIN
-
 #define MIN_DISTANCE_ERROR 0.03             // min. Distance to switch the position controller off. Because when Distance Error goes to zero the ATAN2 is not define, given in [m]                 
 
 // LiPo Batterie