diff --git a/src/main/deploy/pathplanner/autos/8 Balls Middle Start Blue.auto b/src/main/deploy/pathplanner/autos/8 Balls Middle Start Blue.auto index f434864..9e033bf 100644 --- a/src/main/deploy/pathplanner/autos/8 Balls Middle Start Blue.auto +++ b/src/main/deploy/pathplanner/autos/8 Balls Middle Start Blue.auto @@ -10,6 +10,12 @@ "pathName": "Back To Shoot Blue" } }, + { + "type": "named", + "data": { + "name": "shoot" + } + }, { "type": "named", "data": { diff --git a/src/main/deploy/pathplanner/autos/Copy of Shoot and Depot Blue.auto b/src/main/deploy/pathplanner/autos/Copy of Shoot and Depot Blue.auto new file mode 100644 index 0000000..378069d --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Copy of Shoot and Depot Blue.auto @@ -0,0 +1,152 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Back To Shoot Red" + } + }, + { + "type": "named", + "data": { + "name": "intaker_down" + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "shoot" + } + }, + { + "type": "named", + "data": { + "name": "intaker_down" + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "start_intake_and_conveyor" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Shoot to Depot Red" + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Depot Intake Red" + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "AutoAim" + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "stop_intake_and_conveyor" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "AutoShoot" + } + }, + { + "type": "named", + "data": { + "name": "Shake" + } + }, + { + "type": "named", + "data": { + "name": "intaker_up" + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "AutoShoot" + } + }, + { + "type": "named", + "data": { + "name": "Shake" + } + }, + { + "type": "named", + "data": { + "name": "intaker_up" + } + } + ] + } + } + ] + } + }, + "resetOdom": true, + "folder": "Red Middle", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Shoot and Depot Blue.auto b/src/main/deploy/pathplanner/autos/Shoot and Depot Blue.auto index ca97962..8a69dcd 100644 --- a/src/main/deploy/pathplanner/autos/Shoot and Depot Blue.auto +++ b/src/main/deploy/pathplanner/autos/Shoot and Depot Blue.auto @@ -19,12 +19,6 @@ "data": { "name": "intaker_down" } - }, - { - "type": "named", - "data": { - "name": "climber_init" - } } ] } @@ -129,21 +123,21 @@ "data": { "commands": [ { - "type": "path", + "type": "named", "data": { - "pathName": "blue depot go 1" + "name": "AutoShoot" } }, { "type": "named", "data": { - "name": "start_intake" + "name": "Shake" } }, { "type": "named", "data": { - "name": "reset_backboard0" + "name": "intaker_up" } } ] diff --git a/src/main/deploy/pathplanner/autos/Shoot and Depot Red.auto b/src/main/deploy/pathplanner/autos/Shoot and Depot Red.auto index 12c4570..a176855 100644 --- a/src/main/deploy/pathplanner/autos/Shoot and Depot Red.auto +++ b/src/main/deploy/pathplanner/autos/Shoot and Depot Red.auto @@ -107,6 +107,12 @@ "data": { "name": "Shake" } + }, + { + "type": "named", + "data": { + "name": "intaker_up" + } } ] } @@ -126,6 +132,12 @@ "data": { "name": "Shake" } + }, + { + "type": "named", + "data": { + "name": "intaker_up" + } } ] } diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index d7b6c33..a2b81e4 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -30,7 +30,7 @@ public class Robot extends TimedRobot { public void disabledInit() { System.out.println("Robot disabledInit called"); m_robotContainer.shooterSubsystem.stopAll(); - m_robotContainer.climberSubsystem.stopAll(); + // m_robotContainer.climberSubsystem.stopAll(); m_robotContainer.IntakerSubsystem.stopAll(); } diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 7467f63..d095d8f 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -46,7 +46,7 @@ public class RobotContainer { // Phoenix TunerX 生成的底盘 public final CommandSwerveDrivetrain drivetrain = TunerConstants.createDrivetrain(); - public final ClimberSubsystem climberSubsystem = new ClimberSubsystem(); + //public final ClimberSubsystem climberSubsystem = new ClimberSubsystem(); public final ShooterSubsystem shooterSubsystem = new ShooterSubsystem(); public final IntakerSubsystem IntakerSubsystem = new IntakerSubsystem(); @@ -60,7 +60,7 @@ public class RobotContainer { public final DriveControls driveControls = new DriveControls(drivetrain, controllerlower, robotStatusManager ); private final ShooterControls shooterControls = new ShooterControls(shooterSubsystem, controllerupper,robotStatusManager); - private final ClimberControls climberControls = new ClimberControls(climberSubsystem, controllerupper); + //private final ClimberControls climberControls = new ClimberControls(climberSubsystem, controllerupper); private final IntakerControls intakerControls = new IntakerControls(IntakerSubsystem, shooterSubsystem, controllerupper); private final DriveGainsTuner driveGainsTuner = new DriveGainsTuner(drivetrain); private ConfigTalonFXMotorTuner configFlywheelTuner = new ConfigTalonFXMotorTuner(shooterSubsystem.flywheelMotorLeft, "flywheel", Constants.Shooter.flyWheelSlot0Configs); @@ -79,11 +79,19 @@ public class RobotContainer { drivetrain.resetPose(startingPose); configueSwerve(); configueShooter(); - configueClimber(); + // configueClimber(); bingdingLED(); configueIntaker(); + // Autocommand.preNameCommands( + // climberSubsystem, + // IntakerSubsystem, + // drivetrain, + // shooterSubsystem, + // driveControls, + // shooterControls + // ); + Autocommand.preNameCommands( - climberSubsystem, IntakerSubsystem, drivetrain, shooterSubsystem, @@ -197,17 +205,17 @@ public class RobotContainer { shooterSubsystem.setRightFollowLeft(); } - private void configueClimber() { - climberSubsystem.setDefaultCommand(climberControls.defaultClimberCommand()); - } + // private void configueClimber() { + // climberSubsystem.setDefaultCommand(climberControls.defaultClimberCommand()); + // } private void configueIntaker() { IntakerSubsystem.setDefaultCommand(intakerControls.defaultIntakerCommand()); - controllerupper.a().onTrue(intakerControls.resetIntakerRotaterEncoderCommand(IntakerSubsystem)); + //controllerupper.a().onTrue(intakerControls.resetIntakerRotaterEncoderCommand(IntakerSubsystem)); } - public ClimberSubsystem getClimberSubsystem() { - return climberSubsystem; - } + // public ClimberSubsystem getClimberSubsystem() { + // return climberSubsystem; + // } } diff --git a/src/main/java/frc/robot/controls/Autocommand.java b/src/main/java/frc/robot/controls/Autocommand.java index 48c795b..99c0708 100644 --- a/src/main/java/frc/robot/controls/Autocommand.java +++ b/src/main/java/frc/robot/controls/Autocommand.java @@ -23,15 +23,15 @@ import frc.robot.Constants.RobotStatus; public class Autocommand extends SequentialCommandGroup{ public static void preNameCommands( - ClimberSubsystem climber, + // ClimberSubsystem climber, IntakerSubsystem intaker, CommandSwerveDrivetrain drivetrain, ShooterSubsystem shooter, DriveControls driveControls, ShooterControls shooterControls ) { - NamedCommands.registerCommand("climb_up", climb_up(climber)); - NamedCommands.registerCommand("climb_down", climb_down(climber)); + // NamedCommands.registerCommand("climb_up", climb_up(climber)); + // NamedCommands.registerCommand("climb_down", climb_down(climber)); NamedCommands.registerCommand("start_intake", start_intake(intaker)); NamedCommands.registerCommand("start_intake_and_conveyor", start_intake_and_conveyor(intaker,shooter)); NamedCommands.registerCommand("stop_intake_and_conveyor", stop_intake_and_conveyor(intaker,shooter)); @@ -44,7 +44,7 @@ import frc.robot.Constants.RobotStatus; NamedCommands.registerCommand("Shake", shake(driveControls)); NamedCommands.registerCommand("AutoAim", autoAim(driveControls)); NamedCommands.registerCommand("AutoShoot", autoShoot(shooterControls)); - NamedCommands.registerCommand("climber_init", climber_Zeroencoder(climber)); + // NamedCommands.registerCommand("climber_init", climber_Zeroencoder(climber)); NamedCommands.registerCommand("reset_backboard0", resetBackboard0Command(shooterControls)); }