Interface Follower

All Known Implementing Classes:
LinearFollower, TrajectoryFollower

public interface Follower
Interface used for different types of followers.

Followers are one of the lowest-levels of pathfinding utilities - given a target position and a start position, determine how to control the robot so that it optimally reaches its target position.

Since:
0.1.0
Author:
Colin Robertson
  • Method Summary

    Modifier and Type Method Description
    void calculate()
    Calculate a list of all the instructions needed to follow the path.
    void drive()
    Drive the robot itself.
    boolean isDone()
    Whether or not the follower has finished its execution.
    void update()
    Update the follower's drive values.
  • Method Details

    • update

      void update()
      Update the follower's drive values.
    • calculate

      void calculate()
      Calculate a list of all the instructions needed to follow the path.

      This should (needs to, really) be run before the robot makes any sort of movement in any direction - otherwise, you're defeating the whole purpose of having a pre-planned route.

    • drive

      void drive()
      Drive the robot itself.

      The drive method should almost always call another drive method, a drive method that's contained in a Drive class, actually. Driving the robot within the follower is a shitty idea, and you shouldn't do it.

    • isDone

      boolean isDone()
      Whether or not the follower has finished its execution.
      Returns:
      whether or not the follower has finished its execution.