core / com.acmerobotics.roadrunner.followers / GVFFollower

GVFFollower

class GVFFollower : PathFollower

State-of-the-art path follower based on the GuidingVectorField.

Parameters

drive - tank drive

constraints - robot motion constraints

kN - normal vector weight (see GuidingVectorField)

kOmega - proportional heading gain

kV - feedforward velocity gain

kA - feedforward acceleration gain (currently unused)

kStatic - additive feedforward constant (used to overcome static friction)

errorMapFunc - error map function (see GuidingVectorField)

clock - clock

Constructors

<init>

GVFFollower(drive: TankDrive, constraints: SimpleMotionConstraints, kN: Double, kOmega: Double, kV: Double, kA: Double, kStatic: Double, errorMapFunc: (Double) -> Double = { it }, clock: NanoClock = NanoClock.system())

State-of-the-art path follower based on the GuidingVectorField.

Properties

lastError

var lastError: Pose2d

Robot pose error computed in the last update call.

Inherited Properties

clock

val clock: NanoClock

clock

path

var path: Path

Functions

followPath

fun followPath(path: Path): Unit

Follow the given path.

isFollowing

fun isFollowing(): Boolean

Returns true if the current path has finished executing.

update

fun update(currentPose: Pose2d): Unit

Run a single iteration of the path follower.