core / com.acmerobotics.roadrunner.followers / MecanumPIDVAFollower

MecanumPIDVAFollower

class MecanumPIDVAFollower : 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.

Parameters

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)

clock - clock

Constructors

<init>

MecanumPIDVAFollower(drive: MecanumDrive, 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.

Inherited Properties

lastError

open var lastError: Pose2d

Robot pose error computed in the last update call.

Functions

updateDrive

fun updateDrive(poseVelocity: Pose2d, poseAcceleration: Pose2d): Unit

Inherited Functions

update

open fun update(currentPose: Pose2d): Unit

Run a single iteration of the trajectory follower.