Swerve Auto
class SwerveAuto(xPID: ProfiledPIDController, yPID: ProfiledPIDController, twistPID: PIDController, twistTrapConstraints: TrapezoidProfile.Constraints, angleDeadzone: Double, positionDeadzone: Double, val swo: SwerveOdometry, val swerveSystem: SwerveDriveTrain, val gyro: GenericGyro, debugLogging: Boolean = false, field2d: Optional<Field2d> = Optional.empty())
A class that handles autonomous driving for swerve drive robots. This includes motion profiling and active PID correction.
Parameters
x PID
The PID controller for the x axis
y PID
The PID controller for the y axis
twist PID
The PID controller for the twist axis
twist Trap Constraints
The constraints for the twist PID controller
angle Deadzone
The deadzone for the twist PID controller
position Deadzone
The deadzone for the x and y PID controllers
swo
The swerve odometry object
swerve System
The swerve drive train object
gyro
The gyro object
debug Logging
Whether or not to log debug information to the console
field2d
The field2d object to update
Constructors
Link copied to clipboard
constructor(xPID: ProfiledPIDController, yPID: ProfiledPIDController, twistPID: PIDController, twistTrapConstraints: TrapezoidProfile.Constraints, angleDeadzone: Double, positionDeadzone: Double, swo: SwerveOdometry, swerveSystem: SwerveDriveTrain, gyro: GenericGyro, debugLogging: Boolean = false, field2d: Optional<Field2d> = Optional.empty())