Hello, I am a programmer on team 7826 and we have been having some issues with our swerve drive code. Overall the swerve drive works fine but when we drift significantly when trying to rotate while strafing. Also when rotating the rotation direction is the inverse of what it should be so left on the joystick rotates the robot to the right and right rotates left. We are using MK4is with Neos for both the turn and drive. Sparkmaxes are being used for the controllers. We are using CANCoders for our absolute encoders and a pigeon 2 for our gyro. We have the pigeon calibrated and mounted in the center of the chassis so that a clockwise rotation is positive. For kinematics we are have the Front Left than the Front Right, than the Back Left than the Back Right. So (+,+)(+,-)(-,+)(-,-) for the kinematics object. We have our both our turning and drive Neos inverted. I am aware that this type of issue is generally caused by a kinematics or motor inversion issue however I all of these settings seam correct. When I uninvert my driving wheels the entire robot drives backwerds(as you would think) and the drift issue becomes worse. When I try to uninvert my turning motors when we try and rotate in place the wheels form a X like for lock swerve rather than the desired trapezoid. Probably unrelated but we are using photon vision for our April tag reading system. The current code is running the 2024 beta versions of WPILib, Rev Lib, and phoenix.
Any help would be greatly apricated.