public class TrajectoryFollower
Generic class Trajectory follower for time-based pose reference tracking.
class Trajectory| Modifier and Type | Field and Description |
|---|---|
protected Trajectory |
trajectory
Trajectory being followed if
isFollowing is true. |
| 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
followTrajectory call. |
void |
followTrajectory(Trajectory trajectory)
Follow the given
trajectory. |
protected NanoClock |
getClock()
clock
|
Pose2d |
getLastError()
Robot pose error computed in the last
update call. |
Trajectory |
getTrajectory()
Trajectory being followed if
isFollowing is true. |
protected DriveSignal |
internalUpdate(Pose2d currentPose) |
boolean |
isFollowing()
Returns true if the current trajectory has finished executing.
|
protected void |
setLastError(Pose2d p)
Robot pose error computed in the last
update call. |
protected void |
setTrajectory(Trajectory p)
Trajectory being followed if
isFollowing is true. |
DriveSignal |
update(Pose2d currentPose)
Run a single iteration of the trajectory follower.
|
@NotNull protected Trajectory trajectory
Trajectory being followed if isFollowing is true.
isFollowing@JvmOverloads
public TrajectoryFollower(@NotNull
Pose2d admissibleError,
double timeout,
@NotNull
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 - clockclass Trajectory@JvmOverloads
public TrajectoryFollower(@NotNull
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 admissibleclass Trajectory@JvmOverloads
public TrajectoryFollower(@NotNull
Pose2d admissibleError)
Generic class Trajectory follower for time-based pose reference tracking.
admissibleError - admissible/satisfactory pose error at the end of each moveclass Trajectory@JvmOverloads public TrajectoryFollower()
Generic class Trajectory follower for time-based pose reference tracking.
class Trajectory@NotNull public Trajectory getTrajectory()
Trajectory being followed if isFollowing is true.
isFollowingprotected void setTrajectory(@NotNull
Trajectory p)
Trajectory being followed if isFollowing is true.
isFollowing@NotNull public Pose2d getLastError()
Robot pose error computed in the last update call.
updateprotected void setLastError(@NotNull
Pose2d p)
Robot pose error computed in the last update call.
updatepublic void followTrajectory(@NotNull
Trajectory trajectory)
Follow the given trajectory.
trajectorypublic boolean isFollowing()
Returns true if the current trajectory has finished executing.
public double elapsedTime()
Returns the elapsed time since the last followTrajectory call.
followTrajectory@NotNull public DriveSignal update(@NotNull Pose2d currentPose)
Run a single iteration of the trajectory follower.
currentPose - current robot pose@NotNull protected DriveSignal internalUpdate(@NotNull Pose2d currentPose)
@NotNull protected NanoClock getClock()
clock