public class PathFollower
class that contains methods to follow a list of coordinates used during autonomous
Modifier and Type | Class and Description |
---|---|
static class |
PathFollower.PathFollowerOutput |
Constructor and Description |
---|
PathFollower(Path path,
double trackWidth,
double initLookaheadDistance)
class that contains methods to follow a list of coordinates
used during autonomous
|
Modifier and Type | Method and Description |
---|---|
boolean |
doneWithPath(Pose2d robotPose) |
double |
getLookaheadDistance() |
void |
reset()
resets follower to first point
|
void |
setLookaheadDistance(double p) |
PathFollower.PathFollowerOutput |
update(Pose2d currentRobotPose)
Function used by path follower to be run in every periodic tick to calculate
velocities based on current path, robot location, robot angle, and target velocities
|
public PathFollower(Path path, double trackWidth, double initLookaheadDistance)
class that contains methods to follow a list of coordinates used during autonomous
public double getLookaheadDistance()
public void setLookaheadDistance(double p)
public PathFollower.PathFollowerOutput update(Pose2d currentRobotPose)
Function used by path follower to be run in every periodic tick to calculate velocities based on current path, robot location, robot angle, and target velocities
currentRobotPose
- the current position and rotation of the drivetrainpublic boolean doneWithPath(Pose2d robotPose)
public void reset()
resets follower to first point