Package com.marslib.auto
Class MARSAlignmentCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
com.marslib.auto.MARSAlignmentCommand
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
public class MARSAlignmentCommand
extends edu.wpi.first.wpilibj2.command.Command
Command to bypass default PathPlanner routing and dynamically align the robot natively onto a
dynamically moving or stationary field target timestamped via Vision.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior -
Constructor Summary
ConstructorsConstructorDescriptionMARSAlignmentCommand(SwerveDrive swerveDrive, Supplier<edu.wpi.first.math.geometry.Pose2d> targetPoseSupplier, double kPTranslation, double kPRotation, double maxTranslationVelMps, double maxTranslationAccelMps2, double maxRotationVelRps, double maxRotationAccelRps2, double translationToleranceMeters, double rotationToleranceRad) Constructs an alignment command with parameterized constants. -
Method Summary
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
-
MARSAlignmentCommand
public MARSAlignmentCommand(SwerveDrive swerveDrive, Supplier<edu.wpi.first.math.geometry.Pose2d> targetPoseSupplier, double kPTranslation, double kPRotation, double maxTranslationVelMps, double maxTranslationAccelMps2, double maxRotationVelRps, double maxRotationAccelRps2, double translationToleranceMeters, double rotationToleranceRad) Constructs an alignment command with parameterized constants.
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initializein classedu.wpi.first.wpilibj2.command.Command
-
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
-