core / com.acmerobotics.roadrunner.followers / TankPIDVAFollower

TankPIDVAFollower

class TankPIDVAFollower : TrajectoryFollower (source)

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 HolonomicPIDVAFollower except adjusted for the nonholonomic constraint). Feedforward is applied at the wheel level.

Parameters

axialCoeffs - PID coefficients for the robot axial (robot X) controller

crossTrackCoeffs - PID coefficients for the robot heading controller based on cross track error

admissibleError - admissible/satisfactory pose error at the end of each move

timeout - max time to wait for the error to be admissible

clock - clock

Constructors

<init>

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 HolonomicPIDVAFollower except adjusted for the nonholonomic constraint). Feedforward is applied at the wheel level.

TankPIDVAFollower(axialCoeffs: PIDCoefficients, crossTrackCoeffs: PIDCoefficients, admissibleError: Pose2d = Pose2d(), timeout: Double = 0.0, clock: NanoClock = NanoClock.system())

Properties

lastError

Robot pose error computed in the last update call.

var lastError: Pose2d

Functions

followTrajectory

Follow the given trajectory.

fun followTrajectory(trajectory: Trajectory): Unit

internalUpdate

fun internalUpdate(currentPose: Pose2d, currentRobotVel: Pose2d?): DriveSignal