Physical Properties Configuration
Swerve Module Physical Properties (modules/physicalproperties.json
)
modules/physicalproperties.json
)This JSON configures the physical properties shared with all the Swerve Modules. It maps 1:1 with PhysicalPropertiesJson
which creates SwerveModulePhysicalCharacteristics
.
Fields
conversionFactors
Y
Conversion factor composition. Factor is calculated on startup.
optimalVoltage
Voltage
Y
Optimal voltage to compensate to and base feedforward calculations off of.
currentLimit
MotorConfig More info here.
N
The current limit in AMPs to apply to the motors. Stator limit for SparkMAXs, Supply limit for TalonFXs.
rampRate
N
The minimum number of seconds to take for the motor to go from 0 to full throttle.
friction
N
The minimum voltage to move the wheel or module. Defaults to 0.2
for drive motors, and 0.3
for angle motors.
robotMass
Lb (Pounds)
N
Default is 50
kgs.
steerRotationalInertia
KilogramMetersSquare
N
The rotational inertia in KilogramMetersSquare
. Defaults to 0.03
.
wheelGripCoefficientOfFriction
Coefficient of Friction on Carpet
N
The grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration.
MotorConfig
drive
Number
Y
Drive motor value.
angle
Number
Y
Angle motor value.
Conversion Factor Composition
Drive Conversion Factor Composition
diameter
Inches
Y
Diameter of the wheel.
gearRatio
Number
Y
Gear ratio of the drive motor to wheel.
factor
Number
N
Pre-calculated conversion factor.
Angle Conversion Factor Composition
gearRatio
Number
Y
Gear ratio of the angle/steering/azimuth motor to wheel.
factor
Number
N
Pre-calculated conversion factor.
Example Configuration File
{
: {
"angle": {"gearRatio": 28.125},
"drive": {"diameter": 4, "gearRatio": 6.75}
},
"currentLimit": {
"drive": 40,
"angle": 20
},
"rampRate": {
"drive": 0.25,
"angle": 0.25
},
"wheelGripCoefficientOfFriction": 1.19,
"optimalVoltage": 12
}
Last updated
Was this helpful?