Skip to content

Commit 13eb816

Browse files
committed
Merge branch 'barge-speedup' into IRI-auton
2 parents 09d6362 + 7b77108 commit 13eb816

17 files changed

+456
-309
lines changed

src/main/deploy/choreo/bargeToI.traj

Lines changed: 314 additions & 237 deletions
Large diffs are not rendered by default.

src/main/java/frc/robot/commands/auton/DriveAlgaeAutonServoCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void initialize() {
117117
robotStateSubsystem.clearCoral();
118118
}
119119

120-
visionSubsystem.setIsAuto(false);
120+
// visionSubsystem.setIsAuto(false);
121121
robotStateSubsystem.setAutoAlgaeLevel(algaeLevel);
122122

123123
isServoing = false;

src/main/java/frc/robot/commands/auton/MiddleBargeAutonCommand.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public MiddleBargeAutonCommand(
4444
List<Double> delays,
4545
List<String> bargePaths,
4646
List<RobotStateSubsystem.ScoringLevel> algaeLevels,
47-
Pose2d startPose) {
47+
Pose2d startPose,
48+
double startDelay) {
4849
addRequirements(
4950
driveSubsystem, algaeSubsystem, biscuitSubsystem, coralSubsystem, elevatorSubsystem);
5051
this.driveSubsystem = driveSubsystem;
@@ -57,7 +58,8 @@ public MiddleBargeAutonCommand(
5758

5859
addCommands(
5960
new PrepOdomForAutoCommand(
60-
robotStateSubsystem, driveSubsystem, Rotation2d.fromDegrees(180.0), startPose));
61+
robotStateSubsystem, driveSubsystem, Rotation2d.fromDegrees(180.0), startPose),
62+
new WaitCommand(startDelay));
6163

6264
for (int i = 0; i < grabPaths.size(); i++) {
6365
boolean last = i == grabPaths.size() - 1;

src/main/java/frc/robot/commands/robotState/ForceBargeCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public boolean isFinished() {
5858
return robotStateSubsystem.getState() == RobotStates.PROCESSOR_ALGAE
5959
|| (robotStateSubsystem.getState() == RobotStates.BARGE_ALGAE
6060
&& !robotStateSubsystem.getIsAutoPlacing())
61-
|| !robotStateSubsystem.getIsBargeSafe();
61+
/*|| !robotStateSubsystem.getIsBargeSafe() */ ;
6262
}
6363
}
6464
}

