Interface SwerveRequest
- All Known Implementing Classes:
SwerveRequest.ApplyChassisSpeeds
,SwerveRequest.FieldCentric
,SwerveRequest.FieldCentricFacingAngle
,SwerveRequest.Idle
,SwerveRequest.PointWheelsAt
,SwerveRequest.RobotCentric
,SwerveRequest.SwerveDriveBrake
,SwerveRequest.SysIdSwerveRotation
,SwerveRequest.SysIdSwerveSteerGains
,SwerveRequest.SysIdSwerveTranslation
public interface SwerveRequest
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 Classes Modifier and Type Interface Description static class
SwerveRequest.ApplyChassisSpeeds
Accepts a generic ChassisSpeeds to apply to the drivetrain.static class
SwerveRequest.FieldCentric
Drives the swerve drivetrain in a field-centric manner.static class
SwerveRequest.FieldCentricFacingAngle
Drives the swerve drivetrain in a field-centric manner, maintaining a specified heading angle to ensure the robot is facing the desired directionstatic class
SwerveRequest.ForwardReference
The reference for "forward" is sometimes different if you're talking about field relative.static class
SwerveRequest.Idle
Does nothing to the swerve module state.static class
SwerveRequest.PointWheelsAt
Sets the swerve drive modules to point to a specified direction.static class
SwerveRequest.RobotCentric
Drives the swerve drivetrain in a robot-centric manner.static class
SwerveRequest.SwerveControlRequestParameters
static class
SwerveRequest.SwerveDriveBrake
Sets 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 class
SwerveRequest.SysIdSwerveRotation
SysId-specific SwerveRequest to characterize the rotational characteristics of a swerve drivetrain.static class
SwerveRequest.SysIdSwerveSteerGains
SysId-specific SwerveRequest to characterize the steer module characteristics of a swerve drivetrain.static class
SwerveRequest.SysIdSwerveTranslation
SysId-specific SwerveRequest to characterize the translational characteristics of a swerve drivetrain. -
Method Summary
Modifier and Type Method Description StatusCode
apply(SwerveRequest.SwerveControlRequestParameters parameters, SwerveModule... modulesToApply)
Applies this swerve request to the given modules.
-
Method Details
-
apply
StatusCode apply(SwerveRequest.SwerveControlRequestParameters parameters, SwerveModule... modulesToApply)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- Returns:
- Status code of sending the request
-