Package com.ctre.phoenix6.swerve
Class SwerveDrivetrain.SwerveControlParameters
java.lang.Object
com.ctre.phoenix6.swerve.SwerveDrivetrain.SwerveControlParameters
- Enclosing class:
- SwerveDrivetrain
Contains everything the control requests need to calculate the module state.
-
Field Summary
Modifier and TypeFieldDescriptionThe current chassis speeds of the robotThe current pose of the robotint
ID of the native drivetrain instance, used for JNI callsThe kinematics object used for controldouble
The max speed of the robot at 12 V output, in m/sThe locations of the swerve modulesThe forward direction from the operator perspectivedouble
The timestamp of the current control apply, in the timebase ofUtils.getCurrentTimeSeconds()
double
The update period of control apply -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
updateFromJni
(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 -
currentChassisSpeed
The current chassis speeds of the robot -
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
-