Class SwerveDrivetrain.SwerveControlParameters

java.lang.Object
com.ctre.phoenix6.swerve.SwerveDrivetrain.SwerveControlParameters
Enclosing class:
SwerveDrivetrain<DriveMotorT extends CommonTalon, SteerMotorT extends CommonTalon, EncoderT extends ParentDevice>

Contains everything the control requests need to calculate the module state.
  • Field Details

    • drivetrainId

      public int drivetrainId
      ID of the native drivetrain instance, used for JNI calls
    • kinematics

      public org.wpilib.math.kinematics.SwerveDriveKinematics kinematics
      The kinematics object used for control
    • moduleLocations

      public org.wpilib.math.geometry.Translation2d[] moduleLocations
      The locations of the swerve modules
    • kMaxSpeedMps

      public double kMaxSpeedMps
      The max speed of the robot at 12 V output, in m/s
    • operatorForwardDirection

      public org.wpilib.math.geometry.Rotation2d operatorForwardDirection
      The forward direction from the operator perspective
    • currentChassisVelocity

      public org.wpilib.math.kinematics.ChassisVelocities currentChassisVelocity
      The current robot-centric chassis velocity
    • currentPose

      public org.wpilib.math.geometry.Pose2d currentPose
      The current pose of the robot
    • timestamp

      public double timestamp
      The timestamp of the current control apply, in the timebase of Utils.getCurrentTimeSeconds()
    • updatePeriod

      public double updatePeriod
      The update period of control apply
  • Constructor Details

  • Method Details