Class FrcDifferentialServoWrist.Params

java.lang.Object
frclib.subsystem.FrcDifferentialServoWrist.Params
Enclosing class:
FrcDifferentialServoWrist

public static class FrcDifferentialServoWrist.Params extends Object
This class contains all the parameters of the Differential Servo Wrist.
  • Constructor Details

    • Params

      public Params()
  • Method Details

    • toString

      public String toString()
      This method returns the string format of the Params info.
      Overrides:
      toString in class Object
      Returns:
      string format of the params info.
    • setServos

      public FrcDifferentialServoWrist.Params setServos(String servo1Name, int servo1Channel, boolean servo1Inverted, String servo2Name, int servo2Channel, boolean servo2Inverted)
      This methods sets the parameters of the two servos.
      Parameters:
      servo1Name - specifies the name of servo.
      servo1Channel - specifies the PWM channel for servo.
      servo1Inverted - specifies true if servo is inverted, false otherwise.
      servo2Name - specifies the name of servo.
      servo2Channel - specifies the PWM channel for servo.
      servo2Inverted - specifies true if servo is inverted, false otherwise.
      Returns:
      this object for chaining.
    • setPosRange

      public FrcDifferentialServoWrist.Params setPosRange(double logicalMin, double logicalMax, double physicalRange, double tiltOffset, double rotateOffset)
      This method sets the position range of the servos. Because of the nature of differential wrist, tilt position range must be the same as rotate position range.
      Parameters:
      logicalMin - specifies the logical minimum value of the servos. Typically 0.0.
      logicalMax - specifies the logical maximum value of the servos. Typically 1.0.
      physicalRange - specifies the physical position range, typically the servo movement range in degrees. For example, for 180-degree servo, physicalPosRange will be 180.0.
      tiltOffset - specifies the tilt position offset. This is the offset from physical zero position to the tilt range center position. For example, if the tilt range center is 45 degrees below physical zero position, tiltPosOffset will be -45.0.
      rotateOffset - specifies the rotate position offset. This is the offset from physical zero position to the rotate range center position. For example, if the rotate range center is exactly physical zero position, rotatePosOffset will be 0.0.
      Returns:
      this object for chaining.
    • setMaxStepRate

      public FrcDifferentialServoWrist.Params setMaxStepRate(double maxStepRate)
      This method sets the maximum speed of the servo.
      Parameters:
      maxStepRate - specifies the maximum speed of the servo in degrees per second.
      Returns:
      this object for chaining.
    • setPositionLimits

      public FrcDifferentialServoWrist.Params setPositionLimits(double tiltPosLowLimit, double tiltPosHighLimit, double rotatePosLowLimit, double rotatePosHighLimit)
      This method sets the tilt and rotate position limits.
      Parameters:
      tiltPosLowLimit - specifies the tilt position low limit in physical unit.
      tiltPosHighLimit - specifies the tilt position high limit in physical unit.
      rotatePosLowLimit - specifies the rotate position low limit in physical unit.
      rotatePosHighLimit - specifies the rotate position high limit in physical unit.
      Returns:
      this object for chaining.
    • setPosPresets

      public FrcDifferentialServoWrist.Params setPosPresets(double presetTolerance, double[] tiltPosPresets, double[] rotatePosPresets)
      This method sets the position preset parameters for both tilt and rotate.
      Parameters:
      presetTolerance - specifies the preset tolerance.
      tiltPosPresets - specifies the tilt position preset array.
      rotatePosPresets - specifies the rotate position preset array.
      Returns:
      this object for chaining.