Swerve drive (SDS Mk3) drift?

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

2 Likes

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.

1 Like

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.

I think there are better ways, but we cut down a block of wood to “lock” the module square the the frame. Then set the offsets from there.

You can clamp a straight bar across the sides of 2 modules to align them and set your 0 degree offset. I’ve found this method works very well.

2 Likes

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”.

1 Like

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