This commit is contained in:
TheRealGreydon 2026-10-16 20:08:30 -04:00
parent 096e10e58b
commit 763e6dea45
14 changed files with 34 additions and 258 deletions

View File

@ -1,88 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "1.1 Hub to Shoot"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "ChassisAlignShoot"
}
},
{
"type": "wait",
"data": {
"waitTime": 10.0
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "1.2 Shoot to Depot Path"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "RunIntake"
}
},
{
"type": "wait",
"data": {
"waitTime": 10.0
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "1.3 Depot to Shoot Path"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "ChassisAlignShoot"
}
},
{
"type": "wait",
"data": {
"waitTime": 10.0
}
}
]
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -1,25 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "S. Hub. shoot 8. E-Hub"
}
},
{
"type": "path",
"data": {
"pathName": "M. Depot. "
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -1,25 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "S. L-Tre. Preload."
}
},
{
"type": "path",
"data": {
"pathName": "M. Depot. "
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -1,25 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "S. R-Trench. E-Hub"
}
},
{
"type": "path",
"data": {
"pathName": "M. Depot. "
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -7,7 +7,7 @@
{
"type": "path",
"data": {
"pathName": "S. Hub. shoot 8. E-Hub"
"pathName": "POFC Path"
}
},
{
@ -23,11 +23,23 @@
{
"type": "named",
"data": {
"name": "TurretShoot"
"name": "Ultrashooter"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Spin Off"
}
},
{
"type": "named",
"data": {
"name": "Deploy"
}
}
]
}

View File

@ -1,19 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Relay. L-Tr."
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -1,19 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Relay. R-Tr."
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -1,19 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "S. L-Tre. Preload."
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -1,19 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "S. R-Trench. E-Hub"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -3,25 +3,25 @@
"waypoints": [
{
"anchor": {
"x": 1.347817403708987,
"y": 6.0
"x": 3.524455555555555,
"y": 4.064233333333333
},
"prevControl": null,
"nextControl": {
"x": -0.16600570613409404,
"y": 5.982268188302426
"x": 2.13655348749465,
"y": 4.298750985192517
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": -0.9164479315263911,
"y": 6.0
"x": 2.160233333338394,
"y": 4.064233333333333
},
"prevControl": {
"x": -1.916447931526393,
"y": 6.0
"x": 4.076363279649531,
"y": 3.9399616579759327
},
"nextControl": null,
"isLocked": false,
@ -42,7 +42,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 0.0
"rotation": 178.3516554952644
},
"reversed": false,
"folder": null,

View File

@ -4,6 +4,7 @@
package frc.robot;
import com.pathplanner.lib.auto.NamedCommands;
import com.pathplanner.lib.events.EventTrigger;
import edu.wpi.first.wpilibj.GenericHID.RumbleType;
import edu.wpi.first.wpilibj2.command.Command;
@ -36,7 +37,6 @@ public class RobotContainer {
private final CommandXboxController m_driverController
= new CommandXboxController(OperatorConstants.kDriverControllerPort);
// private final CommandPS4Controller m_driverController = new CommandPS4Controller(OperatorConstants.kDriverControllerPort);
public final DriveSubsystem driveSubsystem = new DriveSubsystem(m_driverController);
public final IntakeSubsystem intakeSubsystem = new IntakeSubsystem();
@ -50,13 +50,15 @@ public class RobotContainer {
* commands.
*/
public RobotContainer() {
// turretSubsystem.setDefaultCommand(new AutoTurretCommand(turretSubsystem, driveSubsystem));
turretSubsystem.homeTurret();
hopperSubsystem.spindexerOn();
// Configure the trigger bindings
configureBindings();
NamedCommands.registerCommand("Deploy", intakeSubsystem.deploy());
NamedCommands.registerCommand("Spin Off", hopperSubsystem.spinOff());
NamedCommands.registerCommand("Ultrashooter", new UltraShooterCommand(hopperSubsystem, turretSubsystem, driveSubsystem));
NamedCommands.registerCommand("ChassisAlignShoot", new AutoShootCommandChassisTurret(driveSubsystem, hopperSubsystem, turretSubsystem));
NamedCommands.registerCommand("RunIntake", intakeSubsystem.intake(m_driverController.getHID()));
NamedCommands.registerCommand("TurretShoot", new AutoTurretShootCommand(hopperSubsystem, turretSubsystem, intakeSubsystem, driveSubsystem));
@ -93,8 +95,7 @@ public class RobotContainer {
*/
public Command getAutonomousCommand() {
// An example command will be run in autonomous
return Commands.parallel(intakeSubsystem.deploy(), Commands.run(() -> {
turretSubsystem.homeTurret();
}, turretSubsystem), driveSubsystem.getAutoCommand());
return Commands.parallel(Commands.run(() ->
{turretSubsystem.homeTurret();}, turretSubsystem), driveSubsystem.getAutoCommand());
}
}

View File

@ -15,8 +15,8 @@ import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import frc.robot.Constants;
import frc.robot.Constants.ShootingRegion;
import frc.robot.Utils;
@ -47,6 +47,7 @@ public class UltraShooterCommand extends Command{
@Override
public void initialize() {
hopperSubsystem.spindexerOn();
hopperSubsystem.stopKicker(); // Make sure kicker is off when command is called
CommandScheduler.getInstance().schedule(waitCommand); // Kick off a wait timer so robot doesn't shoot until hopper is ready
alliance = DriverStation.getAlliance().get(); // Fetch our alliance
@ -213,5 +214,4 @@ public class UltraShooterCommand extends Command{
Logger.recordOutput("UltraShooter-State", "INACTIVE");
}
}

View File

@ -99,6 +99,8 @@ public class HopperSubsystem extends TestableSubsystem {
});
}
public Command spinOff() {return this.runOnce(() -> {spindexerOff();});}
@Override
public void periodic() {