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

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    void
    end(boolean interrupted)
     
    void
     
    void
     
    boolean
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      initialize in class edu.wpi.first.wpilibj2.command.Command
    • execute

      public void execute()
      Overrides:
      execute in class edu.wpi.first.wpilibj2.command.Command
    • isFinished

      public boolean isFinished()
      Overrides:
      isFinished in class edu.wpi.first.wpilibj2.command.Command
    • end

      public void end(boolean interrupted)
      Overrides:
      end in class edu.wpi.first.wpilibj2.command.Command