ZeroCoder
23-01-2013, 17:30
So I'm using the RobotDrive class and two Jaguar motor controllers to control out robot. In tank drive mode, I'm periodically calling RobotDrive.tankDrive(leftJoystick, rightJoystick).
My problem is that the direction of the motors is inverted with respect to the joystick axis. In other words, if I push the joysticks forward, the robot goes backwards, and vise versa. I know I can just invert the motors in the code, but my OCDness is telling me that it should be working correctly by default.
The left joystick is properly corresponding to the left motor controller and the same goes for the right side. Basically, if I push the left stick forward, I get a negative voltage reading on the output of the left jaguar. If I push the left stick backwards, I get a positive voltage reading on the jaguar output.
Any ideas what could be causing this?
My problem is that the direction of the motors is inverted with respect to the joystick axis. In other words, if I push the joysticks forward, the robot goes backwards, and vise versa. I know I can just invert the motors in the code, but my OCDness is telling me that it should be working correctly by default.
The left joystick is properly corresponding to the left motor controller and the same goes for the right side. Basically, if I push the left stick forward, I get a negative voltage reading on the output of the left jaguar. If I push the left stick backwards, I get a positive voltage reading on the jaguar output.
Any ideas what could be causing this?