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 TypeFieldDescriptiondoubleAngle motor free speed rotations per minute.The current limit in AMPs to apply to the motors.Encoder pulse per rotation for non-integrated encoders.Gear ratio for the motors, number of times the motor has to spin before the wheel rotates a single time.The minimum number of seconds to take for the motor to go from 0 to full throttle.doubleWheel diameter in inches.doubleThe grip tape coefficient of friction on carpet. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePhysicalProperties(double optimalVoltage) Create the physical characteristics based off the parsed data.
-
Field Details
-
wheelDiameter
public double wheelDiameterWheel diameter in inches. -
gearRatio
Gear ratio for the motors, number of times the motor has to spin before the wheel rotates a single time. -
encoderPulsePerRotation
Encoder pulse per rotation for non-integrated encoders. 1 for integrated encoders. -
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. -
angleMotorFreeSpeedRPM
public double angleMotorFreeSpeedRPMAngle motor free speed rotations per minute.
-
-
Constructor Details
-
PhysicalPropertiesJson
public PhysicalPropertiesJson()
-
-
Method Details
-
createPhysicalProperties
Create the physical characteristics based off the parsed data.- Parameters:
optimalVoltage- Optimal voltage to compensate for and use to calculate drive motor feedforward.- Returns:
SwerveModulePhysicalCharacteristicsbased on parsed data.
-