Class SwerveDrivePIDToPose
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
com.stuypulse.robot.commands.swerve.PIDtoPose.SwerveDrivePIDToPose
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
public class SwerveDrivePIDToPose
extends edu.wpi.first.wpilibj2.command.Command
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior -
Constructor Summary
ConstructorsConstructorDescriptionSwerveDrivePIDToPose(edu.wpi.first.math.geometry.Pose2d targetPose) SwerveDrivePIDToPose(Supplier<edu.wpi.first.math.geometry.Pose2d> targetPose) -
Method Summary
Modifier and TypeMethodDescriptionvoidend(boolean interrupted) voidexecute()voidbooleanbooleanbooleanbooleanbooleanwithCanEnd(Supplier<Boolean> canEnd) withTolerance(double x, double y, edu.wpi.first.math.geometry.Rotation2d theta) withTranslationalConstraints(double maxVelocity, double maxAcceleration) Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
SwerveDrivePIDToPose
public SwerveDrivePIDToPose(edu.wpi.first.math.geometry.Pose2d targetPose) -
SwerveDrivePIDToPose
-
-
Method Details
-
withTolerance
public SwerveDrivePIDToPose withTolerance(double x, double y, edu.wpi.first.math.geometry.Rotation2d theta) -
withTranslationalConstraints
public SwerveDrivePIDToPose withTranslationalConstraints(double maxVelocity, double maxAcceleration) -
withoutMotionProfile
-
withCanEnd
-
initialize
public void initialize()- Overrides:
initializein classedu.wpi.first.wpilibj2.command.Command
-
isAlignedX
public boolean isAlignedX() -
isAlignedY
public boolean isAlignedY() -
isAlignedTheta
public boolean isAlignedTheta() -
isAligned
public boolean isAligned() -
execute
public void execute()- Overrides:
executein classedu.wpi.first.wpilibj2.command.Command
-
isFinished
public boolean isFinished()- Overrides:
isFinishedin classedu.wpi.first.wpilibj2.command.Command
-
end
public void end(boolean interrupted) - Overrides:
endin classedu.wpi.first.wpilibj2.command.Command
-