Class RotateToSpeakerAndDriveCommand

java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.commands.RotateToSpeakerAndDriveCommand
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable

public class RotateToSpeakerAndDriveCommand 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
  • Field Summary

    Fields inherited from class edu.wpi.first.wpilibj2.command.Command

    m_requirements
  • Constructor Summary

    Constructors
    Constructor
    Description
    Rotates the robot to face the speaker, while still allowing the driver to control forward and backward movement
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     

    Methods inherited from class edu.wpi.first.wpilibj2.command.Command

    addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineWith, end, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initialize, initSendable, isFinished, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withInterruptBehavior, withName, withTimeout

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RotateToSpeakerAndDriveCommand

      public RotateToSpeakerAndDriveCommand(SwerveSubsystem swerveSubsystem, DoubleSupplier forward, DoubleSupplier sideways, DoubleSupplier radians)
      Rotates the robot to face the speaker, while still allowing the driver to control forward and backward movement
      Parameters:
      swerveSubsystem - The instance of SwerveSubsystem
      forward - The desired forward percentage of the robot
      sideways - The desired sideways percentage of the robot
      radians - The desired rotation speed of the robot
  • Method Details

    • execute

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