Package frc.robot

Class Robot

All Implemented Interfaces:
AutoCloseable

public class Robot extends SpectrumRobot
The main robot class. This class is the entry point for the robot code and manages all subsystems and their configurations. The main robot class. This class is the entry point for the robot code and manages all subsystems and their configurations.
  • Field Details

    • telemetry

      public static Telemetry telemetry
    • autonWarmedUp

      public static boolean autonWarmedUp
  • Constructor Details

    • Robot

      public Robot()
  • Method Details

    • resetCommandsAndButtons

      public void resetCommandsAndButtons()
      This method cancels all commands and returns subsystems to their default commands and the gamepad configs are reset so that new bindings can be assigned based on mode. This method should be called when each mode is initialized.

      Warning: This method will cause a very large loop overrun, as it rebinds all states to their triggers. Be careful when you call this as it will cause delays in the robot code. It is recommended to call this method at the end of disabledInit and teleopInit, as those are the most common places to need to reset commands and bindings.

    • clearCommandsAndButtons

      public void clearCommandsAndButtons()
      This method cancels all commands and returns subsystems to their default commands. This method should be called when each mode is initialized.

      Warning: This method will cause a very large loop overrun, as it rebinds all states to their triggers. Be careful when you call this as it will cause delays in the robot code. It is recommended to call this method at the end of disabledInit and teleopInit, as those are the most common places to need to reset commands and bindings.

    • setupSmartDashboardData

      public void setupSmartDashboardData()
      Sets up the SmartDashboard data for visualization.
    • robotInit

      public void robotInit()
      Overrides:
      robotInit in class IterativeRobotBase
    • robotPeriodic

      public void robotPeriodic()
      This method is called periodically the entire time the robot is running. Periodic methods are called every 20 ms (50 times per second) by default Since the robot software is always looping you shouldn't pause the execution of the robot code This ensures that new values are updated from the gamepads and sent to the motors
      Overrides:
      robotPeriodic in class IterativeRobotBase
    • disabledInit

      public void disabledInit()
      Overrides:
      disabledInit in class IterativeRobotBase
    • disabledPeriodic

      public void disabledPeriodic()
      Overrides:
      disabledPeriodic in class IterativeRobotBase
    • disabledExit

      public void disabledExit()
      Overrides:
      disabledExit in class IterativeRobotBase
    • autonomousInit

      public void autonomousInit()
      This method is called once when autonomous starts
      Overrides:
      autonomousInit in class IterativeRobotBase
    • autonomousPeriodic

      public void autonomousPeriodic()
      Overrides:
      autonomousPeriodic in class IterativeRobotBase
    • autonomousExit

      public void autonomousExit()
      Overrides:
      autonomousExit in class IterativeRobotBase
    • teleopInit

      public void teleopInit()
      Overrides:
      teleopInit in class IterativeRobotBase
    • teleopPeriodic

      public void teleopPeriodic()
      Overrides:
      teleopPeriodic in class IterativeRobotBase
    • teleopExit

      public void teleopExit()
      Overrides:
      teleopExit in class IterativeRobotBase
    • testInit

      public void testInit()
      This method is called once when test mode starts
      Overrides:
      testInit in class IterativeRobotBase
    • testPeriodic

      public void testPeriodic()
      Overrides:
      testPeriodic in class IterativeRobotBase
    • testExit

      public void testExit()
      Overrides:
      testExit in class IterativeRobotBase
    • simulationInit

      public void simulationInit()
      This method is called once when a simulation starts
      Overrides:
      simulationInit in class IterativeRobotBase
    • simulationPeriodic

      public void simulationPeriodic()
      This method is called periodically during simulation.
      Overrides:
      simulationPeriodic in class IterativeRobotBase
    • getRobotSim

      public static RobotSim getRobotSim()
    • getConfig

      public static Robot.Config getConfig()
    • getField2d

      public static Field2d getField2d()
    • getSwerve

      public static Swerve getSwerve()
    • getFuelIntake

      public static FuelIntake getFuelIntake()
    • getIntakeExtension

      public static IntakeExtension getIntakeExtension()
    • getIndexerTower

      public static IndexerTower getIndexerTower()
    • getIndexerBed

      public static IndexerBed getIndexerBed()
    • getOperator

      public static Operator getOperator()
    • getPilot

      public static Pilot getPilot()
    • getVisionSystem

      public static VisionSystem getVisionSystem()
    • getLauncher

      public static Launcher getLauncher()
    • getHood

      public static Hood getHood()
    • getVision

      public static Vision getVision()
    • getAuton

      public static Auton getAuton()
    • getCoordinator

      public static Coordinator getCoordinator()
    • getBatteryLogger

      public static BatteryLogger getBatteryLogger()