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 Type
    Method
    Description
    void
    Stops the path and the wheels now.
    boolean
    True while it is still following the path.
    boolean
    False while its pose source (the odometry) is not ready.
    default int
    Which part of the path it drives now, counting from 1.
    double
    Inches left to the end of the WHOLE path (all its parts), for the "stuck" check and PathEvents.
    void
    Starts the path.
    default double
    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 and PathEvents.
    • 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.