Teleop Swerve
class TeleopSwerve(swerveDrive: SwerveDrive, xSupplier: () -> Double, ySupplier: () -> Double, rotSupplier: () -> Double, fieldOriented: Boolean = true) : Command
Command for teleop swerve drive control with advanced input processing.
Provides features like:
Deadband filtering
Input squaring/cubing for finer control
Slew rate limiting for smooth acceleration
Field-oriented or robot-oriented driving
Usage Example:
val driveCommand = TeleopSwerve(
swerveDrive = drive,
xSupplier = { controller.leftY },
ySupplier = { controller.leftX },
rotSupplier = { controller.rightX },
fieldOriented = true
).apply {
configure {
deadband = 0.05
inputExponent = 2.0
enableSlewRateLimiting = true
translationSlewRate = 3.0
rotationSlewRate = 3.0
}
}Content copied to clipboard
Constructors
Link copied to clipboard
constructor(swerveDrive: SwerveDrive, xSupplier: () -> Double, ySupplier: () -> Double, rotSupplier: () -> Double, fieldOriented: Boolean = true)
Types
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Configures the teleop swerve command using a DSL-style configuration block.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Schedule this command when the provided condition is true.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard