Swerve Module Drifting Under Load

Hey Chief Delphi,

It’s our first year trying to run a swerve drivetrain, and unsurprisingly, we’ve come across some issues. Our drivetrain seems to perform correctly while on blocks (responds to inputs from the controller as expected, wheels all point and spin in the proper direction), but when put down on the ground, we’re experiencing one module that starts drifting really severely nearly immediately. We’ve tried replacing motors, motor controllers, and the CANCoder, all so far to no avail.

We’re using SDS MK4 modules with dual Neos. We are using a template from team 3512 for the code. Here is a link to the code we are running: GitHub - rapidAcceleration-4593/2023RapidAcceleration

If anyone has any ideas of what could be going wrong, or any troubleshooting steps to try, we’d greatly appreciate the help! Thanks!

A couple things.

  1. What happens when you put it up on blocks (wheels down) and try to disturb the azimuth by hand while it is running? (For each module). How hard do they fight back (how “hot” is the loop tuned?)

  2. Have you adjusted any PID values?

  1. Most of the modules seem to fight back against being moved pretty well, they’re tough to move. Our troublesome module puts up a lot less resistance when being pushed by hand.

  2. Currently we’re just using the default PID values from the template, allegedly the default steering values should work for COTS SDS modules. Haven’t tuned drive PID yet, but we had previously been running without the severe drift issue with the default values for drive PID as well.

Magnets loctited in/ secured? (This doesn’t necessarily sound like that problem, just wanted to check). By a similar token is the screw in the bottom of the center shaft?

Yep, magnets are secured and loctited and the screw is secured in the bottom of the center shaft.

We have had problems with the press fit pinions on the turning neos slipping. Check to make sure they are not by marking them before use with a marker and inspect once it drifts. To fix use green locktite on the neo pinions.


That was it! Back to driving as expected! Thanks for the help :slight_smile:


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.