Package com.ctre.phoenix6.swerve
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 TypeFieldDescriptionThe current robot-centric chassis speedsThe current pose of the robotintID of the native drivetrain instance, used for JNI callsThe kinematics object used for controldoubleThe max speed of the robot at 12 V output, in m/sThe locations of the swerve modulesThe 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 -
currentChassisSpeed
The current robot-centric chassis speeds -
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
-