Class FtcDifferentialServoWrist.Params

java.lang.Object
ftclib.subsystem.FtcDifferentialServoWrist.Params
Enclosing class:
FtcDifferentialServoWrist

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

    • servo1Params

      private FtcServoActuator.Params servo1Params
    • servo2Params

      private FtcServoActuator.Params servo2Params
    • logicalMin

      private double logicalMin
    • logicalMax

      private double logicalMax
    • physicalPosRange

      private double physicalPosRange
    • tiltPosOffset

      private double tiltPosOffset
    • rotatePosOffset

      private double rotatePosOffset
    • maxStepRate

      private double maxStepRate
    • tiltPosLowLimit

      private double tiltPosLowLimit
    • tiltPosHighLimit

      private double tiltPosHighLimit
    • rotatePosLowLimit

      private double rotatePosLowLimit
    • rotatePosHighLimit

      private double rotatePosHighLimit
    • presetTolerance

      private double presetTolerance
    • tiltPosPresets

      private double[] tiltPosPresets
    • rotatePosPresets

      private double[] rotatePosPresets
  • Constructor Details

    • Params

      public Params()
  • Method Details

    • toString

      @NonNull 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 FtcDifferentialServoWrist.Params setServos(String servo1Name, boolean servo1Inverted, String servo2Name, boolean servo2Inverted)
      This methods sets the parameters of the two servos.
      Parameters:
      servo1Name - specifies the name of servo1.
      servo1Inverted - specifies true if servo1 is inverted, false otherwise.
      servo2Name - specifies the name of servo2.
      servo2Inverted - specifies true if servo2 is inverted, false otherwise.
      Returns:
      this object for chaining.
    • setPosRange

      public FtcDifferentialServoWrist.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 FtcDifferentialServoWrist.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 FtcDifferentialServoWrist.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 FtcDifferentialServoWrist.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.