Hello, we are having a problem with the MK4i modules aligning to the correct angle. In the attached video, I’m spinning the Back right module by hand and you can see the Current Angle and Absolute Encoder Positions going farther away from each other. After approximately 10 seconds, the two values suddenly snap to each other.
Yes, I’ve followed the setup instructions and the wheels do not currently face the same direction at this time.
The problem is that the robot does not seem to understand what the forward direction is even after configuring the offsets per the instructions.
Also, the wheels twitch every ~10 seconds which seems to be when the absolute encoder and current angle are reset to equal each other. I’m not sure why this happens but it can be seen at the end of the video.
I would like to add that we’ve used similar code on our MK3 chassis which leads me to believe it’s something with the motor controllers being inverted, but I’m not sure what to change.
Sorry to double post - but yes, the Mk4i angle motors are upside down compared to the Mk3 motor, and the rotation needs to be inverted. The SDS code upstream doesn’t have proper support for the Mk4i modules yet - but it should be a one line change in the angle motor config
Welp, we were editing a copy of the swerve-lib that wasn’t actually being deployed to the robot. Once we discovered this we started over from a fresh MK4I template and made sure we were editing the swerve-lib that was being deployed and now we have a driving chassis.