src/main/java/frc/robot/constants/AlgaeConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class AlgaeConstants {
3030
public static final double kCoralHoldSpeed = -0.05;
3131
public static final double kBargeScoreSpeed = -1;
3232
public static final double kProcessorScoreSpeed = -1;
33-
public static final double kCoralScoreSpeed = 0.4; // 0.5;
33+
public static final double kCoralScoreSpeed = 0.3; // 0.5; was 0.4
3434
public static final double kIntakingSpeed = 1; // 0.75
3535
public static final double kCoralIntakingSpeed = -0.3; // -0.75;
3636

src/main/java/frc/robot/constants/AutonConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class AutonConstants {
2929
new Pose2d(7.1, 7.257, Rotation2d.fromDegrees(180));
3030

3131
public static final Pose2d kMiddleBargeStart =
32-
new Pose2d(7.1, 7.257, Rotation2d.fromDegrees(180));
32+
new Pose2d(7.1, 3.7209, Rotation2d.fromDegrees(180));
3333

3434
public static final Pose2d kDeepBarge = new Pose2d(7.7, 7.092, Rotation2d.fromDegrees(90));
3535
}

src/main/java/frc/robot/constants/BargeAlignConstants.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44

55
public class BargeAlignConstants {
66
public static final double kXSpeed = 0.45;
7+
public static final double kXRevSpeed = 2;
78

89
public static final double kBlueEjectAlgaeX = 7.67; // 7.72
910
public static final double kRedEjectAlgaeX = 9.86; // 9.81
10-
public static final double kBlueRaiseElevatorX = 7.02; // 7.22
11-
public static final double kRedRaiseElevatorX = 10.51; // 10.31
11+
public static final double kBlueRaiseElevatorX = 6.82; // 7.02
12+
public static final double kRedRaiseElevatorX = 10.71; // 10.51
13+
14+
public static final double kBlueRevDoneX = kBlueRaiseElevatorX + 0.25;
15+
public static final double kRedRevDoneX = kRedRaiseElevatorX - 0.25;
16+
17+
public static final double kBlueUnsafeX = 7.02;
18+
public static final double kRedUnsafeX = 10.51;
1219

1320
public static final Rotation2d kBlueDesiredYaw = Rotation2d.fromDegrees(0.0);
1421
public static final Rotation2d kRedDesiredYaw = Rotation2d.fromDegrees(180.0);

src/main/java/frc/robot/constants/RobotConstants.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public static TalonFXSConfiguration getFXSConfig() {
349349

350350
public static class CompConstants {
351351
public static Angle kElevatorFunnelSetpoint = Rotations.of(0.3676757);
352-
public static Angle kElevatorL1LoadSetpoint = Rotations.of(0.278); // 0.63
352+
public static Angle kElevatorL1LoadSetpoint = Rotations.of(0.278 + 0.352); // 0.278
353353
public static Angle kElevatorStowSetpoint = kElevatorFunnelSetpoint;
354354

355355
// Biscuit
@@ -366,7 +366,7 @@ public static class CompConstants {
366366
// Idle
367367
public static Angle kBiscuitStowSetpoint = Rotations.of(1.862 / 2);
368368
public static Angle kFunnelSetpoint = kBiscuitStowSetpoint;
369-
public static Angle kL1CoralLoadSetpoint = Rotations.of(6.29); // 0.05 is about an inch
369+
public static Angle kL1CoralLoadSetpoint = Rotations.of(6.29 + 0.25); // was 6.29
370370
public static Angle kPrestageSetpoint = Rotations.of(-2.94);
371371
public static Angle kPrestageAlgaeSetpoint = kBiscuitStowSetpoint;
372372

@@ -437,12 +437,12 @@ public static TalonFXSConfiguration getFXSConfig() {
437437

438438
CurrentLimitsConfigs current =
439439
new CurrentLimitsConfigs()
440-
.withStatorCurrentLimit(100)
440+
.withStatorCurrentLimit(60)
441441
.withStatorCurrentLimitEnable(true)
442442
.withSupplyCurrentLimit(20)
443443
.withSupplyCurrentLowerLimit(5)
444444
.withSupplyCurrentLowerTime(2)
445-
.withSupplyCurrentLimitEnable(true);
445+
.withSupplyCurrentLimitEnable(false);
446446
fxsConfig.CurrentLimits = current;
447447

448448
HardwareLimitSwitchConfigs hwLimit =

src/main/java/frc/robot/constants/RobotStateConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class RobotStateConstants {
88
public static final double[] kNodeAngles = {0.0, 60.0, 120.0, 180.0, -120.0, -60.0};
99
public static final double kAlgaeRetreatDistance = 0;
1010

11-
public static final double kBlueBargeSafeX = 7; // 7.6
11+
public static final double kBlueBargeSafeX = 7.02; // 7.6
1212
public static final double kRedBargeSafeX = DriveConstants.kFieldMaxX - kBlueBargeSafeX;
1313

1414
public static final double kCoralEjectTimer = 0.25;

src/main/java/frc/robot/subsystems/auto/AutoSwitch.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ private AutoCommandInterface getAutoCommand(int switchPos) {
283283
PathHandlerConstants.kLoadLightDistance,
284284
PathHandlerConstants.kLoadLightDistance,
285285
PathHandlerConstants.kLoadLightDistance)),
286-
new ArrayList<>(Arrays.asList(-0.0175, 0.0, 0.0)),
286+
new ArrayList<>(Arrays.asList(-0.0075, -0.0075, -0.0075)),
287287
'j',
288288
false,
289289
AutonConstants.kNonProcessorMid);
@@ -367,10 +367,11 @@ private AutoCommandInterface getAutoCommand(int switchPos) {
367367
visionSubsystem,
368368
new ArrayList<String>(Arrays.asList("startBargeToG", "bargeToI", "bargeToE")),
369369
new ArrayList<Double>(Arrays.asList(0.0, 0.0, 0.0)),
370-
new ArrayList<Double>(Arrays.asList(0.5, 0.0, 0.0)),
370+
new ArrayList<Double>(Arrays.asList(0.0, 0.0, 0.0)),
371371
new ArrayList<String>(Arrays.asList("GToBarge", "IToBarge", "EToNearBarge")),
372372
new ArrayList<>(Arrays.asList(ScoringLevel.L2, ScoringLevel.L3, ScoringLevel.L3)),
373-
AutonConstants.kMiddleBargeStart);
373+
AutonConstants.kMiddleBargeStart,
374+
0.5);
374375
}
375376

376377
case 0x11 -> {
@@ -384,11 +385,12 @@ private AutoCommandInterface getAutoCommand(int switchPos) {
384385
tagAlignSubsystem,
385386
visionSubsystem,
386387
new ArrayList<String>(Arrays.asList("startBargeToG", "bargeToE", "bargeToI")),
387-
new ArrayList<Double>(Arrays.asList(0.0, 0.0, 0.0)),
388+
new ArrayList<Double>(Arrays.asList(-0.00475, 0.0, 0.0)),
388389
new ArrayList<Double>(Arrays.asList(0.0, 0.0, 0.0)),
389390
new ArrayList<String>(Arrays.asList("GToBarge", "EToBarge", "IToNearBarge")),
390391
new ArrayList<>(Arrays.asList(ScoringLevel.L2, ScoringLevel.L3, ScoringLevel.L3)),
391-
AutonConstants.kMiddleBargeStart);
392+
AutonConstants.kMiddleBargeStart,
393+
0.0);
392394
}
393395

394396
case 0x12 -> {
@@ -406,7 +408,8 @@ private AutoCommandInterface getAutoCommand(int switchPos) {
406408
new ArrayList<Double>(Arrays.asList(0.0, 0.0, 0.0)),
407409
new ArrayList<String>(Arrays.asList("GToBarge", "IToBarge", "bargeAway")),
408410
new ArrayList<>(Arrays.asList(ScoringLevel.L2, ScoringLevel.L3, ScoringLevel.L2)),
409-
AutonConstants.kMiddleBargeStart);
411+
AutonConstants.kMiddleBargeStart,
412+
2.0);
410413
}
411414

412415
case 0x13 -> {
@@ -424,7 +427,8 @@ private AutoCommandInterface getAutoCommand(int switchPos) {
424427
new ArrayList<Double>(Arrays.asList(0.0, 0.0, 0.0)),
425428
new ArrayList<String>(Arrays.asList("GToBarge", "EToBarge", "bargeAway")),
426429
new ArrayList<>(Arrays.asList(ScoringLevel.L2, ScoringLevel.L3, ScoringLevel.L2)),
427-
AutonConstants.kMiddleBargeStart);
430+
AutonConstants.kMiddleBargeStart,
431+
2.0);
428432
}
429433

430434
case 0x14 -> {
@@ -565,7 +569,7 @@ private AutoCommandInterface getAutoCommand(int switchPos) {
565569
PathHandlerConstants.kLoadLightDistance,
566570
PathHandlerConstants.kLoadLightDistance,
567571
PathHandlerConstants.kLoadLightDistance)),
568-
new ArrayList<>(Arrays.asList(0.0, 0.0, 0.0)),
572+
new ArrayList<>(Arrays.asList(-0.0075, -0.0075, -0.0075)),
569573
'e',
570574
true,
571575
AutonConstants.kProcessorMid);

0 commit comments

Comments
 (0)