1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commandgroups
.AutonGearThenBaselinePegCloseToBoiler
;
4 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.DriveTrain
;
5 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Intake
;
6 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Shooter
;
8 import edu
.wpi
.cscore
.UsbCamera
;
9 import edu
.wpi
.first
.wpilibj
.CameraServer
;
10 import edu
.wpi
.first
.wpilibj
.IterativeRobot
;
11 import edu
.wpi
.first
.wpilibj
.command
.Scheduler
;
13 public class Robot
extends IterativeRobot
{
14 private static DriveTrain driveTrain
;
15 private static Shooter shooter
;
17 private static Intake intake
;
20 public void robotInit() {
21 driveTrain
= DriveTrain
.getDriveTrain();
23 shooter
= Shooter
.getShooter();
24 intake
= Intake
.getIntake();
25 CameraServer server
= CameraServer
.getInstance();
26 UsbCamera climberCam
= server
.startAutomaticCapture("climbercam", 0);
27 UsbCamera intakeCam
= server
.startAutomaticCapture("intakecam", 1);
30 public static DriveTrain
getDriveTrain() {
31 return DriveTrain
.getDriveTrain();
34 public static Shooter
getShooter() {
35 return Shooter
.getShooter();
38 public static OI
getOI() {
42 public static Intake
getIntake() {
43 return Intake
.getIntake();
46 // If the gear values do not match in the left and right piston, then they are
47 // both set to high gear
49 public void autonomousInit() {
50 driveTrain
.setHighGear();
51 Scheduler
.getInstance()
52 .add(new AutonGearThenBaselinePegCloseToBoiler("RETRIEVAL", 0));
56 public void autonomousPeriodic() {
57 Scheduler
.getInstance().run();
61 public void teleopInit() {
62 Scheduler
.getInstance().removeAll();
66 public void teleopPeriodic() {
67 Scheduler
.getInstance().run();