Enum Class SwerveRequest.ForwardPerspectiveValue

java.lang.Object
java.lang.Enum<SwerveRequest.ForwardPerspectiveValue>
com.ctre.phoenix6.swerve.SwerveRequest.ForwardPerspectiveValue
All Implemented Interfaces:
Serializable, Comparable<SwerveRequest.ForwardPerspectiveValue>, java.lang.constant.Constable
Enclosing interface:
SwerveRequest

In field-centric control, the direction of "forward" is sometimes different depending on perspective. This addresses which forward to use.
  • Enum Constant Details

    • OperatorPerspective

      "Forward" (positive X) is determined from the operator's perspective. This is important for most teleop driven field-centric requests, where positive X means to drive away from the operator.

      Important: Users must specify the OperatorPerspective in the SwerveDrivetrain object

    • BlueAlliance

      "Forward" (positive X) is always from the perspective of the blue alliance (i.e. towards the red alliance). This is important in situations such as path following where positive X is always from the blue alliance perspective, regardless of where the operator is physically located.
  • Field Details

    • value

      public final int value
  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      Gets ForwardPerspectiveValue from specified value
      Parameters:
      value - Value of ForwardPerspectiveValue
      Returns:
      ForwardPerspectiveValue of specified value