Package com.crossbotics.ftchelper.robot
Interface PathFollower
- All Superinterfaces:
Subsystem
A path follower from another library (Pedro Pathing, through the ftc-helper-lib "pedro" module), plugged
into the robot in five files:
follower(Pedro.follower(...)) in Robot.java, then
s.follow("To the goal", path) in an autonomous. The core library knows only this small plug, so
a team that does not use path following never downloads the other library.
It is updated once per loop with the rest of the robot (after the odometry). While it follows a path it drives the wheels; otherwise it leaves them alone. Docs: docs/modules/pedro.md
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceMakes the follower at INIT, from the robot's devices (after its drive and odometry are set up). -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Stops following (or holding) now and stops the wheels.default voidChecks a path at INIT (when the autonomous is built): throws IllegalArgumentException if this follower cannot follow it, so a mistake stops INIT and not the match.voidStarts following a path.booleanisBusy()True while it is following (not yet at the end).default booleanTrue while it holds the end point of a path after its step ended (a path that asked for it).default booleanisReady()False while it cannot follow safely (its pose source is not ready).doubleInches left to the end of the path (for "stuck" checks).Methods inherited from interface com.crossbotics.ftchelper.core.Subsystem
addTelemetry, name, stop, update
-
Method Details
-
follow
Starts following a path.- Parameters:
path- the path (the module says which kinds it takes)mirrorX- true on RED when routes are mirrored (Auto's mirrorForRed()): x and headings flip
-
isBusy
boolean isBusy()True while it is following (not yet at the end). -
isHolding
default boolean isHolding()True while it holds the end point of a path after its step ended (a path that asked for it). The next driving step, a new path or the end of the OpMode ends the hold. -
cancel
void cancel()Stops following (or holding) now and stops the wheels. -
remainingIn
double remainingIn()Inches left to the end of the path (for "stuck" checks). -
check
Checks a path at INIT (when the autonomous is built): throws IllegalArgumentException if this follower cannot follow it, so a mistake stops INIT and not the match. -
isReady
default boolean isReady()False while it cannot follow safely (its pose source is not ready).
-