|
Re: WPILIB mecanum code not working properly
Looking at the code for RobotDrive, I can see that the gyroAngle is used to rotate the values of xIn and yIn. This is what creates the field-centric driving.
Your code that works appears to put the values of "strafe", "forwards", and "rotation" directly into the motor controllers.
Are you discarding the rotation from the gyroAngle to get driving to work normally? In other words, could you get good normal driving behavior by keeping the gyro angle at a constant zero?
|