-
Notifications
You must be signed in to change notification settings - Fork 37
Swerve Module
T Grinch edited this page Nov 9, 2023
·
10 revisions
The swerve module configuration configures unique properties of each swerve module. It maps 1:1
with ModuleJson.java
which is used to
create SwerveModuleConfiguration
.
This configuration file interacts directly with swerve kinematics.
Name | Units | Required | Description |
---|---|---|---|
drive | Device | Y | Drive motor device configuration. |
angle | Device | Y | Angle motor device configuration. |
encoder | Device | Y | Absolute encoder device configuration. |
inverted | MotorConfig | 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 | 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. |
conversionFactor | MotorConfig | N |
OVERRIDE Conversion factor applied to the motor controller for the onboard PID, used to override this setting in swervedrive.json
|
Name | Units | Required | Description |
---|---|---|---|
drive | Value | Y | Drive motor value. |
angle | Value | Y | Angle motor value. |
Name | Units | Required | Description |
---|---|---|---|
front | Value | Y | Inches from robot center to module in forward direction. |
left | Value | Y | Inches from robot center to module in left direction. |