How to Get Encoder to Angle Measurement?

Our swerve drive is messed up and we think it’s because of our encoder to angle measurement. How do you get this? Would it be (gear ratio) / 360 ?

Thank you.

For NEOS/Spark Maxes, 360.0 / angleGearRatio will work. We used that in our original swerve codebase to set it as the position conversion factor for the steer encoder.

For Falcons, you have to do some extra work since you also need to account for the encoder counts. The BaseFalconSwerve project has a Conversions class to deal with that.

You could also manually move the system while it is in coast mode one revolution and take the difference in encoder readouts then divide that by 360 for the conversion factor

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