Package ca.team3161.lib.robot.utils
Class ChassisParameters
- java.lang.Object
-
- ca.team3161.lib.robot.utils.ChassisParameters
-
public class ChassisParameters extends java.lang.ObjectDescribes 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 booleanequals(java.lang.Object o)doublegetEncoderCPR()Get the number of ticks per revolution for the drivetrain encoders.doublegetEncoderWheelGearRatio()Get the gear ratio between what the encoders measure and what the wheels experience.doublegetWheelBaseLength()Get the wheelbase length.doublegetWheelBaseWidth()Get the wheelbase width.doublegetWheelRadius()Get the wheel radius.inthashCode()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-