Quote:
Originally Posted by mluckham
To solve this problem simply, just add a constant of 15-8 = 7 to the PWM on the slower side to make the motors spin the same.
|
Or center whatever function you use the scale the joysticks to PWMs on 131 and not 127. The loss at the ends doesn't really matter, the difference between a command of 250 and 254 is negligable.
The solution we took is to have a
Set_Left_Motor() and
Set_Right_Motor() function where if you pass in
x, it sets (for example)
pwm01 to
pwm01_min_forward+x if
x > 0 or
pwm_min_reverse-x if
x < 0, where pwm01_min_forward and _reverse are around 127+15 and 127-8. I don't have the actual values in front of me but we adjusted this to make min_forward and min_reverse the values that actually make the robot itself move, not just the wheels turn under no load.
Robinson Levin