Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Swerve Module Physical Properties

T Grinch edited this page Mar 28, 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. 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.
angleMotorFreeSpeedRPM Rotations per Minute Y Angle motor free speed rotations per minute.
angleMotorsKV Gain kV N Angle motor kV used for second order kinematics to tune the feedforward, this variable should be adjusted so that your drive train does not drift towards the direction you are rotating while you translate. When set to 0 the calculated kV will be used.

MotorConfig

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

Clone this wiki locally