Package frc.robot.generated
Class TunerConstants.TunerSwerveDrivetrain
java.lang.Object
com.ctre.phoenix6.swerve.SwerveDrivetrain<com.ctre.phoenix6.hardware.TalonFX,com.ctre.phoenix6.hardware.TalonFXS,com.ctre.phoenix6.hardware.TalonFXS>
frc.robot.generated.TunerConstants.TunerSwerveDrivetrain
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- TunerConstants
public static class TunerConstants.TunerSwerveDrivetrain
extends com.ctre.phoenix6.swerve.SwerveDrivetrain<com.ctre.phoenix6.hardware.TalonFX,com.ctre.phoenix6.hardware.TalonFXS,com.ctre.phoenix6.hardware.TalonFXS>
Swerve Drive class utilizing CTR Electronics' Phoenix 6 API with the selected device types.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenix6.swerve.SwerveDrivetrain
com.ctre.phoenix6.swerve.SwerveDrivetrain.DeviceConstructor<DeviceT extends Object>, com.ctre.phoenix6.swerve.SwerveDrivetrain.OdometryThread, com.ctre.phoenix6.swerve.SwerveDrivetrain.SwerveControlParameters, com.ctre.phoenix6.swerve.SwerveDrivetrain.SwerveDriveState
-
Field Summary
Fields inherited from class com.ctre.phoenix6.swerve.SwerveDrivetrain
kNumConfigAttempts, m_drivetrainId, m_jni, m_telemetryJNI
-
Constructor Summary
ConstructorsConstructorDescriptionTunerSwerveDrivetrain
(com.ctre.phoenix6.swerve.SwerveDrivetrainConstants drivetrainConstants, double odometryUpdateFrequency, com.ctre.phoenix6.swerve.SwerveModuleConstants<?, ?, ?>... modules) Constructs a CTRE SwerveDrivetrain using the specified constants.TunerSwerveDrivetrain
(com.ctre.phoenix6.swerve.SwerveDrivetrainConstants drivetrainConstants, double odometryUpdateFrequency, edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3, edu.wpi.first.math.numbers.N1> odometryStandardDeviation, edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3, edu.wpi.first.math.numbers.N1> visionStandardDeviation, com.ctre.phoenix6.swerve.SwerveModuleConstants<?, ?, ?>... modules) Constructs a CTRE SwerveDrivetrain using the specified constants.TunerSwerveDrivetrain
(com.ctre.phoenix6.swerve.SwerveDrivetrainConstants drivetrainConstants, com.ctre.phoenix6.swerve.SwerveModuleConstants<?, ?, ?>... modules) Constructs a CTRE SwerveDrivetrain using the specified constants. -
Method Summary
Methods inherited from class com.ctre.phoenix6.swerve.SwerveDrivetrain
addVisionMeasurement, addVisionMeasurement, close, configNeutralMode, getKinematics, getModule, getModuleLocations, getModules, getOdometryFrequency, getOdometryFrequencyMeasure, getOdometryThread, getOperatorForwardDirection, getPigeon2, getRotation3d, getState, getStateCopy, isOdometryValid, isOnCANFD, registerTelemetry, resetPose, resetRotation, resetTranslation, samplePoseAt, seedFieldCentric, setControl, setOperatorPerspectiveForward, setStateStdDevs, setVisionMeasurementStdDevs, tareEverything, updateSimState
-
Constructor Details
-
TunerSwerveDrivetrain
public TunerSwerveDrivetrain(com.ctre.phoenix6.swerve.SwerveDrivetrainConstants drivetrainConstants, com.ctre.phoenix6.swerve.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 drivemodules
- Constants for each specific module
-
TunerSwerveDrivetrain
public TunerSwerveDrivetrain(com.ctre.phoenix6.swerve.SwerveDrivetrainConstants drivetrainConstants, double odometryUpdateFrequency, com.ctre.phoenix6.swerve.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 driveodometryUpdateFrequency
- 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(com.ctre.phoenix6.swerve.SwerveDrivetrainConstants drivetrainConstants, double odometryUpdateFrequency, edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3, edu.wpi.first.math.numbers.N1> odometryStandardDeviation, edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3, edu.wpi.first.math.numbers.N1> visionStandardDeviation, com.ctre.phoenix6.swerve.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 driveodometryUpdateFrequency
- 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 radiansvisionStandardDeviation
- The standard deviation for vision calculation in the form [x, y, theta]ᵀ, with units in meters and radiansmodules
- Constants for each specific module
-