Swerve Wheel Alignment

Hi, we have been having trouble with our wheels aligninng when we are starting the robot. we use mk4i neo + cancoder combination. we do the offsets like usual but whenever we start the robot with wheels that are not aligned, the wheels seem to go into random positions. but if we start the wheels aligned its fine. what might be the issue here. heres the code: GitHub - kuzeyatay/RobotBase2025

Yes, this is the pre-match ritual - always - at home or away. My team uses a straight edge or other jig that is made to fit the chassis. For messing around in the shop, eyeballing it is fine.

2 Likes

Can’t say 100% but everywhere else ur subtracting the abs encoder offset, but here ur adding RobotBase2025/src/main/java/frc/robot/subsystems/drive/ModuleIOSpark.java at main · kuzeyatay/RobotBase2025 · GitHub.

Here’s our module setup FRC2024/src/main/java/frc/lib/util/swerve/SwerveModuleReal.java at main · Frc5572/FRC2024 · GitHub

3 Likes

Even with an auto align routine it’s still best to help it get as close as humanly possible to give it less error to correct when auton starts.

2 Likes