So I’m a little confused over what inputs from my controller I should use for my polar mecanum drive. I’m using a command based robot and a PS4 controller. Currently I’m using a Left joystick’s Y axis for Magnitude, the D-Pad for Direction, and the Right joystick’s X axis for Rotation. Everytime I press a button or joystick it just rotates I know I’m probably doing something wrong so any help is much appreciated!:yikes:
*While you’re waiting for an answer, you might want to consider providing more information.
Post your code, and post a couple of well-focused pictures showing how you have your wheels mounted.
Put the robot up on blocks and post what the wheels are doing when you give it a forward, then a rotate right, then a strafe right command.
Post what the signal lights on your motor controllers are doing.
Stuff like that.
The more info you provide, the better your chances of getting a targeted response.
There is a library on WPILib for mecanum drive control. If you checkthis page, it explains how to implement mecanum drive control. It’s pretty intuitive after you implement this - it calculates force vectors for you and automatically controls the motors to give you great directional control.