File-By-File
GenericFollowerGenerator

GenericFollowerGenerator

A FollowerGenerator that generates GenericFollower instances. For almost all use cases, a generic follower should work perfectly fine. This class produces generic followers by accepting a robot and a trajectory as parameters.

Methods

GenericFollowerGenerator(Controller turnController)

Constructs a new GenericFollowerGenerator. The purpose of this class is to provide a functional interface (generate(Robot, Trajectory)) capable of generating trajectory followers.

  • turnController: The generator's turn controller. This turn controller will be used for all the generated GenericFollowers.

generate(Robot robot, Trajectory trajectory)

Creates a new GenericFollower, given a robot and a trajectory.

  • robot: The robot the follower is acting upon. This robot should be capable of providing positioning using the Robot.odometry() method, as well as providing movement options with the Robot.drive() method.
  • trajectory: The trajectory the follower should follow.

Returns a new GenericFollower.

getTurnController()

Returns the Controller instance used as the turn controller for this generator.

toString()

Returns a string representation of the GenericFollowerGenerator, including its turn controller.