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
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final edu.wpi.first.math.controller.HolonomicDriveControllerprivate final edu.wpi.first.math.filter.Debouncerprivate final BooleanSupplierprivate booleanprivate final edu.wpi.first.math.filter.LinearFilterprivate doubleprivate doubleprivate Numberprivate final CommandSwerveDrivetrainprivate final Supplier<edu.wpi.first.math.geometry.Pose2d>private final edu.wpi.first.wpilibj.smartdashboard.FieldObject2dprivate Numberprivate Supplier<edu.wpi.first.math.geometry.Translation2d>private Numberprivate Number -
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()private Supplier<edu.wpi.first.math.geometry.Translation2d>private doublevoidbooleanbooleanbooleanbooleanwithCanEnd(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
-
Field Details
-
swerve
-
controller
-
targetPose
-
lowPass
-
debounceRC
-
maxVelocity
-
maxAcceleration
-
isMotionProfiled
-
isAligned
-
targetPose2d
-
xTolerance
-
yTolerance
-
thetaTolerance
-
maxVelocityWhenAligned
-
translationSetpoint
-
canEnd
-
-
Constructor Details
-
SwerveDrivePIDToPose
-
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
-
getNewTranslationSetpointGenerator
-
getVelocityError
-
initialize
- Overrides:
initializein classedu.wpi.first.wpilibj2.command.Command
-
isAlignedX
-
isAlignedY
-
isAlignedTheta
-
execute
- Overrides:
executein classedu.wpi.first.wpilibj2.command.Command
-
isFinished
- Overrides:
isFinishedin classedu.wpi.first.wpilibj2.command.Command
-
end
- Overrides:
endin classedu.wpi.first.wpilibj2.command.Command
-