The SPG should work fine, but you’ll need to adjust a few things to account for differences in the gear ratios between the Swerve X modules and your Mk4is. Specifically, the drive gear ratio for the Mk4i with the L2 configuration is 8.14:1, and the steering ratio is 12.8:1 (correct me if I’m wrong). These numbers are different from the defaults in the SPG, so you’ll want to update those constants in the generated code to match your setup.
Another thing to check is the wheel diameter. Since you’re running Colson wheels, make sure the code is the same as the actual diameter of your wheels, this directly affects odometry and speed calculations. If the default in SPG assumes a different wheel size, you’ll need to update that to avoid issues.
You’ll also want to keep an eye on the feedforward and PID constants. These are probably tuned for Swerve X modules, so they might not work perfectly with the Mk4is right out of the box. It’s worth starting with the defaults to see how close they get, but you’ll likely need to adjust them, especially for the drive velocity and steering position controls.
For the CANCoders, make sure the offsets are properly calibrated. SPG includes a setup process for this, but the specific offsets will depend on how your Mk4i modules are assembled. Double-check the mechanical alignment and follow the initialization process carefully to avoid any weird alignment issues when the modules start rotating.
Once you’ve updated those details, run some simple tests to verify everything, like straight-line driving, rotation, and small maneuvers. If anything seems off (e.g., speed mismatches, inconsistent steering), revisit the gear ratio and PID tuning first. SPG is pretty flexible, so even if something doesn’t line up perfectly, you can probably tweak the code to make it work.
Overall, it’s definitely doable with the Mk4is, and the SPG makes a lot of the heavy lifting easier.!