We’ve noticed some noticeable drift when commanding a straight drive with the SDS Mk3 swerve drive. We are using neo encoders for the angle drive. It’s enough drift that the gyro can see it but the encoders think they are still driving straight. We aren’t noticing any obvious wheel slip.
Could this be a limitation of the fidelity of the neo built-in encoders? With the angle drive gear ration we expect about a 0.6 degree per count accuracy.
Wondering if we need a 5th “sensing” wheel or higher accuracy angle encoders…
Potentially missing something here, because I’m not a programmer, but couldn’t you use the gyro to account for the drift? Not sure what’s causing the issue, someone else here can probably answer that part
Just thinking here, but you should probably confirm your encoder offsets are tuned perfect.
The drive motors could be running at slightly different speeds if you are running them open loop, so you may do well running speed PID loops on them.
I’d both of those are perfect, then I’d look at maybe compensating with the gyro.
We have a ttb and when the offsets are not well set the drift can be pretty severe. Our drivers just run it in field-centric mode, and it doesn’t bother them much.
We are running close loop on the spark max. Maybe we should double check the encoder offsets - is there a great way to do this? We might have just eyeballed it the first time. You could use a straight edge to get two wheels aligned, but it would be harder to make sure the two pairs are perfectly parallel.
There also may be some mechanical influences causing some drift, a wobbly wheel, slightly off-kilter module installation causing drift in your system. A HoldRobotAngle KP controller will help you “drive-straight”.