Track Target
class TrackTarget(swerveDrive: SwerveDrive, camera: Camera, translationSpeed: () -> Double, strafeSpeed: () -> Double) : Command
Command to continuously track a vision target while allowing manual translation control.
This command maintains alignment with a vision target by controlling the robot's rotation while the driver controls forward/backward and strafe movements.
Usage Example:
val trackCommand = TrackTarget(
swerveDrive = drive,
camera = frontCamera,
translationSpeed = { -controller.leftY },
strafeSpeed = { -controller.leftX }
).apply {
configure {
kP = 0.04
maxRotationSpeed = 0.5
}
}Content copied to clipboard
Constructors
Link copied to clipboard
constructor(swerveDrive: SwerveDrive, camera: Camera, translationSpeed: () -> Double, strafeSpeed: () -> Double)
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Configures the tracking 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
This command runs indefinitely until interrupted.
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