Skip to content

Commit 67ddbc0

Browse files
committed
add new steal auto, adjust pole offsets
1 parent b99c2ab commit 67ddbc0

File tree

2 files changed

+33
-14
lines changed

2 files changed

+33
-14
lines changed

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

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ public class TagServoingConstants {
4343

4444
// Offsets (left is negative, right is pos)
4545
public static final double[][][] kBlueCoralOffset = {
46-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
47-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
48-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
49-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
50-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
51-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}}
46+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
47+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
48+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
49+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
50+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
51+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}}
5252
}; // Alliance relative hexant, level, left/right
5353
public static final double[][][] kRedCoralOffset = {
54-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
55-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
56-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
57-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
58-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}},
59-
{{0, 0}, {0, 0}, {0, 0}, {0, 0}}
54+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
55+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
56+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
57+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
58+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}},
59+
{{-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}, {-0.00635, -0.00635}}
6060
}; // Alliance relative hexant, level, left/right
6161

6262
// Tag align
@@ -101,6 +101,8 @@ public class TagServoingConstants {
101101
public static final double kCoralStuckAllowence = 0.03;
102102

103103
// Reef
104-
public static final Translation2d kBlueReefPose = new Translation2d(4.489323, 4.0259);
105-
public static final Translation2d kRedReefPose = new Translation2d(13.058902, 4.0259);
104+
public static final Translation2d kBlueReefPose =
105+
new Translation2d(4.489323, 4.02082); // welded: 4.489323, 4.0259
106+
public static final Translation2d kRedReefPose =
107+
new Translation2d(13.058902, 4.02082); // welded: 13.058902, 4.0259
106108
}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,23 @@ private AutoCommandInterface getAutoCommand(int switchPos) {
501501
ScoringLevel.L2,
502502
new Pose2d(7.1008875, 4.0509, Rotation2d.fromDegrees(180.0)));
503503
}
504+
case 0x18 -> {
505+
return new StealOneAlgeaAutonCommand(
506+
driveSubsystem,
507+
robotStateSubsystem,
508+
algaeSubsystem,
509+
biscuitSubsystem,
510+
coralSubsystem,
511+
elevatorSubsystem,
512+
tagAlignSubsystem,
513+
visionSubsystem,
514+
"startBargeToG",
515+
"GToBarge",
516+
"bargeToOppG",
517+
"OppGToOppbarge",
518+
ScoringLevel.L2,
519+
new Pose2d(7.1, 3.7209, Rotation2d.fromRadians(3.14159)));
520+
}
504521

505522
case 0x20 -> {
506523
return new ProcessorShallowSlowAutonCommand(

0 commit comments

Comments
 (0)