public class PathFollower
Generic class Path
follower for time-independent pose reference tracking.
class Path
Constructor and Description |
---|
PathFollower(Pose2d admissibleError,
NanoClock clock)
Generic
class Path follower for time-independent pose reference tracking. |
PathFollower(Pose2d admissibleError)
Generic
class Path follower for time-independent pose reference tracking. |
Modifier and Type | Method and Description |
---|---|
void |
followPath(Path path)
Follow the given path.
|
NanoClock |
getClock()
clock
|
Pose2d |
getLastError()
Robot pose error computed in the last
PathFollower.update call. |
Path |
getPath()
Path being followed if
PathFollower.isFollowing is true. |
boolean |
isFollowing()
Returns true if the current path has finished executing.
|
void |
setLastError(Pose2d p)
Robot pose error computed in the last
PathFollower.update call. |
void |
setPath(Path p)
Path being followed if
PathFollower.isFollowing is true. |
void |
update(Pose2d currentPose)
Run a single iteration of the path follower.
|
public PathFollower(Pose2d admissibleError, NanoClock clock)
Generic class Path
follower for time-independent pose reference tracking.
clock
- clockclock
- clockclass Path
public PathFollower(Pose2d admissibleError)
Generic class Path
follower for time-independent pose reference tracking.
class Path
public Path getPath()
Path being followed if PathFollower.isFollowing
is true.
PathFollower.isFollowing
public void setPath(Path p)
Path being followed if PathFollower.isFollowing
is true.
PathFollower.isFollowing
public Pose2d getLastError()
Robot pose error computed in the last PathFollower.update
call.
PathFollower.update
public void setLastError(Pose2d p)
Robot pose error computed in the last PathFollower.update
call.
PathFollower.update
public void followPath(Path path)
Follow the given path.
path
- pathpublic boolean isFollowing()
Returns true if the current path has finished executing.
public void update(Pose2d currentPose)
Run a single iteration of the path follower.
currentPose
- current robot posepublic NanoClock getClock()
clock