Class SwerveRequest.PointWheelsAt
java.lang.Object
com.ctre.phoenix6.mechanisms.swerve.SwerveRequest.PointWheelsAt
- All Implemented Interfaces:
SwerveRequest
- Enclosing interface:
- SwerveRequest
public static class SwerveRequest.PointWheelsAt extends Object implements SwerveRequest
Sets the swerve drive modules to point to a specified direction.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ctre.phoenix6.mechanisms.swerve.SwerveRequest
SwerveRequest.ApplyChassisSpeeds, SwerveRequest.FieldCentric, SwerveRequest.FieldCentricFacingAngle, SwerveRequest.ForwardReference, SwerveRequest.Idle, SwerveRequest.PointWheelsAt, SwerveRequest.RobotCentric, SwerveRequest.SwerveControlRequestParameters, SwerveRequest.SwerveDriveBrake, SwerveRequest.SysIdSwerveRotation, SwerveRequest.SysIdSwerveSteerGains, SwerveRequest.SysIdSwerveTranslation
-
Field Summary
Fields Modifier and Type Field Description SwerveModule.DriveRequestType
DriveRequestType
The type of control request to use for the drive motor.Rotation2d
ModuleDirection
The direction to point the modules toward.SwerveModule.SteerRequestType
SteerRequestType
The type of control request to use for the steer motor. -
Constructor Summary
Constructors Constructor Description PointWheelsAt()
-
Method Summary
Modifier and Type Method Description StatusCode
apply(SwerveRequest.SwerveControlRequestParameters parameters, SwerveModule... modulesToApply)
Applies this swerve request to the given modules.SwerveRequest.PointWheelsAt
withDriveRequestType(SwerveModule.DriveRequestType driveRequestType)
Sets the type of control request to use for the drive motor.SwerveRequest.PointWheelsAt
withModuleDirection(Rotation2d moduleDirection)
Sets the direction to point the modules toward.SwerveRequest.PointWheelsAt
withSteerRequestType(SwerveModule.SteerRequestType steerRequestType)
Sets the type of control request to use for the steer motor.
-
Field Details
-
ModuleDirection
The direction to point the modules toward. This direction is still optimized to what the module was previously at. -
DriveRequestType
The type of control request to use for the drive motor. -
SteerRequestType
The type of control request to use for the steer motor.
-
-
Constructor Details
-
PointWheelsAt
public PointWheelsAt()
-
-
Method Details
-
apply
public StatusCode apply(SwerveRequest.SwerveControlRequestParameters parameters, SwerveModule... modulesToApply)Description copied from interface:SwerveRequest
Applies this swerve request to the given modules. This is typically called by the SwerveDrivetrain.- Specified by:
apply
in interfaceSwerveRequest
- 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
-
withModuleDirection
Sets the direction to point the modules toward. This direction is still optimized to what the module was previously at.- Parameters:
moduleDirection
- Direction to point the modules toward- Returns:
- this request
-
withDriveRequestType
public SwerveRequest.PointWheelsAt withDriveRequestType(SwerveModule.DriveRequestType driveRequestType)Sets the type of control request to use for the drive motor.- Parameters:
driveRequestType
- The type of control request to use for the drive motor- Returns:
- this request
-
withSteerRequestType
public SwerveRequest.PointWheelsAt withSteerRequestType(SwerveModule.SteerRequestType steerRequestType)Sets the type of control request to use for the steer motor.- Parameters:
steerRequestType
- The type of control request to use for the steer motor- Returns:
- this request
-