Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit f99c280

Browse files
committed
Final changes at CRI (height tuning, auto, vision, algae clear)
1 parent 53772d7 commit f99c280

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/main/java/frc/robot/RobotContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private void configureBindings() {
232232
applyDeadband(-controller.getLeftY() * speedMultiplier),
233233
applyDeadband(-controller.getLeftX() * speedMultiplier),
234234
applyDeadband(-controller.getRightX() * speedMultiplier),
235-
fieldRelative,
235+
true,
236236
true),
237237
drivetrain));
238238

@@ -265,6 +265,6 @@ public void periodic() {
265265
// autonomous command
266266
public Command getAutonomousCommand() {
267267
return Commands.sequence(
268-
Commands.waitSeconds(2), coral.goToReef(drivetrain, () -> reefSection, () -> 3));
268+
Commands.waitSeconds(1), coral.goToReef(drivetrain, () -> reefSection, () -> 3));
269269
}
270270
}

src/main/java/frc/robot/config/CoralConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ public class CoralConfig {
88
public static final double MOVEMENT_I = 0.0;
99
public static final double MOVEMENT_D = 0.0;
1010

11-
public static final double POSITION_TOLERANCE = 0.5;
12-
public static final double VELOCITY_TOLERANCE = 1.0;
11+
public static final double POSITION_TOLERANCE = 0.15;
12+
public static final double VELOCITY_TOLERANCE = 0.15;
1313

1414
public static final double INTAKE_HEIGHT = 0.065;
1515
public static final Rotation2d INTAKE_ANGLE_UPPER = Rotation2d.fromRadians(1.65);

src/main/java/frc/robot/subsystems/Coral.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class Coral extends SubsystemBase {
2424
private CoralPivot coralPivot = new CoralPivot();
2525

2626
// heights for levels
27-
private double[] elevatorScoringHeights = {0.0, 0.900, 1.29, 1.360};
27+
private double[] elevatorScoringHeights = {0.0, 0.910, 1.31, 1.360};
2828

2929
// rotations for levels
3030
private Rotation2d[] coralScoringRotations = {
@@ -34,10 +34,10 @@ public class Coral extends SubsystemBase {
3434
Rotation2d.fromRadians(0.3)
3535
};
3636
private Rotation2d[] reefClearRotationsPrimary = {
37-
Rotation2d.fromRadians(1.5), Rotation2d.fromRadians(1.5)
37+
Rotation2d.fromRadians(1.9), Rotation2d.fromRadians(1.9)
3838
};
3939
private Rotation2d[] reefClearRotationsSecondary = {
40-
Rotation2d.fromRadians(0.95), Rotation2d.fromRadians(0.95)
40+
Rotation2d.fromRadians(1.5), Rotation2d.fromRadians(1.5)
4141
};
4242
private double[] reefClearHeights = {0.65, 1.0564};
4343

@@ -202,7 +202,11 @@ public Command goToReef(Drivetrain drivetrain, IntSupplier idx, IntSupplier heig
202202
.getRadians());
203203
},
204204
() -> CoralConfig.MOVEMENT_DISTANCE)
205-
.until(() -> movementController.atSetpoint())
205+
.until(
206+
() ->
207+
movementController.atSetpoint()
208+
&& drivetrain.rotController.atSetpoint()
209+
&& drivetrain.xController.atSetpoint())
206210
.andThen(
207211
Commands.waitSeconds(1.0)
208212
.andThen(

src/main/java/frc/robot/subsystems/Drivetrain.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ public void periodic() {
210210
// Puts the pose data from one camera into a list
211211
List<PhotonPipelineResult> results = Vision.camera.getAllUnreadResults();
212212

213-
// If there is pose data from the cameras, get the latest estimated pose and update the 'vision'
213+
// If there is pose data from the cameras, get the latest estimated pose and update the
214+
// 'vision'
214215
// photon pose estimator
215216
// If there is no multi tag result and the distance from the camera to the target is greater
216217
// than

0 commit comments

Comments
 (0)