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": [
|
"waypoints": [
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 3.48951566951567,
|
"x": 3.605428571428572,
|
||||||
"y": 5.107378917378918
|
"y": 5.107378917378918
|
||||||
},
|
},
|
||||||
"prevControl": null,
|
"prevControl": null,
|
||||||
"nextControl": {
|
"nextControl": {
|
||||||
"x": 2.908105413105413,
|
"x": 2.6073542083177803,
|
||||||
"y": 6.205598290598291
|
|
||||||
},
|
|
||||||
"isLocked": false,
|
|
||||||
"linkedName": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"anchor": {
|
|
||||||
"x": 1.616082621082621,
|
|
||||||
"y": 5.107378917378918
|
"y": 5.107378917378918
|
||||||
},
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 2.2557261904761914,
|
||||||
|
"y": 4.801630952380952
|
||||||
|
},
|
||||||
"prevControl": {
|
"prevControl": {
|
||||||
"x": 0.44392059766331804,
|
"x": 2.5688571428571443,
|
||||||
"y": 6.342550994319343
|
"y": 5.4170952380952375
|
||||||
},
|
},
|
||||||
"nextControl": {
|
"nextControl": {
|
||||||
"x": 2.234130952380953,
|
"x": 1.848588583599833,
|
||||||
"y": 4.456107142857142
|
"y": 4.00139496645156
|
||||||
},
|
},
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"linkedName": null
|
"linkedName": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 2.8064047619047625,
|
"x": 2.2557261904761914,
|
||||||
"y": 3.8622380952380952
|
"y": 4.035
|
||||||
},
|
},
|
||||||
"prevControl": {
|
"prevControl": {
|
||||||
"x": 2.8172023809523816,
|
"x": 2.2665238095238105,
|
||||||
"y": 4.132178571428572
|
"y": 4.304940476190477
|
||||||
},
|
},
|
||||||
"nextControl": null,
|
"nextControl": null,
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
@@ -46,18 +46,7 @@
|
|||||||
],
|
],
|
||||||
"rotationTargets": [],
|
"rotationTargets": [],
|
||||||
"constraintZones": [],
|
"constraintZones": [],
|
||||||
"pointTowardsZones": [
|
"pointTowardsZones": [],
|
||||||
{
|
|
||||||
"fieldPosition": {
|
|
||||||
"x": 4.612,
|
|
||||||
"y": 4.0213534
|
|
||||||
},
|
|
||||||
"rotationOffset": 0.0,
|
|
||||||
"minWaypointRelativePos": 0.9140287769784197,
|
|
||||||
"maxWaypointRelativePos": 2,
|
|
||||||
"name": "Point Towards Zone"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"eventMarkers": [],
|
"eventMarkers": [],
|
||||||
"globalConstraints": {
|
"globalConstraints": {
|
||||||
"maxVelocity": 0.5,
|
"maxVelocity": 0.5,
|
||||||
@@ -69,7 +58,7 @@
|
|||||||
},
|
},
|
||||||
"goalEndState": {
|
"goalEndState": {
|
||||||
"velocity": 0,
|
"velocity": 0,
|
||||||
"rotation": -1.591140271194531
|
"rotation": 180.0
|
||||||
},
|
},
|
||||||
"reversed": false,
|
"reversed": false,
|
||||||
"folder": null,
|
"folder": null,
|
||||||
|
|||||||
@@ -3,25 +3,25 @@
|
|||||||
"waypoints": [
|
"waypoints": [
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 2.0,
|
"x": 3.62702380952381,
|
||||||
"y": 7.0
|
"y": 6.0
|
||||||
},
|
},
|
||||||
"prevControl": null,
|
"prevControl": null,
|
||||||
"nextControl": {
|
"nextControl": {
|
||||||
"x": 3.0,
|
"x": 4.627023809523808,
|
||||||
"y": 7.0
|
"y": 6.0
|
||||||
},
|
},
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"linkedName": null
|
"linkedName": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 2.9612559241706156,
|
"x": 2.180142857142858,
|
||||||
"y": 7.0
|
"y": 6.0
|
||||||
},
|
},
|
||||||
"prevControl": {
|
"prevControl": {
|
||||||
"x": 1.9612559241706156,
|
"x": 1.180142857142858,
|
||||||
"y": 7.0
|
"y": 6.0
|
||||||
},
|
},
|
||||||
"nextControl": null,
|
"nextControl": null,
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"pointTowardsZones": [],
|
"pointTowardsZones": [],
|
||||||
"eventMarkers": [],
|
"eventMarkers": [],
|
||||||
"globalConstraints": {
|
"globalConstraints": {
|
||||||
"maxVelocity": 0.2,
|
"maxVelocity": 1.0,
|
||||||
"maxAcceleration": 3.0,
|
"maxAcceleration": 3.0,
|
||||||
"maxAngularVelocity": 540.0,
|
"maxAngularVelocity": 540.0,
|
||||||
"maxAngularAcceleration": 720.0,
|
"maxAngularAcceleration": 720.0,
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
},
|
},
|
||||||
"goalEndState": {
|
"goalEndState": {
|
||||||
"velocity": 0,
|
"velocity": 0,
|
||||||
"rotation": 0.0
|
"rotation": 178.89829388479367
|
||||||
},
|
},
|
||||||
"reversed": false,
|
"reversed": false,
|
||||||
"folder": null,
|
"folder": null,
|
||||||
"idealStartingState": {
|
"idealStartingState": {
|
||||||
"velocity": 0,
|
"velocity": 0,
|
||||||
"rotation": 0.0
|
"rotation": 179.95980050207663
|
||||||
},
|
},
|
||||||
"useDefaultConstraints": false
|
"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(
|
private Command RobotShoot = new SequentialCommandGroup(
|
||||||
new InstantCommand(() -> m_robotShooter.setShooterReady()),
|
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 InstantCommand(()->m_robotIntake.setMode(IntakeMode.Idle)),
|
||||||
new WaitCommand(5),
|
new WaitCommand(5),
|
||||||
new InstantCommand(()->m_robotShooter.setShooterShoot()),
|
new InstantCommand(()->m_robotShooter.setShooterShoot()),
|
||||||
@@ -265,7 +273,6 @@ public class RobotContainer {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||||
.onTrue(new InstantCommand(() -> {
|
.onTrue(new InstantCommand(() -> {
|
||||||
m_robotShooter.setShooterShoot();
|
m_robotShooter.setShooterShoot();
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
|||||||
public static final String MAVEN_GROUP = "";
|
public static final String MAVEN_GROUP = "";
|
||||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||||
public static final String VERSION = "unspecified";
|
public static final String VERSION = "unspecified";
|
||||||
public static final int GIT_REVISION = 75;
|
public static final int GIT_REVISION = 79;
|
||||||
public static final String GIT_SHA = "4907e0c8a0fc7dade91b2075d70a2b38213f9cab";
|
public static final String GIT_SHA = "ff0cff819cc7280a353d7ce86999efe16661f33b";
|
||||||
public static final String GIT_DATE = "2026-02-21 15:08:32 MST";
|
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 GIT_BRANCH = "operator-controls";
|
||||||
public static final String BUILD_DATE = "2026-02-21 15:52:02 MST";
|
public static final String BUILD_DATE = "2026-02-23 17:28:16 MST";
|
||||||
public static final long BUILD_UNIX_TIME = 1771714322479L;
|
public static final long BUILD_UNIX_TIME = 1771892896573L;
|
||||||
public static final int DIRTY = 1;
|
public static final int DIRTY = 1;
|
||||||
|
|
||||||
private BuildConstants(){}
|
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 = 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 {
|
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 badShooterVelocity = Math.abs(shooterSpeed - shooterSpeedTarget) > ShooterConstants.SHOOTER_SPEED_TOLERANCE.get();
|
||||||
// boolean intakeBad = m_Intake.getMode() == IntxakeMode.Extended;
|
// 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) {
|
switch (bitmask) {
|
||||||
case 0b000: // No Errors
|
case 0b000: // No Errors
|
||||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY);
|
m_robotLED.setMode(Constants.LEDConstants.OPREADY);
|
||||||
@@ -147,19 +150,30 @@ public class Shooter extends SubsystemBase {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0b100:
|
case 0b100:
|
||||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED);
|
|
||||||
break;
|
|
||||||
case 0b101:
|
case 0b101:
|
||||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED_BADPHYS);
|
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// // We set the shooter mode to ready if there are no errors
|
// // We set the shooter mode to ready if there are no errors
|
||||||
mode = (
|
|
||||||
bitmask == 0 ?
|
if (!feedMdoe) {
|
||||||
ShooterMode.Shooting :
|
mode = (
|
||||||
ShooterMode.Ready
|
bitmask == 0 ?
|
||||||
);
|
ShooterMode.Shooting :
|
||||||
|
ShooterMode.Ready
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(bitmask == 0b100 |
|
||||||
|
bitmask == 0b101) {
|
||||||
|
mode = ShooterMode.ShootingFeeder;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
mode = ShooterMode.ReadyFeeder;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
m_robotLED.setMode(Constants.LEDConstants.DEFAULT_PATTERN);
|
m_robotLED.setMode(Constants.LEDConstants.DEFAULT_PATTERN);
|
||||||
@@ -196,7 +210,7 @@ public class Shooter extends SubsystemBase {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ReadyFeeder:
|
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());
|
io.setIndexerOutput(state, ShooterConstants.INDEXER_REVERSE_OUTPUT.get());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user