Class VisionAlign

  • All Implemented Interfaces:
    edu.wpi.first.wpilibj.Sendable, edu.wpi.first.wpilibj2.command.Command

    public class VisionAlign
    extends edu.wpi.first.wpilibj2.command.CommandBase
    • Field Summary

      • Fields inherited from class edu.wpi.first.wpilibj2.command.CommandBase

        m_requirements
    • Constructor Summary

      Constructors 
      Constructor Description
      VisionAlign​(edu.wpi.first.wpilibj.geometry.Rotation2d defaultRotation)
      Turn to align with Limelight target if it exists.
      VisionAlign​(edu.wpi.first.wpilibj.geometry.Rotation2d defaultRotation, double epsilon)
      Turn to align with Limelight target if it exists.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void end​(boolean interrupted)  
      void execute()  
      void initialize()  
      boolean isFinished()  
      • Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase

        addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface edu.wpi.first.wpilibj2.command.Command

        alongWith, andThen, andThen, asProxy, beforeStarting, cancel, deadlineWith, hasRequirement, isScheduled, perpetually, raceWith, runsWhenDisabled, schedule, schedule, withInterrupt, withTimeout
      • Methods inherited from interface edu.wpi.first.wpilibj.Sendable

        addChild, setName, setName, setName
    • Constructor Detail

      • VisionAlign

        public VisionAlign​(edu.wpi.first.wpilibj.geometry.Rotation2d defaultRotation)
        Turn to align with Limelight target if it exists. If none exists, turn to a default rotation.
        Parameters:
        defaultRotation - Default rotation, in degrees.
      • VisionAlign

        public VisionAlign​(edu.wpi.first.wpilibj.geometry.Rotation2d defaultRotation,
                           double epsilon)
        Turn to align with Limelight target if it exists. If none exists, turn to a default rotation.
        Parameters:
        defaultRotation - Default rotation, in degrees.
        epsilon - Acceptable error in angle
    • Method Detail

      • initialize

        public void initialize()
      • execute

        public void execute()
      • end

        public void end​(boolean interrupted)
      • isFinished

        public boolean isFinished()