Group19-Biorobotics
Dependencies: HIDScope MODSERIAL PID QEI SigInterpreternovember2 biquadFilter mbed
Fork of Robot_control_v3 by
Diff: Controller.h
- Revision:
- 8:82e38f4aa690
- Parent:
- 6:a4440eec3652
diff -r 2ab4bdd1f998 -r 82e38f4aa690 Controller.h --- a/Controller.h Wed Nov 02 15:40:15 2016 +0000 +++ b/Controller.h Mon Nov 07 11:29:28 2016 +0000 @@ -7,7 +7,7 @@ //HIDScope scope(2); int xPulses = 0; // pulsecount -const int x_max = 30068;// 30068; +const int x_max = 31068;// 30068; int yPulses = 0; const int y_max = 15003; int prevXpulses = 0; @@ -24,6 +24,7 @@ float X_frictionTrheshold = 0.04; float Y_frictionTrheshold = 0.04; float sensitivityFactor = 0.2; // determines treshold value for contraction, value between 0 and 1 +float calibrationSpeed = 0.4; // [0,1], determines how fast the system returns to (0,0) when the button is pressed const float R1 = 0.085; // radius of big driven gear in m const float RmX = 0.012; // radius of small drive gear in m @@ -55,8 +56,8 @@ void initControllers(); void initMotors(); -const float KcX = 0.0358; // THIS IS THE LIMIT FOR STABILITY -const float KcY = 0.366; +const float KcX = 0.02058; // THIS IS THE LIMIT FOR STABILITY +const float KcY = 0.02066; const float Ti = 0.0; const float Td = 0.0; const float RATE = 0.002; // rate = interval motors will be updateed