use tuned params (pid and turn)

main
Simon Frei 4 years ago
parent d43c04d3ad
commit 3b900f1d8a
  1. 10
      ADIS_Sumo/Sumo/Pid.c
  2. 6
      ADIS_Sumo/Sumo/Turn.c

@ -630,11 +630,11 @@ void PID_Init(void) {
lineFwConfig.lastError = 0;
lineFwConfig.integral = 0;
#elif PL_IS_INTRO_ZUMO_ROBOT2 || PL_IS_INTRO_ZUMO_K22
lineFwConfig.pFactor100 = 5500;
lineFwConfig.pFactor100 = 4000;//5500;
lineFwConfig.iFactor100 = 15;
lineFwConfig.dFactor100 = 100;
lineFwConfig.dFactor100 = 500;//100;
lineFwConfig.iAntiWindup = 100000;
lineFwConfig.maxSpeedPercent = 40;
lineFwConfig.maxSpeedPercent = 25;//40;
lineFwConfig.lastError = 0;
lineFwConfig.integral = 0;
#else
@ -672,11 +672,11 @@ void PID_Init(void) {
posLeftConfig.iAntiWindup = 200;
posLeftConfig.maxSpeedPercent = 40;
#elif (PL_CONFIG_APP_LINE_FOLLOWING || PL_CONFIG_APP_LINE_MAZE) /* line/maze, high speed */
posLeftConfig.pFactor100 = 1000;
posLeftConfig.pFactor100 = 2000;//1000;
posLeftConfig.iFactor100 = 2;
posLeftConfig.dFactor100 = 50;
posLeftConfig.iAntiWindup = 200;
posLeftConfig.maxSpeedPercent = 40;
posLeftConfig.maxSpeedPercent = 35;//40;
#else /* defaults */
posLeftConfig.pFactor100 = 1000;
posLeftConfig.iFactor100 = 1;

@ -63,11 +63,11 @@
#define TURN_STEPS_POST_LINE_TIMEOUT_MS 500
#define TURN_STEPS_STOP_TIMEOUT_MS 150
#elif PL_IS_INTRO_ZUMO_K22 /* no LiPo */
#define TURN_STEPS_90 720
#define TURN_STEPS_90 650//720
/*!< number of steps for a 90 degree turn */
#define TURN_STEPS_LINE 100 /*230*/
#define TURN_STEPS_LINE 170//100 /*230*/
/*!< number of steps stepping over the line */
#define TURN_STEPS_POST_LINE 150
#define TURN_STEPS_POST_LINE 240//150
/*!< number of steps after the line, before making a turn */
#define TURN_STEPS_90_TIMEOUT_MS 1000
#define TURN_STEPS_LINE_TIMEOUT_MS 200

Loading…
Cancel
Save