Swerve Module Configuration
Last updated
Was this helpful?
Last updated
Was this helpful?
module/x.json
)The swerve module configuration configures unique properties of each swerve module. It maps 1:1 with which is used to create . This configuration file interacts directly with swerve kinematics.
IF your angle motors spin out of control then you may need to invert them in inverted
IF your drive motors spin uncontrollably you may have the drive motor set to be the angle motor via the ID's. Be sure to check them!
drive
Y
Drive motor device configuration.
angle
Y
Angle motor device configuration.
encoder
Y
Absolute encoder device configuration.
inverted
Y
Inversion state of each motor as a boolean.
absoluteEncoderOffset
Degrees
Y
Absolute encoder offset from 0 in degrees. May need to be a negative number.
absoluteEncoderInverted
Bool
N
Inversion state of the Absolute Encoder.
location
Y
The location of the swerve module from the center of the robot in inches. +x is torwards the robot front, and +y is torwards robot left.
conversionFactors
N
useCosineCompensator
Bool
N
Disabled cosine compensation which scales the velocity of modules which are not completely aligned with desired angles by the cosine of the difference between the angles.
drive
Value
Y
Drive motor value.
angle
Value
Y
Angle motor value.
front
Value
Y
Inches from robot center to module in forward direction.
left
Value
Y
Inches from robot center to module in left direction.
Overrides the value in if present and not equal to 0
.
OVERRIDE Conversion factors applied to the motor controller for the onboard PID, used to override this setting in