Strafing and rotation not working on swerve

Hello, we are currently having problems with Strafing and rotating for swerve. The gears and the modules seem to be fighting each other when we try to do it and after that, the wheels don’t seem to reset properly. Also some times when we try to strafe the the robot just goes backwords or forward. The turning motor seems like it is not working, we tripple checked our code to see what the problem was but we could figure out what it was.Any help would be nice.

Video: https://youtu.be/VtjMeLSddWk

Github: GitHub - thorkiller35/Swerve-2023

Iteratively unit-test everything and ensure your coordinate systems are correct. This can be done on blocks.

Once you’ve confirmed that each motor in each pod is spinning as expected, and each encoder is positive in the correct direction, AND your gyro is positive in the correct direction, then you can start integration testing the bot. I would then focus on one pod at a time and make sure its doing what you would expect. Stick to discrete motion (straight forward/reverse. Straight right/left. Simple rotation in-place) when testing.

Assuming all that checks out, your bot should do exactly what you want. If not, you likely skipped a step somewhere.

Hey, just another member from Rushils team. Thanks for the suggestion. Gyro is working as intended. When we got all the motors to align properly they were only able to move forward and backward. But, when we tried to strafe the angle motors did not work leading to the drive motors to just move the bot forward and backward. Rotation did not work at all. Do you know why this is happening?

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