public class HolonomicPIDVAFollower
extends TrajectoryFollower
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.
| Constructor and Description |
|---|
HolonomicPIDVAFollower(Drive drive,
PIDCoefficients translationalCoeffs,
PIDCoefficients headingCoeffs,
double kV,
double kA,
double kStatic,
NanoClock clock)
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.
|
HolonomicPIDVAFollower(Drive drive,
PIDCoefficients translationalCoeffs,
PIDCoefficients headingCoeffs,
double kV,
double kA,
double kStatic)
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.
|
| Modifier and Type | Method and Description |
|---|---|
Pose2d |
getLastError()
Robot pose error computed in the last
TrajectoryFollower.update call. |
void |
setLastError(Pose2d p)
Robot pose error computed in the last
TrajectoryFollower.update call. |
void |
update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
|
void |
updateDrive(Pose2d poseVelocity,
Pose2d poseAcceleration) |
elapsedTime, followTrajectory, getClock, getLastError, getTrajectory, isFollowing, setLastError, setTrajectory, updatepublic HolonomicPIDVAFollower(Drive drive, PIDCoefficients translationalCoeffs, PIDCoefficients headingCoeffs, double kV, double kA, double kStatic, NanoClock clock)
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 instancetranslationalCoeffs - PID coefficients for the robot axial and lateral (x and y, respectively) controllersheadingCoeffs - PID coefficients for the robot heading controllerkV - feedforward velocity gainkA - feedforward acceleration gainkStatic - signed, additive feedforward constant (used to overcome static friction)clock - clockdrive - mecanum drive instancetranslationalCoeffs - PID coefficients for the robot axial and lateral (x and y, respectively) controllersheadingCoeffs - PID coefficients for the robot heading controllerkV - feedforward velocity gainkA - feedforward acceleration gainkStatic - signed, additive feedforward constant (used to overcome static friction)clock - clockpublic HolonomicPIDVAFollower(Drive drive, PIDCoefficients translationalCoeffs, PIDCoefficients headingCoeffs, double kV, double kA, double kStatic)
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 instancetranslationalCoeffs - PID coefficients for the robot axial and lateral (x and y, respectively) controllersheadingCoeffs - PID coefficients for the robot heading controllerkV - feedforward velocity gainkA - feedforward acceleration gainkStatic - signed, additive feedforward constant (used to overcome static friction)drive - mecanum drive instancetranslationalCoeffs - PID coefficients for the robot axial and lateral (x and y, respectively) controllersheadingCoeffs - PID coefficients for the robot heading controllerkV - feedforward velocity gainkA - feedforward acceleration gainkStatic - signed, additive feedforward constant (used to overcome static friction)public Pose2d getLastError()
Robot pose error computed in the last TrajectoryFollower.update call.
TrajectoryFollower.updatepublic void setLastError(Pose2d p)
Robot pose error computed in the last TrajectoryFollower.update call.
TrajectoryFollower.updatepublic void update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
currentPose - current robot pose