]> git.taranathan.com Git - FRC2026.git/commitdiff
move hood up and down to code
authormoo <moogoesmeow123@gmail.com>
Fri, 1 May 2026 21:36:34 +0000 (16:36 -0500)
committermoo <moogoesmeow123@gmail.com>
Fri, 1 May 2026 21:36:34 +0000 (16:36 -0500)
src/main/deploy/choreo/liberal.traj
src/main/java/frc/robot/commands/auto_comm/ChoreoPathCommand.java

index c1e9830d6df73c230277d2d68c1b42d3b1be8fd9..7c07f15a8ba6eadf0e85bfc957bcffabfcc47127 100644 (file)
     {"t":7.79538, "x":3.00348, "y":7.57195, "heading":0.0, "vx":0.0, "vy":0.0, "omega":0.0, "ax":0.0, "ay":0.0, "alpha":0.0, "fx":[0.0,0.0,0.0,0.0], "fy":[0.0,0.0,0.0,0.0]}],
   "splits":[0,75]
  },
- "events":[
-   {"name":"hoodDown", "from":{"target":0, "targetTimestamp":0.0, "offset":{"exp":"0 s", "val":0.0}}, "event":{"type":"named", "data":{"name":"hoodDown"}}},
-   {"name":"hoodUp", "from":{"target":4, "targetTimestamp":3.70343, "offset":{"exp":"-0.2 s", "val":-0.2}}, "event":{"type":"named", "data":{"name":"hoodUp"}}},
-   {"name":"hoodUp", "from":{"target":9, "targetTimestamp":7.79538, "offset":{"exp":"-0.2 s", "val":-0.2}}, "event":{"type":"named", "data":{"name":"hoodUp"}}},
-   {"name":"hoodDown", "from":{"target":4, "targetTimestamp":3.70343, "offset":{"exp":"0.2 s", "val":0.2}}, "event":{"type":"named", "data":{"name":"hoodDown"}}}]
+ "events":[]
 }
index dab46ceb1255b940a778e282fa20380fa77e4dcb..44ca505780ec9c16ac9987e1ae4b2989e9560bb3 100644 (file)
@@ -1,20 +1,15 @@
 package frc.robot.commands.auto_comm;
 
-import org.littletonrobotics.junction.Logger;
-
 import choreo.auto.AutoFactory;
 import choreo.auto.AutoRoutine;
 import choreo.auto.AutoTrajectory;
 import edu.wpi.first.wpilibj2.command.Command;
 import edu.wpi.first.wpilibj2.command.Commands;
 import edu.wpi.first.wpilibj2.command.InstantCommand;
-import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
 import frc.robot.commands.DoNothing;
-import frc.robot.commands.gpm.IntakeCommand;
 import frc.robot.commands.gpm.IntakeMovementCommand;
 import frc.robot.commands.gpm.RunSpindexerWithStop;
 import frc.robot.subsystems.Intake.Intake;
-import frc.robot.subsystems.drivetrain.Drivetrain;
 import frc.robot.subsystems.hood.Hood;
 import frc.robot.subsystems.spindexer.Spindexer;
 import frc.robot.subsystems.turret.Turret;
@@ -53,17 +48,34 @@ public class ChoreoPathCommand {
             new InstantCommand(() -> {
               intake.extend();
               intake.spinStart();
+              hood.forceHoodDown(true);
             }),
             liberalSwipe.cmd()));
 
     liberalSwipe.done()
         .onTrue(Commands.sequence(
+            new InstantCommand(() -> {
+                hood.forceHoodDown(false);
+            }),
             new RunSpindexerWithStop(spindexer, turret, hood, intake).raceWith(new IntakeMovementCommand(intake)),
+            new InstantCommand(() -> {
+              intake.extend();
+              intake.spinStart();
+              hood.forceHoodDown(true);
+            }),
             shallowSwipe.cmd()));
 
     shallowSwipe.done()
         .onTrue(Commands.sequence(
+            new InstantCommand(() -> {
+                hood.forceHoodDown(false);
+            }),
             new RunSpindexerWithStop(spindexer, turret, hood, intake).raceWith(new IntakeMovementCommand(intake)),
+            new InstantCommand(() -> {
+              intake.extend();
+              intake.spinStart();
+              hood.forceHoodDown(true);
+            }),
             shallowSwipe.cmd()));
 
     return routine;