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 Trajectory
public 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 Trajectory
public 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 Trajectory
public TrajectoryFollower()
Generic class Trajectory
follower for time-based pose reference tracking.
class Trajectory
public Trajectory getTrajectory()
Trajectory being followed if TrajectoryFollower.isFollowing
is true.
TrajectoryFollower.isFollowing
public void setTrajectory(Trajectory p)
Trajectory being followed if TrajectoryFollower.isFollowing
is true.
TrajectoryFollower.isFollowing
public Pose2d getLastError()
Robot pose error computed in the last TrajectoryFollower.update
call.
TrajectoryFollower.update
public void setLastError(Pose2d p)
Robot pose error computed in the last TrajectoryFollower.update
call.
TrajectoryFollower.update
public 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.followTrajectory
public void update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
currentPose
- current robot posepublic NanoClock getClock()
clock