We are trying to implement Mecanum Drive on our FRC robot. We have attached encoders to all 4 mecanum wheels, and have implemented PID systems with all of them. 3 of the motors are working excellently with the PID and encoders, but one of them is not working correctly.
It randomly jumps between positive and negative values, and appears to accelerate on its own when there is an input of 0.
The encoders that we are using are AMT103 encoders. We replaced the encoder on the motor that is not working with a new encoder, as well as adjusting the shaft, yet the problem persists. The code is the same for all 4 motors. The encoder wires connecting to the RoboRIO are made from jumper wires, so we tried to make a new one, but the problem is there. We switched ports on the roboRIO, but that didn’t work either.
What could be the problem?