class SwervePIDVAFollower : HolonomicPIDVAFollower
Traditional PID controller with feedforward velocity and acceleration components to follow a trajectory. More specifically, the feedback is applied to the components of the robot's pose (x position, y position, and heading) to determine the velocity correction. The feedforward components are instead applied at the wheel level.
drive
- mecanum drive instance
translationalCoeffs
- PID coefficients for the robot axial and lateral (x and y, respectively) controllers
headingCoeffs
- PID coefficients for the robot heading controller
kV
- feedforward velocity gain
kA
- feedforward acceleration gain
kStatic
- signed, additive feedforward constant (used to overcome static friction)
SwervePIDVAFollower(drive: SwerveDrive, translationalCoeffs: PIDCoefficients, headingCoeffs: PIDCoefficients, kV: Double, kA: Double, kStatic: Double, clock: NanoClock = NanoClock.system())
Traditional PID controller with feedforward velocity and acceleration components to follow a trajectory. More specifically, the feedback is applied to the components of the robot's pose (x position, y position, and heading) to determine the velocity correction. The feedforward components are instead applied at the wheel level. |
open var lastError: Pose2d
Robot pose error computed in the last update call. |
fun updateDrive(poseVelocity: Pose2d, poseAcceleration: Pose2d): Unit |
open fun update(currentPose: Pose2d): Unit
Run a single iteration of the trajectory follower. |