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
Fork of autonomous Robot Android by
Diff: StateDefines/defines.h
- Revision:
- 2:d8e1613dc38b
- Parent:
- 1:6cd533a712c6
- Child:
- 3:92ba0254af87
diff -r 6cd533a712c6 -r d8e1613dc38b StateDefines/defines.h --- a/StateDefines/defines.h Sat Mar 02 09:39:34 2013 +0000 +++ b/StateDefines/defines.h Sun Mar 03 16:26:47 2013 +0000 @@ -26,7 +26,7 @@ #define ESCON_GET_FACTOR 100.0f // Speed Factor how get in the ESCON // Start Defintition -#define START_X_OFFSET -0.8f // Sets the start X-point [m] +#define START_X_OFFSET -0.8f // Sets the start X-point [m] #define START_Y_OFFSET 0.8f // Sets the start Y-point [m] // Maximum Aceeleration @@ -34,25 +34,23 @@ #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 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.1 // min. Distance to switch the position controller off. Because when Distance Error goes to zero the ATAN2 is not define, given in [m] +#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 -#define BAT_MULTIPLICATOR 21.633333333f // R2 / (R1 + R2) = 0.153 R2= 10k , R1 = 1.8k -// 1/0.153 = 6.555 ---> 3.3/1 * 6.555 = 21.6333333f -#define BAT_MIN 17.5f // minium operate voltage [V] Battery Type: 1SP1P LG-18650 --> -// nominal voltage 3.6V --> 5 batterys ==> 5 * 3.5V = 17.5V +#define BAT_MULTIPLICATOR 21.633333333f // R2 / (R1 + R2) = 0.153 R2= 10k , R1 = 1.8k 1/0.153 = 6.555 ---> 3.3 * 6.555 = 21.6333333f +#define BAT_MIN 17.5f // minium operate voltage [V] Battery Type: 1SP1P LG-18650 --> nominal voltage 3.6V --> 5 batterys ==> 5 * 3.5V = 17.5V + // Frequenz for the Task #define PERIOD_COMPASS 0.050f // 20Hz Rate for Compass HMC6352 #define PERIOD_ROBOTCONTROL 0.001f // 1kHz Rate for Robot Control #define PERIOD_STATE 0.001f // 1kHz Rate for State Objekt #define PERIOD_ANDROID 0.1f // 10Hz Rate for State Objekt - // Compass Maxima und Minima for the Filter #define SET_MAXIMAS_MINIMAS true // For Set the maximas und minimas when false the object search the maximas minimas by your own /*#define COMP_X_MAX 344.464996f // Maximum X-Range @@ -69,16 +67,10 @@ #define COMP_Y_MIN -247.647675f // Minimum Y-Range #define COMP_Z_MIN -385.915009f // Minimun Z-Range not used in this side - -/** -* struct state - * structure containing system sensor data - ****** System Status - ****** Data reported Motor - ****** Data reported Car - ****** Set Point Car - ****** measuring Position and angle - **/ + /** + * struct state + * structure containing system sensor data + **/ typedef struct state { /** millis Time [ms]*/ int millis; @@ -124,6 +116,12 @@ float compassyAxis; /** State of the Car **/ int state; + /** distance to Goal */ + float rho; + /** theta to goal */ + float lamda; + /** theta from the goal */ + float delta; } state_t;