Interface PathFollower

All Superinterfaces:
Subsystem

public interface PathFollower extends 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 Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Makes the follower at INIT, from the robot's devices (after its drive and odometry are set up).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Stops following (or holding) now and stops the wheels.
    default void
    check(Object path)
    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.
    void
    follow(Object path, boolean mirrorX)
    Starts following a path.
    boolean
    True while it is following (not yet at the end).
    default boolean
    True while it holds the end point of a path after its step ended (a path that asked for it).
    default boolean
    False while it cannot follow safely (its pose source is not ready).
    double
    Inches 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

      void follow(Object path, boolean mirrorX)
      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

      default void check(Object path)
      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).