setEncoderResolution

If you're using goBILDA odometry pods, the ticks-per-mm values are stored here for easy access.

Parameters

pods

goBILDA_SWINGARM_POD or goBILDA_4_BAR_POD


open fun setEncoderResolution(ticksPerMm: Double)

Sets the encoder resolution in ticks per mm of the odometry pods. You can find this number by dividing the counts-per-revolution of your encoder by the circumference of the wheel.

Parameters

ticksPerMm

should be somewhere between 10 ticks/mm and 100 ticks/mm a goBILDA Swingarm pod is ~13.26291192


open fun setEncoderResolution(cpr: Double, wheelRadius: Measure<Distance>)

Sets the encoder resolution based on the counts-per-revolution and circumference, calculated with wheel radius. This is a BunyipsLib utility which supports WPIUnits.

Parameters

cpr

counts per revolution of your encoders

wheelRadius

radius of the encoder wheels