Hi! I'm having trouble programming the mecanum wheels. I can make the robot move sideways and rotate but I cannot make it move forward and backward and I'm not sure why. I included the important parts of my code below.
Code:
Joystick joy1 = new Joystick(1);
RobotDrive drivetrain = new RobotDrive(1, 3, 2, 4);//Front Left - 1, Rear Left - 2, Front Right - 3, Rear Right - 4
double magnitude = joy1.getMagnitude();
double direction = joy1.getDirectionDegrees();
double rotation = joy1.getZ();
drivetrain.mecanumDrive_Polar(magnitude, direction, rotation);
I know for certain that it isn't an issue with the wiring. I tried using two joysticks instead of one but that didn't work either. I've pretty much run out of ideas at this point and hope someone can help. Thank you!