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.
@JvmOverloads
public HolonomicPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients lateralCoeffs,
@NotNull
PIDCoefficients headingCoeffs,
@NotNull
Pose2d admissibleError,
double timeout,
@NotNull
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.
axialCoeffs - PID coefficients for the robot axial controller (robot X)lateralCoeffs - PID coefficients for the robot lateral controller (robot Y)headingCoeffs - PID coefficients for the robot heading controlleradmissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissibleclock - clock@JvmOverloads
public HolonomicPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients lateralCoeffs,
@NotNull
PIDCoefficients headingCoeffs,
@NotNull
Pose2d admissibleError,
double timeout)
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.
axialCoeffs - PID coefficients for the robot axial controller (robot X)lateralCoeffs - PID coefficients for the robot lateral controller (robot Y)headingCoeffs - PID coefficients for the robot heading controlleradmissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissible@JvmOverloads
public HolonomicPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients lateralCoeffs,
@NotNull
PIDCoefficients headingCoeffs,
@NotNull
Pose2d admissibleError)
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.
axialCoeffs - PID coefficients for the robot axial controller (robot X)lateralCoeffs - PID coefficients for the robot lateral controller (robot Y)headingCoeffs - PID coefficients for the robot heading controlleradmissibleError - admissible/satisfactory pose error at the end of each move@JvmOverloads
public HolonomicPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients lateralCoeffs,
@NotNull
PIDCoefficients headingCoeffs)
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.
axialCoeffs - PID coefficients for the robot axial controller (robot X)lateralCoeffs - PID coefficients for the robot lateral controller (robot Y)headingCoeffs - PID coefficients for the robot heading controller@NotNull public Pose2d getLastError()
Robot pose error computed in the last update call.
updateprotected void setLastError(@NotNull
Pose2d p)
Robot pose error computed in the last update call.
updatepublic void followTrajectory(@NotNull
Trajectory trajectory)
Follow the given trajectory.
trajectory@NotNull protected DriveSignal internalUpdate(@NotNull Pose2d currentPose, @Nullable Pose2d currentRobotVel)