public class TrajectoryFollower
Generic class Trajectory follower for time-based pose reference tracking.
class Trajectory| Constructor and Description |
|---|
TrajectoryFollower(Pose2d admissibleError,
double timeout,
NanoClock clock)
Generic
class Trajectory follower for time-based pose reference tracking. |
TrajectoryFollower(Pose2d admissibleError,
double timeout)
Generic
class Trajectory follower for time-based pose reference tracking. |
TrajectoryFollower(Pose2d admissibleError)
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 call. |
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()
Trajectory being followed if
TrajectoryFollower.isFollowing is true. |
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)
Trajectory being followed if
TrajectoryFollower.isFollowing is true. |
void |
update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
|
public TrajectoryFollower(Pose2d admissibleError, double timeout, NanoClock clock)
Generic class Trajectory follower for time-based pose reference tracking.
admissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissibleclock - clockadmissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissibleclock - clockclass Trajectorypublic TrajectoryFollower(Pose2d admissibleError, double timeout)
Generic class Trajectory follower for time-based pose reference tracking.
admissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissibleadmissibleError - admissible/satisfactory pose error at the end of each movetimeout - max time to wait for the error to be admissibleclass Trajectorypublic TrajectoryFollower(Pose2d admissibleError)
Generic class Trajectory follower for time-based pose reference tracking.
admissibleError - admissible/satisfactory pose error at the end of each moveadmissibleError - admissible/satisfactory pose error at the end of each moveclass Trajectorypublic TrajectoryFollower()
Generic class Trajectory follower for time-based pose reference tracking.
class Trajectorypublic Trajectory getTrajectory()
Trajectory being followed if TrajectoryFollower.isFollowing is true.
TrajectoryFollower.isFollowingpublic void setTrajectory(Trajectory p)
Trajectory being followed if TrajectoryFollower.isFollowing is true.
TrajectoryFollower.isFollowingpublic 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 call.
TrajectoryFollower.followTrajectorypublic void update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
currentPose - current robot posepublic NanoClock getClock()
clock