Hi, our team is having a problem that we can’t figure out. One of our modules is having an issue setting an offset angle. Every time we deploy, the offset changes and ends up being about 20 degrees off. We’re using the swerve code from Team 364. What could be causing this problem, and how can we fix it? Thank you.
My best guess is that the magnet in the module is not glued in solidly.
2 Likes
We tried switching the CANCoder, but it didn’t fix it.
Did you investigate and confirm the magnet can not move relative to the shaft? If it is loose in there and can spin, even a little bit, it would explain the behavior you are seeing.
1 Like
Mark your magnet with a permanent marker so that it’s “straight” (it doesn’t matter what you think straight or forwards is as long as all of the lines are the same cardinal direction.) Like what everyone else is saying your line will likely not be the same after a run. This is what we mean by your magnet is not glued in correctly
1 Like