Our team is trying to implement a simple mecanum drive in Java, but whenever we try to set a motor speed based on a joystick value, the motor simply does nothing. No error is thrown, but it does not spin.
We are extending the SimpleRobot class. We are initializing the joysticks with:
Code:
private Joystick leftStick;
public RobotTemplate() {
leftStick = new Joystick(1);
and then later on...
Code:
drivetrain.tankDrive(leftStick, rightStick);
//or
leftMotor.set(leftStick.getX());
We just switched from C++ to Java and we were able to use the joysticks fine in our C++ program, so we don't think it's a control system issue.
Any help would be greatly appreciated! Thanks.