X-Git-Url: https://defiant.homedns.org/gitweb/?p=ros_wild_thumper.git;a=blobdiff_plain;f=avr%2Fmotor_ctrl%2Fmain.c;h=7781fb4af01654b33ea2a53df04a1bbaf63b7967;hp=5d655290a7e8b78cb3efd33b881eaf85fafd3bfe;hb=d55fc1ff8c77515d29610d3940f35965ff202a90;hpb=b301eb19e6487497a8bb946c538a25aa4ee28c1d;ds=sidebyside diff --git a/avr/motor_ctrl/main.c b/avr/motor_ctrl/main.c index 5d65529..7781fb4 100644 --- a/avr/motor_ctrl/main.c +++ b/avr/motor_ctrl/main.c @@ -97,14 +97,14 @@ */ -#define KP 0.09 -#define KI 0.07 +#define KP 0.062 +#define KI 0.12 #define KD 0.0 #define PID_T 0.01 // wheel diameter=12cm, encoder=48cpr, gear ratio=1:47 // STEP_PER_M = 48*47/(d*pi) // Left real diameter: 0.12808, Right real diameter: 0.121 -#define STEP_PER_M 5770.8 +#define STEP_PER_M 5573.0 #define STEP_PER_M_LEFT (STEP_PER_M) #define STEP_PER_M_RIGHT (STEP_PER_M) #define WHEEL_DIST 0.39912 // Measured: 0.252