Package frclib.archive
Class FrcSwervePathFollower
java.lang.Object
frclib.archive.FrcSwervePathFollower
-
Constructor Summary
ConstructorsConstructorDescriptionFrcSwervePathFollower(String instanceName, TrcSwerveDriveBase driveBase, TrcPidController.PidCoefficients posPidCoeff, TrcPidController.PidCoefficients headingPidCoeff, double maxRotVel, double maxRotAccel, double maxWheelSpeed) FrcSwervePathFollower(String instanceName, TrcSwerveDriveBase driveBase, TrcPidController.PidCoefficients posPidCoeff, TrcPidController.PidCoefficients headingPidCoeff, double maxRotVel, double maxRotAccel, double maxWheelSpeed, double unitsPerMeter) -
Method Summary
-
Constructor Details
-
FrcSwervePathFollower
public FrcSwervePathFollower(String instanceName, TrcSwerveDriveBase driveBase, TrcPidController.PidCoefficients posPidCoeff, TrcPidController.PidCoefficients headingPidCoeff, double maxRotVel, double maxRotAccel, double maxWheelSpeed) -
FrcSwervePathFollower
public FrcSwervePathFollower(String instanceName, TrcSwerveDriveBase driveBase, TrcPidController.PidCoefficients posPidCoeff, TrcPidController.PidCoefficients headingPidCoeff, double maxRotVel, double maxRotAccel, double maxWheelSpeed, double unitsPerMeter)
-
-
Method Details
-
start
public void start(edu.wpi.first.math.trajectory.Trajectory... trajectories) -
start
public void start(TrcEvent event, double timeout, edu.wpi.first.math.trajectory.Trajectory... trajectories) Start following the supplied trajectories back to back. If only one trajectory to follow, then just pass one. The event will be signalled after all trajectories have been followed. If the operation times out, it will be stopped and the event will be cancelled. UseFrcPath.createTrajectory(trclib.pathdrive.TrcPath, edu.wpi.first.math.trajectory.TrajectoryConfig, frclib.archive.FrcPath.SplineType)to create a trajectory.- Parameters:
event- The event to signal when done. Set to null if unneeded.timeout- Time in seconds to wait for the operation to finish. Set to 0 for no timeout.trajectories- The supplied trajectories to follow, in the absolute field reference frame. The first point should be the robot's current pose.
-
isActive
public boolean isActive() -
cancel
public void cancel() -
toString
-