Skip to content

Swerve Module Physical Properties

T Grinch edited this page Sep 7, 2023 · 11 revisions

Swerve Module Physical Properties (physicalproperties.json)

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

Fields

Name Units Required Description
wheelDiameter Inches Y Module wheel diameters in inches.
gearRatio MotorConfig Y Gear ratio for the motors, number of times the motor has to spin before the wheel rotates a single time.
encoderPulsePerRotation MotorConfig N Encoder pulse per rotation for non-integrated encoders. Set to 1 for SparkMAX's with NEO's, 360 for SparkMAX's with CANandCoders. Set to 2048 for Falcon 500s.
currentLimit MotorConfig N The current limit in AMPs to apply to the motors.
rampRate MotorConfig 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

Name Units Required Description
drive Number Y Drive motor value.
angle Number Y Angle motor value.