Package com.marswars.swerve_lib
Interface ChassisRequest
- All Known Implementing Classes:
ChassisRequest.ApplyChassisSpeeds,ChassisRequest.ApplyFieldSpeeds,ChassisRequest.FieldCentric,ChassisRequest.FieldCentricFacingAngle,ChassisRequest.Idle,ChassisRequest.PointWheelsAt,ChassisRequest.RobotCentric,ChassisRequest.RobotCentricFacingAngle,ChassisRequest.SwerveDriveBrake
public interface ChassisRequest
Container for all the Swerve Requests. Use this to find all applicable swerve drive requests.
This is also an interface common to all swerve drive control requests that allow the request to calculate the state to apply to the modules.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAccepts a generic ChassisSpeeds to apply to the drivetrain.static classAccepts a generic Field Relative ChassisSpeeds to apply to the drivetrain.static classContains everything the control requests need to calculate the module state.static classDrives the swerve drivetrain in a field-centric manner.static classDrives the swerve drivetrain in a field-centric manner, maintaining a specified heading angle to ensure the robot is facing the desired directionstatic classDoes nothing to the swerve module state.static classSets the swerve drive modules to point to a specified direction.static classDrives the swerve drivetrain in a robot-centric manner.static classApplies robot-relative chassis speeds while maintaining a field-centric facing angle.static classSets the swerve drive module states to point inward on the robot in an "X" fashion, creating a natural brake which will oppose any motion.static enumThe reference for "forward" is sometimes different if you're talking about field relative. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ChassisRequest.ChassisRequestParameters parameters, Module... modulesToApply) Applies this swerve request to the given modules.
-
Method Details
-
apply
Applies this swerve request to the given modules. This is typically called by the SwerveDrivetrain.- Parameters:
parameters- Parameters the control request needs to calculate the module statemodulesToApply- Modules to which the control request is applied
-