Package swervelib.parser.json
Class PhysicalPropertiesJson
java.lang.Object
swervelib.parser.json.PhysicalPropertiesJson
SwerveModulePhysicalCharacteristics
parsed data. Used to configure the
SwerveModule.-
Field Summary
Modifier and TypeFieldDescriptionConversion factor applied to the motor controllers PID loops.Conversion Factors composition.The current limit in AMPs to apply to the motors.double
The voltage to use for the smart motor voltage compensation, default is 12.The minimum number of seconds to take for the motor to go from 0 to full throttle.double
The grip tape coefficient of friction on carpet. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate the physical characteristics based off the parsed data.
-
Field Details
-
conversionFactor
Conversion factor applied to the motor controllers PID loops. Can be calculated withSwerveMath.calculateDegreesPerSteeringRotation(double, double)
for angle motors orSwerveMath.calculateMetersPerRotation(double, double, double)
for drive motors. -
conversionFactors
Conversion Factors composition. Auto-calculates the conversion factors. -
currentLimit
The current limit in AMPs to apply to the motors. -
rampRate
The minimum number of seconds to take for the motor to go from 0 to full throttle. -
wheelGripCoefficientOfFriction
public double wheelGripCoefficientOfFrictionThe grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration. -
optimalVoltage
public double optimalVoltageThe voltage to use for the smart motor voltage compensation, default is 12.
-
-
Constructor Details
-
PhysicalPropertiesJson
public PhysicalPropertiesJson()
-
-
Method Details
-
createPhysicalProperties
Create the physical characteristics based off the parsed data.- Returns:
SwerveModulePhysicalCharacteristics
based on parsed data.
-