MK4i Swerve Drive Specialties Problem

Hi, our team is having issues with the Swerve Drive Specialties template code. The program seems to be ignoring the variables with the ANGLE_OFFSETS, no matter what we change them to, the wheels always go to the same position.

The values of the Pheonix Tuner seem to match the ANGLE_OFFSETS, but when we pull the angle of the steer from Phoenix Tuner, it does not match what’s on Shuffleboard.

We are using Falcon500s, CANCoders, and the SDS Mk4i L2 swerve module. We are currently testing robot-oriented control with the goal of moving to field-oriented control.

Any help will be appreciated

1 Like

I would first suggest attempting to set the angle offsets on the CANCoders to 0, then remeasuring the offsets.
The other thing I will mention is that the SDS template code is very difficult to debug and has a few known issues. The current “gold standard” template for Falcon swerve is 364’s code: https://github.com/Team364/BaseFalconSwerve

2 Likes

Thank you so much for the advice, we had tried setting the angle offsets on the CANCoders to 0 but that didn’t seem to fix the issue. But, we tried out the template you linked and that seemed to work!