public class PathPlannerAutoEvent extends AutoEvent
| Modifier and Type | Field and Description |
|---|---|
MecanumPathPlanner |
path |
childEvents, isRunning, localUpdateCount| Constructor and Description |
|---|
PathPlannerAutoEvent(double[][] waypoints_in,
double timeAllowed_in,
DriveTrainWheelSpeedPI leftFrontMotor_in,
DriveTrainWheelSpeedPI rightFrontMotor_in,
DriveTrainWheelSpeedPI leftRearMotor_in,
DriveTrainWheelSpeedPI rightRearMotor_in)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDone()
Returns true once we've run the whole path
|
boolean |
isTriggered()
Always returns true, since the routine should run as soon as it comes up in the list.
|
void |
userForceStop()
Force both sides of the drivetrain to zero
|
void |
userStart()
perform all actions needed at the start of the event
|
void |
userUpdate()
On the first loop, calculates velocities needed to take the path specified.
|
addChildEvent, forceStopAllChildrenpublic MecanumPathPlanner path
public PathPlannerAutoEvent(double[][] waypoints_in,
double timeAllowed_in,
DriveTrainWheelSpeedPI leftFrontMotor_in,
DriveTrainWheelSpeedPI rightFrontMotor_in,
DriveTrainWheelSpeedPI leftRearMotor_in,
DriveTrainWheelSpeedPI rightRearMotor_in)
waypoints_in - Set of x/y points which define the path the robot should take.timeAllowed_in - Number of seconds the path traversal should take. Must be long enough
to allow the path planner to output realistic speeds.leftFrontMotor_in - Reference to the PID which controls the left front wheel of the drivetrain.
Presumes the .set() method accepts units of ft/sec.rightFrontMotor_inReference - to the PID which controls the right front wheel of the drivetrain.
Presumes the .set() method accepts units of ft/sec.leftRearMotor_in - Reference to the PID which controls the left rear wheel of the drivetrain.
Presumes the .set() method accepts units of ft/sec.rightRearMotor_in - Reference to the PID which controls the right rear wheel of the drivetrain.
Presumes the .set() method accepts units of ft/sec.public void userUpdate()
userUpdate in class AutoEventpublic void userForceStop()
userForceStop in class AutoEventpublic boolean isTriggered()
isTriggered in class AutoEventpublic boolean isDone()