mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
auto stuf
auto stuff
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"version": "2025.0",
|
||||
"command": {
|
||||
"type": "sequential",
|
||||
"data": {
|
||||
"commands": [
|
||||
{
|
||||
"type": "path",
|
||||
"data": {
|
||||
"pathName": "TurnNinety"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resetOdom": true,
|
||||
"folder": null,
|
||||
"choreoAuto": false
|
||||
}
|
||||
@@ -3,41 +3,41 @@
|
||||
"waypoints": [
|
||||
{
|
||||
"anchor": {
|
||||
"x": 3.48951566951567,
|
||||
"x": 3.605428571428572,
|
||||
"y": 5.107378917378918
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 2.908105413105413,
|
||||
"y": 6.205598290598291
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 1.616082621082621,
|
||||
"x": 2.6073542083177803,
|
||||
"y": 5.107378917378918
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 2.2557261904761914,
|
||||
"y": 4.801630952380952
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 0.44392059766331804,
|
||||
"y": 6.342550994319343
|
||||
"x": 2.5688571428571443,
|
||||
"y": 5.4170952380952375
|
||||
},
|
||||
"nextControl": {
|
||||
"x": 2.234130952380953,
|
||||
"y": 4.456107142857142
|
||||
"x": 1.848588583599833,
|
||||
"y": 4.00139496645156
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 2.8064047619047625,
|
||||
"y": 3.8622380952380952
|
||||
"x": 2.2557261904761914,
|
||||
"y": 4.035
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 2.8172023809523816,
|
||||
"y": 4.132178571428572
|
||||
"x": 2.2665238095238105,
|
||||
"y": 4.304940476190477
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
@@ -46,18 +46,7 @@
|
||||
],
|
||||
"rotationTargets": [],
|
||||
"constraintZones": [],
|
||||
"pointTowardsZones": [
|
||||
{
|
||||
"fieldPosition": {
|
||||
"x": 4.612,
|
||||
"y": 4.0213534
|
||||
},
|
||||
"rotationOffset": 0.0,
|
||||
"minWaypointRelativePos": 0.9140287769784197,
|
||||
"maxWaypointRelativePos": 2,
|
||||
"name": "Point Towards Zone"
|
||||
}
|
||||
],
|
||||
"pointTowardsZones": [],
|
||||
"eventMarkers": [],
|
||||
"globalConstraints": {
|
||||
"maxVelocity": 0.5,
|
||||
@@ -69,7 +58,7 @@
|
||||
},
|
||||
"goalEndState": {
|
||||
"velocity": 0,
|
||||
"rotation": -1.591140271194531
|
||||
"rotation": 180.0
|
||||
},
|
||||
"reversed": false,
|
||||
"folder": null,
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
"waypoints": [
|
||||
{
|
||||
"anchor": {
|
||||
"x": 2.0,
|
||||
"y": 7.0
|
||||
"x": 3.62702380952381,
|
||||
"y": 6.0
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 3.0,
|
||||
"y": 7.0
|
||||
"x": 4.627023809523808,
|
||||
"y": 6.0
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 2.9612559241706156,
|
||||
"y": 7.0
|
||||
"x": 2.180142857142858,
|
||||
"y": 6.0
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 1.9612559241706156,
|
||||
"y": 7.0
|
||||
"x": 1.180142857142858,
|
||||
"y": 6.0
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
@@ -33,7 +33,7 @@
|
||||
"pointTowardsZones": [],
|
||||
"eventMarkers": [],
|
||||
"globalConstraints": {
|
||||
"maxVelocity": 0.2,
|
||||
"maxVelocity": 1.0,
|
||||
"maxAcceleration": 3.0,
|
||||
"maxAngularVelocity": 540.0,
|
||||
"maxAngularAcceleration": 720.0,
|
||||
@@ -42,13 +42,13 @@
|
||||
},
|
||||
"goalEndState": {
|
||||
"velocity": 0,
|
||||
"rotation": 0.0
|
||||
"rotation": 178.89829388479367
|
||||
},
|
||||
"reversed": false,
|
||||
"folder": null,
|
||||
"idealStartingState": {
|
||||
"velocity": 0,
|
||||
"rotation": 0.0
|
||||
"rotation": 179.95980050207663
|
||||
},
|
||||
"useDefaultConstraints": false
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"version": "2025.0",
|
||||
"waypoints": [
|
||||
{
|
||||
"anchor": {
|
||||
"x": 3.0,
|
||||
"y": 4.0
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 4.0,
|
||||
"y": 4.0
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 3.0,
|
||||
"y": 4.0
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 2.0,
|
||||
"y": 4.0
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
}
|
||||
],
|
||||
"rotationTargets": [],
|
||||
"constraintZones": [],
|
||||
"pointTowardsZones": [],
|
||||
"eventMarkers": [],
|
||||
"globalConstraints": {
|
||||
"maxVelocity": 0.1,
|
||||
"maxAcceleration": 3.0,
|
||||
"maxAngularVelocity": 540.0,
|
||||
"maxAngularAcceleration": 720.0,
|
||||
"nominalVoltage": 12.0,
|
||||
"unlimited": false
|
||||
},
|
||||
"goalEndState": {
|
||||
"velocity": 0,
|
||||
"rotation": 90.0
|
||||
},
|
||||
"reversed": false,
|
||||
"folder": null,
|
||||
"idealStartingState": {
|
||||
"velocity": 0,
|
||||
"rotation": 0.0
|
||||
},
|
||||
"useDefaultConstraints": false
|
||||
}
|
||||
@@ -100,6 +100,14 @@ public class RobotContainer {
|
||||
|
||||
private Command RobotShoot = new SequentialCommandGroup(
|
||||
new InstantCommand(() -> m_robotShooter.setShooterReady()),
|
||||
new RunCommand(
|
||||
() -> {
|
||||
m_robotSwerveDrive.driveFacingPosition(
|
||||
getDeadbandedDriverController().getLeft(),
|
||||
FieldPositions.HUB_POSITION,
|
||||
ShooterConstants.AIM_LEAD_TIME.get()
|
||||
);
|
||||
}, m_robotSwerveDrive),
|
||||
new InstantCommand(()->m_robotIntake.setMode(IntakeMode.Idle)),
|
||||
new WaitCommand(5),
|
||||
new InstantCommand(()->m_robotShooter.setShooterShoot()),
|
||||
@@ -262,8 +270,7 @@ public class RobotContainer {
|
||||
m_robotShooter.setShooterReadyFeeder();
|
||||
}));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||
|
||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 75;
|
||||
public static final String GIT_SHA = "4907e0c8a0fc7dade91b2075d70a2b38213f9cab";
|
||||
public static final String GIT_DATE = "2026-02-21 15:08:32 MST";
|
||||
public static final int GIT_REVISION = 79;
|
||||
public static final String GIT_SHA = "ff0cff819cc7280a353d7ce86999efe16661f33b";
|
||||
public static final String GIT_DATE = "2026-02-23 16:58:14 MST";
|
||||
public static final String GIT_BRANCH = "operator-controls";
|
||||
public static final String BUILD_DATE = "2026-02-21 15:52:02 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771714322479L;
|
||||
public static final String BUILD_DATE = "2026-02-23 17:28:16 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771892896573L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -119,7 +119,7 @@ public final class Constants {
|
||||
|
||||
|
||||
public static final LEDPatterns OPREADY_FEED = LEDPatterns.SOLID_BLUE;
|
||||
public static final LEDPatterns OPREADY_FEED_BADPHYS = LEDPatterns.BLUE_STROBE;
|
||||
// public static final LEDPatterns OPREADY_FEED_BADPHYS = LEDPatterns.BLUE_STROBE;
|
||||
}
|
||||
|
||||
public static final class OIConstants {
|
||||
|
||||
@@ -126,8 +126,11 @@ public class Shooter extends SubsystemBase {
|
||||
boolean badShooterVelocity = Math.abs(shooterSpeed - shooterSpeedTarget) > ShooterConstants.SHOOTER_SPEED_TOLERANCE.get();
|
||||
// boolean intakeBad = m_Intake.getMode() == IntxakeMode.Extended;
|
||||
|
||||
boolean feedMdoe = this.mode == ShooterMode.ReadyFeeder |
|
||||
this.mode == ShooterMode.ShootingFeeder;
|
||||
|
||||
int bitmask = (driverError ? 1 : 0) + (badShooterVelocity ? 2 : 0) + (this.mode == ShooterMode.ReadyFeeder ? 4 : 0);
|
||||
int bitmask = (driverError ? 1 : 0) + (badShooterVelocity ? 2 : 0) + (
|
||||
(feedMdoe) ? 4 : 0);
|
||||
switch (bitmask) {
|
||||
case 0b000: // No Errors
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY);
|
||||
@@ -147,19 +150,30 @@ public class Shooter extends SubsystemBase {
|
||||
break;
|
||||
|
||||
case 0b100:
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED);
|
||||
break;
|
||||
case 0b101:
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED_BADPHYS);
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED);
|
||||
break;
|
||||
}
|
||||
|
||||
// // We set the shooter mode to ready if there are no errors
|
||||
mode = (
|
||||
bitmask == 0 ?
|
||||
ShooterMode.Shooting :
|
||||
ShooterMode.Ready
|
||||
);
|
||||
|
||||
if (!feedMdoe) {
|
||||
mode = (
|
||||
bitmask == 0 ?
|
||||
ShooterMode.Shooting :
|
||||
ShooterMode.Ready
|
||||
);
|
||||
} else {
|
||||
|
||||
if(bitmask == 0b100 |
|
||||
bitmask == 0b101) {
|
||||
mode = ShooterMode.ShootingFeeder;
|
||||
|
||||
} else {
|
||||
mode = ShooterMode.ReadyFeeder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
m_robotLED.setMode(Constants.LEDConstants.DEFAULT_PATTERN);
|
||||
@@ -196,7 +210,7 @@ public class Shooter extends SubsystemBase {
|
||||
break;
|
||||
|
||||
case ReadyFeeder:
|
||||
io.setShooterVelocity(state, ShooterConstants.getTargetShooterSpeed(distanceToHub));
|
||||
io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_FEED_VELOCITY.get()));
|
||||
io.setIndexerOutput(state, ShooterConstants.INDEXER_REVERSE_OUTPUT.get());
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user