We are testing mecanum drive train in our preseason. Our wheels make an X when viewed from the top. We are using an xbox controller with one stick controling forward reverse (axis 0, axis 1 respectively) and axis 4 for rotation. Our forward/reverse and strife side to side work flawlessly. Our rotation does not. Seems the command is sent to the wheels 90 deg out of order. The motor spin is like strife only exactly wrong. Does this make sense? Do you have any insight?
Update :
We figured it out. We had the wrong two motors inverted. During rotation running the two rear motors where inverted. Turns out the left two motors required inverting.
Even though you already solved it, I just wanted to add that the very first thing we do when debugging mecanum is disconnect every motor controller except one and try every direction, just to see if the wheel is spinning correctly. Rinse and repeat for every other wheel. That way you don’t have to think to hard to find the wheels which are wired backwards.
I’ll also mention that it’s usually a good idea to initially test any drivetrain on blocks. In 2010 I think it was, we were doing mecanum for the first time, and using a 3-axis stick. We were confused as to why wheels where moving (seemingly full-tilt) when the stick was at neutral.
Turns out the axis at the base of the joystick was “twist” and “z” (I think), but the actual “twist” axis was called “throttle”. So even if you think you know what you’re doing, things can surprise you.
You quickly figure that one out on your own BUT NEEDS TO BE NOTED. I had my first ever PID controlled drive train attack me. Encoders needed to be reversed. Error ran away :yikes: