Package swervelib.parser.json
Class PhysicalPropertiesJson
java.lang.Object
swervelib.parser.json.PhysicalPropertiesJson
SwerveModulePhysicalCharacteristics parsed data. Used to configure the SwerveModule.-
Field Summary
FieldsModifier and TypeFieldDescriptionConversion factor applied to the motor controllers PID loops.The current limit in AMPs to apply to the motors.doubleThe 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.doubleThe grip tape coefficient of friction on carpet. -
Constructor Summary
Constructors -
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. -
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:
SwerveModulePhysicalCharacteristicsbased on parsed data.
-