MK4i Swerve Drive Rotation and "Drifting" issues

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.

Did you triple check that the CAN Ids of the motor controllers lined up with what you programmed them to?

You’re rotation issue can be solved pretty simply by negating the input from the rotation stick.

While you are correct that negating the value of the joystick would allow the robot to turn in the correct direction, we have found that it in fact covers up the underlying issue(s) that have caused the other effects we’re seeing. Therefore, it’s not an effective solution to our problem. Thank you for the advice.

Thank you for the suggestion! We have checked the CAN IDs but will definitely check them again tonight at the meeting to make sure 100% sure they are correct.

Turns out the issue was with the ctre alpha library ones we updated to the new version(as of Thursday the 11) the issue was “magically” fixed.