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:
1:6cd533a712c6
Parent:
0:31f7be68e52d
Child:
2:d8e1613dc38b
--- a/StateDefines/defines.h	Thu Feb 07 17:43:19 2013 +0000
+++ b/StateDefines/defines.h	Sat Mar 02 09:39:34 2013 +0000
@@ -13,7 +13,7 @@
 
 // Physical Dimension of the car
 #define WHEEL_RADIUS          0.042f        // radius of the wheel, given in [m]
-#define WHEEL_DISTANCE        0.176f        // Distance of the wheel, given in [m] 
+#define WHEEL_DISTANCE        0.18f         // Distance of the wheel, given in [m] 
 
 // State Bits of the car
 #define STATE_STOP            1u            // Bit0 = stop pressed 
@@ -31,7 +31,15 @@
 
 // Maximum Aceeleration
 #define ACCELERATION          0.25f         // maximum translational acceleration, given in [m/s2]
-#define THETA_ACCELERATION    1.0f          // maximum rotational acceleration, given in [rad/s2
+#define THETA_ACCELERATION    1.0f          // maximum rotational acceleration, given in [rad/s2]
+
+// Gains of the position controller
+#define GAIN    0.2f
+#define K1    1.0f * GAIN 
+#define K2    3.0f * GAIN  
+#define K3    2.0f * GAIN
+
+#define MIN_DISTANCE_ERROR 0.1 // 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
 #define BAT_MULTIPLICATOR     21.633333333f // R2 / (R1 + R2) = 0.153    R2= 10k , R1 = 1.8k