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 Summary
FieldsModifier and TypeFieldDescriptionorg.wpilib.math.kinematics.ChassisVelocitiesThe current robot-centric chassis velocityorg.wpilib.math.geometry.Pose2dThe current pose of the robotintID of the native drivetrain instance, used for JNI callsorg.wpilib.math.kinematics.SwerveDriveKinematicsThe kinematics object used for controldoubleThe max speed of the robot at 12 V output, in m/sorg.wpilib.math.geometry.Translation2d[]The locations of the swerve modulesorg.wpilib.math.geometry.Rotation2dThe forward direction from the operator perspectivedoubleThe timestamp of the current control apply, in the timebase ofUtils.getCurrentTimeSeconds()doubleThe update period of control apply -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidupdateFromJni(SwerveJNI.ControlParams controlParams)
-
Field Details
-
drivetrainId
ID of the native drivetrain instance, used for JNI calls -
kinematics
The kinematics object used for control -
moduleLocations
The locations of the swerve modules -
kMaxSpeedMps
The max speed of the robot at 12 V output, in m/s -
operatorForwardDirection
The forward direction from the operator perspective -
currentChassisVelocity
The current robot-centric chassis velocity -
currentPose
The current pose of the robot -
timestamp
The timestamp of the current control apply, in the timebase ofUtils.getCurrentTimeSeconds() -
updatePeriod
The update period of control apply
-
-
Constructor Details
-
SwerveControlParameters
public SwerveControlParameters()
-
-
Method Details
-
updateFromJni
-