Swerve help with motor inverts

Hey,
We are running a Mk4i swerve drive and currently, the robots translational movements are working fine but when we try to rotate, this happens: I tried inverting the motors and changing angle offsets, but it just ended up screwing up the translational movement as well.
Here’s a quick picture.
Screen Shot 2024-02-12 at 5.52.35 PM
also here’s our github:

Thank you!

Depending on which way you wanted to turn (remember CCW+) swap diagonal module configurations.

1 Like

Ok, I forgot I could swap the motors :sweat_smile: I will try that tomorrow!

1 Like

Ok, this fixed the turning issue. Thanks!

1 Like

Ok, after fixing this rotation problem, another issue popped up where spinning while doing translational movement seems to pivot around a wheel. It’s kind of hard to describe so here’s a link to the video https://youtu.be/wPqwpb8D3U0
We tried putting the robot on blocks, and the wheels seemed to move to the correct positions and directions:
Screen Shot 2024-02-14 at 4.47.02 PM
so I’m not sure what could be wrong.
Thanks!

I have heard of this problem before, don’t know how to fix it but i knew it stemmed from a bad config somewhere.

1 Like

Ok, I managed to fix it after following this website and messing around with some constants: The eight steps - YAGSL
Thank you so much for your help!

Hehe, i wrote those :joy:

1 Like

Oh, lol. What a coincidence

1 Like