You
COULD do this:
Code:
/* Simulated tank drive controls for mecanum wheels */
magnitude = (leftStick.getMagnitude() + rightStick.getMagnitude()) / 2;
direction = (leftStick.getDirectionDegrees()+rightStick.getDirectionDegrees()) / 2;
rotation = (leftStick.getY() + rightStick.getY()) / 2;
driveRobot.mecanumDrive_Polar(magnitude, direction, rotation);
^ We did it like this because our driver specifically asked for these controls. He has driven tank drive for two years, and I guess old habits are hard to change.
You
SHOULD do this:
Code:
magnitude = leftStick.getMagnitude();
direction = leftStick.getDirectionDegrees();
rotation = rightStick.getX();
driveRobot.mecanumDrive_Polar(magnitude, direction, rotation);
^ This is what we call the FPS drive system (aka. xbox controller style). Left joystick controls w,a,s,d (forward, back, left, right) and diagonal movements. Right joystick controls rotation.