Class TunerConstants.TunerSwerveDrivetrain

java.lang.Object
com.ctre.phoenix6.swerve.SwerveDrivetrain<TalonFX,TalonFX,CANcoder>
org.teamvan.robot.generated.TunerConstants.TunerSwerveDrivetrain
All Implemented Interfaces:
AutoCloseable
Enclosing class:
TunerConstants

public static class TunerConstants.TunerSwerveDrivetrain extends SwerveDrivetrain<TalonFX,TalonFX,CANcoder>
Swerve Drive class utilizing CTR Electronics' Phoenix 6 API with the selected device types.
  • Constructor Details

    • TunerSwerveDrivetrain

      public TunerSwerveDrivetrain(SwerveDrivetrainConstants drivetrainConstants, SwerveModuleConstants<?,?,?>... modules)
      Constructs a CTRE SwerveDrivetrain using the specified constants.

      This constructs the underlying hardware devices, so users should not construct the devices themselves. If they need the devices, they can access them through getters in the classes.

      Parameters:
      drivetrainConstants - Drivetrain-wide constants for the swerve drive
      modules - Constants for each specific module
    • TunerSwerveDrivetrain

      public TunerSwerveDrivetrain(SwerveDrivetrainConstants drivetrainConstants, double odometryUpdateFrequency, SwerveModuleConstants<?,?,?>... modules)
      Constructs a CTRE SwerveDrivetrain using the specified constants.

      This constructs the underlying hardware devices, so users should not construct the devices themselves. If they need the devices, they can access them through getters in the classes.

      Parameters:
      drivetrainConstants - Drivetrain-wide constants for the swerve drive
      odometryUpdateFrequency - The frequency to run the odometry loop. If unspecified or set to 0 Hz, this is 250 Hz on CAN FD, and 100 Hz on CAN 2.0.
      modules - Constants for each specific module
    • TunerSwerveDrivetrain

      public TunerSwerveDrivetrain(SwerveDrivetrainConstants drivetrainConstants, double odometryUpdateFrequency, Matrix<N3,N1> odometryStandardDeviation, Matrix<N3,N1> visionStandardDeviation, SwerveModuleConstants<?,?,?>... modules)
      Constructs a CTRE SwerveDrivetrain using the specified constants.

      This constructs the underlying hardware devices, so users should not construct the devices themselves. If they need the devices, they can access them through getters in the classes.

      Parameters:
      drivetrainConstants - Drivetrain-wide constants for the swerve drive
      odometryUpdateFrequency - The frequency to run the odometry loop. If unspecified or set to 0 Hz, this is 250 Hz on CAN FD, and 100 Hz on CAN 2.0.
      odometryStandardDeviation - The standard deviation for odometry calculation in the form [x, y, theta]ᵀ, with units in meters and radians
      visionStandardDeviation - The standard deviation for vision calculation in the form [x, y, theta]ᵀ, with units in meters and radians
      modules - Constants for each specific module