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:
- 8:696c2f9dfc62
- Parent:
- 7:34be8b3a979c
- Child:
- 9:d3cdcdef9719
--- a/StateDefines/defines.h Tue Mar 26 08:29:43 2013 +0000 +++ b/StateDefines/defines.h Sat Mar 30 06:55:08 2013 +0000 @@ -12,11 +12,10 @@ #define PULSES_PER_STEP 6u // Pulses per electrical step Hallsensor, have 6 steps // Physical Dimension of the car -#define WHEEL_RADIUS_DIFF 0.00054 // positiv zu weit links, given in [m] 0.00059 -#define WHEEL_RADIUS_LEFT 0.03930f // radius of the left wheel, given in [m] 0.03945f -#define WHEEL_RADIUS_RIGHT (WHEEL_RADIUS_LEFT + WHEEL_RADIUS_DIFF) // radius of the left wheel, given in [m] -#define WHEEL_DISTANCE 0.1860f // Distance of the wheel, given in [m] 0.1865f - +#define WHEEL_RADIUS_DIFF -0.00015f // positiv zu weit rechts, given in [m] +#define WHEEL_RADIUS_LEFT 0.040280f // radius of the left wheel, given in [m] 0.040479f +#define WHEEL_RADIUS_RIGHT (WHEEL_RADIUS_LEFT - WHEEL_RADIUS_DIFF) // radius of the left wheel, given in [m] +#define WHEEL_DISTANCE 0.1875f // Distance of the wheel, given in [m] Grösser --> mehr drehen // State Bits of the car #define STATE_STOP 1u // Bit0 = stop pressed @@ -25,8 +24,12 @@ #define STATE_RIGHT 8u // Bit3 = right ESCON in error state // ESCON Constands -#define ESCON_SET_FACTOR 1200.0f // Speed Factor how set in the ESCON -#define ESCON_GET_FACTOR 1400.0f // Speed Factor how get in the ESCON +#define ESCON_SET_FACTOR 1200.0f // Speed Factor how set in the ESCON +#define ESCON_GET_FACTOR 1400.0f // Speed Factor how get in the ESCON + +//Error patch of the drift of Analog input and pwn output +#define SET_SPEED_PATCH (1+0.0029f) // patch factor of set speed +#define GET_SPEED_PATCH (1+0.0019f) // patch factor of get speed // Start Defintition #define START_X_OFFSET -0.8f // Sets the start X-point [m] @@ -41,7 +44,7 @@ #define K1 1.0f * GAIN #define K2 3.0f * GAIN #define K3 2.0f * GAIN // deafult 2.0f -#define MIN_DISTANCE_ERROR -0.02f // 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.005f // 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 * 6.555 = 21.6333333f @@ -55,13 +58,6 @@ // 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 -#define COMP_Y_MAX 238.751282f // Maximum Y-Range -#define COMP_Z_MAX -266.899994f // Maximum Z-Range not used in this side -#define COMP_X_MIN -90.412109f // Minimum X-Range -#define COMP_Y_MIN -220.834808f // Minimum Y-Range -#define COMP_Z_MIN -356.000000f // Minimun Z-Range not used in this side -*/ #define COMP_X_MAX 391.219910f // Maximum X-Range #define COMP_Y_MAX 382.915161f // Maximum Y-Range #define COMP_Z_MAX -237.855042f // Maximum Z-Range not used in this side @@ -112,10 +108,10 @@ float setyAxis; /** Setpoint Angel [°] */ float setAngle; - /** Right Distance Sensor [m] */ - float rightDist; - /** Compass Angle [°] */ - float compassAngle; + /** Setpoint velocitiy [m/s] */ + float setVelocity; + /** Setpoint rotation velocitiy [rad/s] */ + float setOmega; /** Compass X-Axis */ float compassxAxis; /** Compass Y-Axis */