Skip to content

Commit

Permalink
practice matches
Browse files Browse the repository at this point in the history
  • Loading branch information
eshen7 committed Oct 21, 2023
1 parent c1cf29a commit 93adb4a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
17 changes: 11 additions & 6 deletions src/main/java/team3647/frc2023/auto/AutoCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ private Command getSupeStructureSequenceConeTaxiBalance() {
superstructure.stowScore().withTimeout(1),
Commands.waitSeconds(2),
superstructure.goToStateParallel(SuperstructureState.untipReverse).withTimeout(2),
Commands.waitSeconds(0.5),
superstructure.stowScore());
Commands.waitSeconds(1),
superstructure.goToStateParallel(SuperstructureState.backStow));
}

private Command getSupestructureSeqeunceConeCubeBalance() {
Expand Down Expand Up @@ -549,7 +549,7 @@ private Command getSupestructureSequenceConeCubeCubeFlat() {
superstructure.goToStateParallel(
SuperstructureState.longTongueCube),
superstructure.rollersCommands.openloop(() -> 0.45))
.withTimeout(1.5),
.withTimeout(2.2),
superstructure.stow().withTimeout(0.5),
// Commands.waitSeconds(0.2),
superstructure.goToStateParallel(SuperstructureState.cubeThreeReversed),
Expand All @@ -561,10 +561,10 @@ private Command getSupestructureSequenceConeCubeCubeFlat() {
superstructure.goToStateParallel(
SuperstructureState.longTongueCube),
superstructure.rollersCommands.openloop(() -> 0.45))
.withTimeout(2),
.withTimeout(2.2),
superstructure.stow().withTimeout(1),
superstructure.goToStateParallel(SuperstructureState.cubeTwoReversed),
// Commands.waitSeconds(0.2),
Commands.waitSeconds(0.2),
superstructure.scoreAndStowCube(0.5, -0.4, SuperstructureState.stowScore));
}

Expand Down Expand Up @@ -810,6 +810,11 @@ public Command driveForward(DoubleSupplier rotation) {
drive);
}

public Command driveForwardFast() {
return Commands.run(
() -> drive.drive(new Translation2d(1.8, 0), 0, true, true, false), drive);
}

public Command driveForward() {
return driveForward(() -> 0);
}
Expand Down Expand Up @@ -900,7 +905,7 @@ public Command coneTaxiBalance() {
Command drivetrainSeqeuence =
Commands.sequence(
Commands.waitSeconds(3),
driveForward().until(() -> (drive.getPitch() > 5)),
driveForwardFast().until(() -> (drive.getPitch() > 5)),
driveForward().withTimeout(1.2),
driveBackwardSlowly().until(() -> (drive.getPitch() > 13)),
driveBackwardSlowly().until(() -> (drive.getPitch() < 13)),
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/team3647/frc2023/auto/Trajectories.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public static final class ConeCubeCubeMidBalanceFlatSide {

// Pick up cube 1
private static final Pose2d kFirstPathFinal =
new Pose2d(5.7, 4.55, FieldConstants.kZero);
new Pose2d(5.9, 4.55, FieldConstants.kZero);

private static final Pose2d kSecondPathInitial = kFirstPathFinal;
// private static final Pose2d kSecondPathFinal = new Pose2d(1.80, 4.39,
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/team3647/frc2023/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public RobotContainer() {
extender.setEncoder(ExtenderConstants.kMinimumPositionTicks);
wrist.setEncoder(WristConstants.kInitialDegree);
cubeWrist.setEncoder(CubeWristConstants.kInitialDegree);
runningMode = autoCommands.redConeCube2PieceBalance;
runningMode = autoCommands.redConeTaxiBalance;
LimelightHelpers.setPipelineIndex(LimelightConstant.kLimelightCenterHost, 1);
swerve.setRobotPose(runningMode.getPathplannerPose2d());
}
Expand Down Expand Up @@ -242,8 +242,8 @@ private void configureButtonBindings() {
goodForLockCube.onTrue(autoDrive.lockRot(180));
goodForLockCube.onFalse(autoDrive.unlockRot());

mainController.leftMidButton.onTrue(autoDrive.disable());
mainController.rightMidButton.onTrue(autoDrive.enable());
coController.leftMidButton.onTrue(autoDrive.disable());
coController.rightMidButton.onTrue(autoDrive.enable());

// LED Triggers
limelightTriggers.currentCone.onTrue(LEDS.setPiece(Piece.cone));
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/team3647/frc2023/subsystems/Superstructure.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public Command cubeShooterBottomDefault() {
return Commands.run(
() -> {
if (cubeWrist.isSensorTriggered()) {
cubeShooterBottom.setOpenloop(0.16);
cubeShooterBottom.setOpenloop(-0.16);
} else {
cubeShooterBottom.setOpenloop(0.0);
}
Expand All @@ -362,7 +362,7 @@ public Command cubeShooterTopDefault() {
return Commands.run(
() -> {
if (cubeWrist.isSensorTriggered()) {
cubeShooterTop.setOpenloop(0.16);
cubeShooterTop.setOpenloop(-0.16);
} else {
cubeShooterTop.setOpenloop(0.0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public SuperstructureState noExtend() {
new SuperstructureState(184, 57500, 43, "ground intake long");

public static final SuperstructureState doubleStationCone =
new SuperstructureState(120, 18800, 103, "double station");
new SuperstructureState(120, 17700, 103, "double station");
public static final SuperstructureState doubleStationConeLying =
new SuperstructureState(139, 3000, 51, "double station lying");
public static final SuperstructureState doubleStationCube =
Expand Down

0 comments on commit 93adb4a

Please sign in to comment.