Package com.cdarobotics.cdalib.tasks
Class FollowPathTask
java.lang.Object
com.cdarobotics.cdalib.tasks.Task
com.cdarobotics.cdalib.tasks.FollowPathTask
A task that follows a PedroPathing
Path, finishing when the follower is no longer busy.-
Constructor Summary
ConstructorsConstructorDescriptionFollowPathTask(com.pedropathing.follower.Follower follower, com.pedropathing.paths.Path path) Follows the path at full speed.FollowPathTask(com.pedropathing.follower.Follower follower, com.pedropathing.paths.Path path, double speed) Follows the path at the given speed. -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Called once before the firstTask.run().booleanrun()Called every loop afterTask.init().toString()Methods inherited from class com.cdarobotics.cdalib.tasks.Task
alongWith, andThen, raceWith, withDeadline
-
Constructor Details
-
FollowPathTask
public FollowPathTask(com.pedropathing.follower.Follower follower, com.pedropathing.paths.Path path) Follows the path at full speed.- Parameters:
follower- the drivetrain followerpath- the path to follow
-
FollowPathTask
public FollowPathTask(com.pedropathing.follower.Follower follower, com.pedropathing.paths.Path path, double speed) Follows the path at the given speed.- Parameters:
follower- the drivetrain followerpath- the path to followspeed- the path-following speed multiplier, as a fraction of the robot's max speed (1.0 is full speed)
-
-
Method Details
-
init
public void init()Description copied from class:TaskCalled once before the firstTask.run(). Set up state and issue starting commands here. -
run
public boolean run()Description copied from class:TaskCalled every loop afterTask.init(). -
toString
-