Package com.crossbotics.ftchelper.auto
Interface PathJob
public interface PathJob
A path that another library drives (Pedro Pathing, through the pedro module), as one autonomous
step:
AutoRoutine.followPath(java.lang.String, com.crossbotics.ftchelper.auto.PathJob, double). The robot layer's Steps.follow(...) makes it for you.
totalIn() and partNow() have defaults ("I do not know"), so a job written
before them still works: things to do along the path (PathEvent) then use the distance
left at the start as the length, and fire "part n" events at the end.
Docs: docs/modules/pedro.md
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Stops the path and the wheels now.booleanisBusy()True while it is still following the path.booleanisReady()False while its pose source (the odometry) is not ready.default intpartNow()Which part of the path it drives now, counting from 1.doubleInches left to the end of the WHOLE path (all its parts), for the "stuck" check andPathEvents.voidstart()Starts the path.default doubletotalIn()The length of the running path, inches, all parts together.
-
Method Details
-
start
void start()Starts the path. -
isBusy
boolean isBusy()True while it is still following the path. -
isReady
boolean isReady()False while its pose source (the odometry) is not ready. -
remainingIn
double remainingIn()Inches left to the end of the WHOLE path (all its parts), for the "stuck" check andPathEvents. -
cancel
void cancel()Stops the path and the wheels now. -
totalIn
default double totalIn()The length of the running path, inches, all parts together. NaN (the default) when it does not know: the routine then takes the distance left at the start. -
partNow
default int partNow()Which part of the path it drives now, counting from 1. 0 (the default) when it does not know.
-