public class TankPIDVAFollower
extends TrajectoryFollower
Traditional PID controller with feedforward velocity and acceleration components to follow a trajectory. More
specifically, one feedback loop controls the path displacement (that is, x in the robot reference frame), and
another feedback loop to minimize cross track (lateral) error via heading correction (overall, very similar to
class HolonomicPIDVAFollower except adjusted for the nonholonomic constraint). Feedforward is applied at the wheel level.
class HolonomicPIDVAFollower@JvmOverloads
public TankPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients crossTrackCoeffs,
@NotNull
Pose2d admissibleError,
double timeout,
@NotNull
NanoClock clock)
Traditional PID controller with feedforward velocity and acceleration components to follow a trajectory. More
specifically, one feedback loop controls the path displacement (that is, x in the robot reference frame), and
another feedback loop to minimize cross track (lateral) error via heading correction (overall, very similar to
class HolonomicPIDVAFollower except adjusted for the nonholonomic constraint). Feedforward is applied at the wheel level.
axialCoeffs - PID coefficients for the robot axial (robot X) controllercrossTrackCoeffs - PID coefficients for the robot heading controller based on cross track erroradmissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissibleclock - clockclass HolonomicPIDVAFollower@JvmOverloads
public TankPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients crossTrackCoeffs,
@NotNull
Pose2d admissibleError,
double timeout)
Traditional PID controller with feedforward velocity and acceleration components to follow a trajectory. More
specifically, one feedback loop controls the path displacement (that is, x in the robot reference frame), and
another feedback loop to minimize cross track (lateral) error via heading correction (overall, very similar to
class HolonomicPIDVAFollower except adjusted for the nonholonomic constraint). Feedforward is applied at the wheel level.
axialCoeffs - PID coefficients for the robot axial (robot X) controllercrossTrackCoeffs - PID coefficients for the robot heading controller based on cross track erroradmissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissibleclass HolonomicPIDVAFollower@JvmOverloads
public TankPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients crossTrackCoeffs,
@NotNull
Pose2d admissibleError)
Traditional PID controller with feedforward velocity and acceleration components to follow a trajectory. More
specifically, one feedback loop controls the path displacement (that is, x in the robot reference frame), and
another feedback loop to minimize cross track (lateral) error via heading correction (overall, very similar to
class HolonomicPIDVAFollower except adjusted for the nonholonomic constraint). Feedforward is applied at the wheel level.
axialCoeffs - PID coefficients for the robot axial (robot X) controllercrossTrackCoeffs - PID coefficients for the robot heading controller based on cross track erroradmissibleError - admissible/satisfactory pose error at the end of each moveclass HolonomicPIDVAFollower@JvmOverloads
public TankPIDVAFollower(@NotNull
PIDCoefficients axialCoeffs,
@NotNull
PIDCoefficients crossTrackCoeffs)
Traditional PID controller with feedforward velocity and acceleration components to follow a trajectory. More
specifically, one feedback loop controls the path displacement (that is, x in the robot reference frame), and
another feedback loop to minimize cross track (lateral) error via heading correction (overall, very similar to
class HolonomicPIDVAFollower except adjusted for the nonholonomic constraint). Feedforward is applied at the wheel level.
axialCoeffs - PID coefficients for the robot axial (robot X) controllercrossTrackCoeffs - PID coefficients for the robot heading controller based on cross track errorclass HolonomicPIDVAFollower@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)