3737import wmironpatriots .subsystems .elevator .Elevator ;
3838import wmironpatriots .subsystems .elevator .ElevatorIOComp ;
3939import wmironpatriots .subsystems .elevator .ElevatorIOSim ;
40- import wmironpatriots .subsystems .swerve .Swerve ;
4140import wmironpatriots .subsystems .tail .Tail ;
4241import wmironpatriots .subsystems .tail .TailIOComp ;
4342import wmironpatriots .subsystems .tail .TailIOSim ;
44- import wmironpatriots .util .deviceUtil .InputStream ;
4543import wmironpatriots .util .deviceUtil .OperatorController ;
4644
4745public class Robot extends TimedRobot implements Logged {
@@ -50,13 +48,13 @@ public class Robot extends TimedRobot implements Logged {
5048 private final CommandXboxController driveController ;
5149 private final OperatorController operatorController ;
5250
53- private final Swerve swerve ;
51+ // private final Swerve swerve;
5452 private final Tail tail ;
5553 private final Elevator elevator ;
5654 private final Chute chute ;
5755
5856 private final RobotVisualizer visualizer ;
59- private final SendableChooser <Command > autonChooser ;
57+ // private final SendableChooser<Command> autonChooser;
6058
6159 public Robot () {
6260 // * MONOLOGUE SETUP
@@ -104,14 +102,14 @@ public Robot() {
104102 driveController = new CommandXboxController (0 );
105103 operatorController = new OperatorController (1 );
106104
107- Optional <SwerveDriveSimulation > swerveSim =
108- Robot .isSimulation ()
109- ? Optional .of (
110- new SwerveDriveSimulation (
111- SWERVE_SIM_CONFIG .get (), new Pose2d (3 , 3 , new Rotation2d ())))
112- : Optional .empty ();
105+ // Optional<SwerveDriveSimulation> swerveSim =
106+ // Robot.isSimulation()
107+ // ? Optional.of(
108+ // new SwerveDriveSimulation(
109+ // SWERVE_SIM_CONFIG.get(), new Pose2d(3, 3, new Rotation2d())))
110+ // : Optional.empty();
113111
114- swerve = new Swerve (swerveSim );
112+ // swerve = new Swerve(swerveSim);
115113 if (Robot .isReal ()) {
116114 tail = new TailIOComp ();
117115 elevator = new ElevatorIOComp ();
@@ -123,50 +121,50 @@ public Robot() {
123121 }
124122
125123 // Setup simulated arena if simulated
126- if (Robot .isSimulation ()) {
127- SimulatedArena .getInstance ().addDriveTrainSimulation (swerveSim .orElse (null ));
128- swerve .resetOdo (swerveSim .get ().getSimulatedDriveTrainPose ());
129- }
124+ // if (Robot.isSimulation()) {
125+ // SimulatedArena.getInstance().addDriveTrainSimulation(swerveSim.orElse(null));
126+ // swerve.resetOdo(swerveSim.get().getSimulatedDriveTrainPose());
127+ // }
130128
131129 // * DEFAULT COMMANDS
132130 // Set up driver input streams
133- double maxSpeed = swerve .MAX_LINEAR_SPEED_MPS ;
134- double maxAngularSpeed = swerve .MAX_ANGULAR_SPEED_RADS_PER_SEC ;
131+ // double maxSpeed = swerve.MAX_LINEAR_SPEED_MPS;
132+ // double maxAngularSpeed = swerve.MAX_ANGULAR_SPEED_RADS_PER_SEC;
135133
136- InputStream x = InputStream .of (driveController ::getLeftY );
137- InputStream y = InputStream .of (driveController ::getLeftX );
138- InputStream speed = InputStream .of (driveController ::getRightTriggerAxis ).deadband (0.1 , 1.0 );
134+ // InputStream x = InputStream.of(driveController::getLeftY);
135+ // InputStream y = InputStream.of(driveController::getLeftX);
136+ // InputStream speed = InputStream.of(driveController::getRightTriggerAxis).deadband(0.1, 1.0);
139137
140- InputStream hypot =
141- InputStream .hypot (y , x ).clamp (1 ).deadband (0.05 , 1.0 ).signedPow (2 ).scale (maxSpeed );
138+ // InputStream hypot =
139+ // InputStream.hypot(y, x).clamp(1).deadband(0.05, 1.0).signedPow(2).scale(maxSpeed);
142140
143- InputStream theta = InputStream .arcTan (y , x );
144- x = hypot .scale (hypot .scale (theta .map (Math ::cos )));
145- y = hypot .scale (hypot .scale (theta .map (Math ::sin )));
141+ // InputStream theta = InputStream.arcTan(y, x);
142+ // x = hypot.scale(hypot.scale(theta.map(Math::cos)));
143+ // y = hypot.scale(hypot.scale(theta.map(Math::sin)));
146144
147- InputStream omega =
148- InputStream .of (driveController ::getRightX )
149- .clamp (1.0 )
150- .deadband (0.05 , 1.0 )
151- .signedPow (2.0 )
152- .scale (maxAngularSpeed );
145+ // InputStream omega =
146+ // InputStream.of(driveController::getRightX)
147+ // .clamp(1.0)
148+ // .deadband(0.05, 1.0)
149+ // .signedPow(2.0)
150+ // .scale(maxAngularSpeed);
153151
154- swerve .setDefaultCommand (swerve .teleopSwerveCmmd (x , y , omega ));
152+ // swerve.setDefaultCommand(swerve.teleopSwerveCmmd(x, y, omega));
155153
156154 elevator .setDefaultCommand (
157155 Commands .sequence (
158156 elevator .runPoseZeroingCmmd ().onlyIf (() -> !elevator .isZeroed ()),
159157 elevator .setTargetPoseCmmd (Elevator .IDLE ).until (() -> elevator .inSetpointRange ()),
160158 elevator .stopMotorInputCmmd ()));
161159
162- tail .setDefaultCommand (
163- Commands .sequence (
164- tail .runPoseZeroingCmmd ()
165- .onlyIf (() -> !tail .isZeroed () && Superstructure .isTailSafe (elevator , tail )),
166- tail .setTargetPoseCmmd (Tail .POSE_OUT_RADS )
167- .until (() -> Superstructure .isTailSafe (elevator , tail )),
168- tail .setTargetPoseCmmd (Tail .POSE_IN_RADS ).until (() -> tail .inSetpointRange ()),
169- tail .stopMotorInputCmmd ()));
160+ // tail.setDefaultCommand(
161+ // Commands.sequence(
162+ // tail.runPoseZeroingCmmd()
163+ // .onlyIf(() -> !tail.isZeroed() && Superstructure.isTailSafe(elevator, tail)),
164+ // tail.setTargetPoseCmmd(Tail.POSE_OUT_RADS)
165+ // .until(() -> Superstructure.isTailSafe(elevator, tail)),
166+ // tail.setTargetPoseCmmd(Tail.POSE_MIN_REVS ).until(() -> tail.inSetpointRange()),
167+ // tail.stopMotorInputCmmd()));
170168
171169 // * SUPERSTRUCTURE INIT
172170 Map <Requests , Trigger > triggerMap = new HashMap <Superstructure .Requests , Trigger >();
@@ -175,11 +173,10 @@ public Robot() {
175173 visualizer = new RobotVisualizer (elevator , tail );
176174
177175 // * AUTON INIT
178- autonChooser = Autonomous .configureAutons (swerve );
179- SmartDashboard .putData ("Select Auton" , autonChooser );
176+ // autonChooser = Autonomous.configureAutons(swerve);
177+ // SmartDashboard.putData("Select Auton", autonChooser);
180178
181179 new Superstructure (
182- swerve ,
183180 elevator ,
184181 tail ,
185182 chute ,
@@ -198,14 +195,14 @@ public void robotPeriodic() {
198195
199196 @ Override
200197 public void autonomousInit () {
201- Command auton =
202- autonChooser
203- .getSelected ()
204- .withDeadline (Commands .waitUntil (() -> DriverStation .isEnabled ()));
205-
206- if (auton != null ) {
207- auton .schedule ();
208- }
198+ // Command auton =
199+ // autonChooser
200+ // .getSelected()
201+ // .withDeadline(Commands.waitUntil(() -> DriverStation.isEnabled()));
202+
203+ // if (auton != null) {
204+ // auton.schedule();
205+ // }
209206 }
210207
211208 @ Override
0 commit comments