Re: Bizarre Mecanum Programming Bug
We have successfully resolved our strafing issues without implementing either the gyro or encoders in a PID-type loop. We simply wrote code to cycle through all the possible PWM values and counted how many encoder counts the PWM value would produce per 10 loops. By graphing the Rotations vs. PWM data, we were able to see that the problem lay not so much in the speeds of different wheels but in where the real "deadzone" for the drivetrain was. All we had to do was shift the PWM deadzone center from 127 to 133 and we had our problem fixed. Just to note, our battery is mounted in the geometric center of the drive base, so uneven weight distribution is a negligible problem for us. I just thought should let everyone know this so that others can diagnose how to solve any arcing problems while strafing with mecanum wheels. Graphing the RPM vs PWM data really showed us exactly what we needed to do.
Thanks for the advice guys!
-Matt
|