Package ca.team3161.lib.robot.utils
Class ChassisParameters
- java.lang.Object
-
- ca.team3161.lib.robot.utils.ChassisParameters
-
public class ChassisParameters extends java.lang.Object
Describes physical attributes of a Robot.
-
-
Constructor Summary
Constructors Constructor Description ChassisParameters(double wheelRadius, double wheelBaseLength, double wheelBaseWidth, double encoderWheelGearRatio, double encoderCPR)
Construct a new ChassisParameters object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
double
getEncoderCPR()
Get the number of ticks per revolution for the drivetrain encoders.double
getEncoderWheelGearRatio()
Get the gear ratio between what the encoders measure and what the wheels experience.double
getWheelBaseLength()
Get the wheelbase length.double
getWheelBaseWidth()
Get the wheelbase width.double
getWheelRadius()
Get the wheel radius.int
hashCode()
-
-
-
Constructor Detail
-
ChassisParameters
public ChassisParameters(double wheelRadius, double wheelBaseLength, double wheelBaseWidth, double encoderWheelGearRatio, double encoderCPR)
Construct a new ChassisParameters object.- Parameters:
wheelRadius
- the radius of the wheels on this Robot's drivetrainwheelBaseLength
- the length between the furthest forward and further backward axles on this Robot's drivetrainwheelBaseWidth
- the width between the left and ride side wheels on this Robot's drivetrainencoderWheelGearRatio
- the gear ratio between the output shaft the encoders are mounted on and the wheelsencoderCPR
- the number of "ticks" the encoders on the drivetrain will count for each full revolution
-
-
Method Detail
-
getWheelRadius
public double getWheelRadius()
Get the wheel radius.- Returns:
- the wheel radius
-
getWheelBaseLength
public double getWheelBaseLength()
Get the wheelbase length.- Returns:
- the wheelbase length
-
getWheelBaseWidth
public double getWheelBaseWidth()
Get the wheelbase width.- Returns:
- the wheelbase width
-
getEncoderWheelGearRatio
public double getEncoderWheelGearRatio()
Get the gear ratio between what the encoders measure and what the wheels experience.- Returns:
- the gear ratio
-
getEncoderCPR
public double getEncoderCPR()
Get the number of ticks per revolution for the drivetrain encoders.- Returns:
- the number of ticks per revolution
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-