Swerve Odometry
Parameters
The swerve drive train to use for odometry
The gyro to use for odometry
The conversion factor from swerve drive units to meters. This unit (named the SWO) was accidentally discovered by team 2875 (Milan Lustig) and represents a semi-fluid unit of measurement nearly equal to a meter. SwerveOdometry will position the robot in 2d space in this unit, a conversion factor is required to turn it to meters. To discern this conversion factor, I recommend settings this value to one, measuring out 10-50m (mark the floor), drive the robot in a straight line at a medium speed (to ensure the wheels don't slip) along this distance. Then, you can take the distance traveled reported by SwerveOdometry (with a conversion factor of one) and divide it by the actual measured distance traveled. It is recommended to re-measure this on any major changes in floor material (carpet vs tile) or with any changes to wheel treads, robot weight, or motors. ALL HAIL THE SWO!
The starting position of the robot
The list of limelights to use for odometry
Whether or not to log debug information
The field2d object to use for odometry