Class 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.
    • 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 drivetrain
        wheelBaseLength - the length between the furthest forward and further backward axles on this Robot's drivetrain
        wheelBaseWidth - the width between the left and ride side wheels on this Robot's drivetrain
        encoderWheelGearRatio - the gear ratio between the output shaft the encoders are mounted on and the wheels
        encoderCPR - 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object