We have been working on a mecanum chassis for this years competition. We are using the mecanum cartesian function provided in the library. We feed it the following values.
Code:
(joystickx, joysticky, joysticktwist, 0.0)
The robot drives fine using this except it seems to drift one way quite a bit (especially at lower speeds). We have been trying to correct for this in the programming, but to no avail.
The motors are configured like this
| = andymark toughbox
- or _ = cim
|- -|
|_ _|
And the chains go from the output straight to the wheel (so nothing fancy there). In the code we had to invert two of the motors so they would spin in the right direction. I was wondering if that would cause the robot to drift because of the cims spinning slower in reverse.
I would just like to gather input from the community because I have racked my brain on this one for a while.
Is it mechanical / electrical?
If not suggestions for how to fix the drifting in the code?