dirtbikerxz / BaseTalonFXSwerve

Other
145 stars 181 forks source link

Issue with one module running at slower speed #53

Closed Gary-Delancy closed 7 months ago

Gary-Delancy commented 9 months ago

I'm hoping someone can help us.

We have a brand new setup. MK4is, KrakenX60, cancoders, and a NavX.

We have it all wired up and coded with this base code, configured for our can ids, our dimensions, etc.

When we drive, 3 modules behave as we would expect, but one of the drive motors runs at a much slower pace (less than half the speed, if that).

We have swapped hardware (we have another 4 mk4is for our other chassis), power wires, can wires, and even assigned the can ids to a different module to eliminate hardware. The problem is always with the module assigned to #2 (back left). The problem must be in our code or configuration.

Any suggestions on how else to debug this?

ritchiedc commented 9 months ago

Have you adjusted kp? Look at issue #48.

Edit: the above is unlikely but... Also, try swapping turning motor and drive motor power. And could it be possible you swapped drive and turning motor ids?

Gary-Delancy commented 9 months ago

Yeah, we have tried different values there, and any other place that looked appropriate for our setup. Nothing seemed to make any difference.

We purposely swapped our drive/agle ids to make sure they were assigned properly, and the module slowly rotated while the other modules rolled along, lol.