Physical Properties Configuration

Swerve Module Physical Properties (modules/physicalproperties.json)

This JSON configures the physical properties shared with all the Swerve Modules. It maps 1:1 with PhysicalPropertiesJson which creates SwerveModulePhysicalCharacteristics.

Use the Standard Conversion Factors page to set the conversion factors for your robot if you're using a COTS swerve module!

Fields

NameUnitsRequiredDescription

conversionFactor

MotorConfig calculated using the formula here.

N

Conversion factor applied to the motor controller for the onboard PID.

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.

rampRate

N

The minimum number of seconds to take for the motor to go from 0 to full throttle.

wheelGripCoefficientOfFriction

Coefficient of Friction on Carpet

N

The grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration.

MotorConfig

NameUnitsRequiredDescription

drive

Number

Y

Drive motor value.

angle

Number

Y

Angle motor value.

Example Configuration File

{
  : {
	"angle": 28.125,
	"drive": 0.047286787200699704
  },
  "currentLimit": {
    "drive": 40,
    "angle": 20
  },
  "rampRate": {
    "drive": 0.25,
    "angle": 0.25
  },
  "wheelGripCoefficientOfFriction": 1.19,
  "optimalVoltage": 12
}

Last updated