Enum Class ChassisRequest.XPositiveReference

java.lang.Object
java.lang.Enum<ChassisRequest.XPositiveReference>
com.marswars.swerve_lib.ChassisRequest.XPositiveReference
All Implemented Interfaces:
Serializable, Comparable<ChassisRequest.XPositiveReference>, Constable
Enclosing interface:
ChassisRequest

public static enum ChassisRequest.XPositiveReference extends Enum<ChassisRequest.XPositiveReference>
The reference for "forward" is sometimes different if you're talking about field relative. This addresses which forward to use.
  • Enum Constant Details

    • TowardsRedAlliance

      public static final ChassisRequest.XPositiveReference TowardsRedAlliance
      This forward reference makes it so "forward" (positive X) is always towards the red alliance. This is important in situations such as path following where positive X is always towards the red alliance wall, regardless of where the operator physically are located.
    • OperatorPerspective

      public static final ChassisRequest.XPositiveReference OperatorPerspective
      This forward references makes it so "forward" (positive X) is determined from the operator's perspective. This is important for most teleop driven field-centric requests, where positive X really means to drive away from the operator.

      Important: Users must specify the OperatorPerspective with SwerveDrivetrain object

  • Method Details

    • values

      public static ChassisRequest.XPositiveReference[] 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

      public static ChassisRequest.XPositiveReference valueOf(String name)
      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