public class TrajectoryFollower
Generic class Trajectory follower for time-based pose reference tracking.
class Trajectory| Constructor and Description |
|---|
TrajectoryFollower(NanoClock clock)
Generic
class Trajectory follower for time-based pose reference tracking. |
TrajectoryFollower()
Generic
class Trajectory follower for time-based pose reference tracking. |
| Modifier and Type | Method and Description |
|---|---|
double |
elapsedTime()
Returns the elapsed time since the last
TrajectoryFollower.followTrajectory calls. |
void |
followTrajectory(Trajectory trajectory)
Follow the given trajectory.
|
NanoClock |
getClock()
clock
|
Pose2d |
getLastError()
Robot pose error computed in the last
TrajectoryFollower.update call. |
Trajectory |
getTrajectory() |
boolean |
isFollowing()
Returns true if the current trajectory has finished executing.
|
void |
setLastError(Pose2d p)
Robot pose error computed in the last
TrajectoryFollower.update call. |
void |
setTrajectory(Trajectory p) |
void |
update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
|
public TrajectoryFollower(NanoClock clock)
Generic class Trajectory follower for time-based pose reference tracking.
clock - clockclock - clockclass Trajectorypublic TrajectoryFollower()
Generic class Trajectory follower for time-based pose reference tracking.
class Trajectorypublic Trajectory getTrajectory()
public void setTrajectory(Trajectory p)
public Pose2d getLastError()
Robot pose error computed in the last TrajectoryFollower.update call.
TrajectoryFollower.updatepublic void setLastError(Pose2d p)
Robot pose error computed in the last TrajectoryFollower.update call.
TrajectoryFollower.updatepublic void followTrajectory(Trajectory trajectory)
Follow the given trajectory.
public boolean isFollowing()
Returns true if the current trajectory has finished executing.
public double elapsedTime()
Returns the elapsed time since the last TrajectoryFollower.followTrajectory calls.
TrajectoryFollower.followTrajectorypublic void update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
currentPose - current robot posepublic NanoClock getClock()
clock