Skip to content

Commit

Permalink
who is letting me commit to main
Browse files Browse the repository at this point in the history
  • Loading branch information
amb2127 committed Apr 7, 2024
1 parent b72d28b commit 7a2e6ef
Show file tree
Hide file tree
Showing 15 changed files with 8,012 additions and 8,041 deletions.
5,432 changes: 2,709 additions & 2,723 deletions FRC-2024.chor

Large diffs are not rendered by default.

1,056 changes: 528 additions & 528 deletions src/main/deploy/choreo/4_far_source_blue.1.traj

Large diffs are not rendered by default.

668 changes: 343 additions & 325 deletions src/main/deploy/choreo/4_far_source_blue.2.traj

Large diffs are not rendered by default.

944 changes: 472 additions & 472 deletions src/main/deploy/choreo/4_far_source_blue.3.traj

Large diffs are not rendered by default.

2,664 changes: 1,341 additions & 1,323 deletions src/main/deploy/choreo/4_far_source_blue.traj

Large diffs are not rendered by default.

1,089 changes: 549 additions & 540 deletions src/main/deploy/choreo/4_far_source_red.1.traj

Large diffs are not rendered by default.

663 changes: 336 additions & 327 deletions src/main/deploy/choreo/4_far_source_red.2.traj

Large diffs are not rendered by default.

885 changes: 420 additions & 465 deletions src/main/deploy/choreo/4_far_source_red.3.traj

Large diffs are not rendered by default.

2,633 changes: 1,303 additions & 1,330 deletions src/main/deploy/choreo/4_far_source_red.traj

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/main/java/org/codeorange/frc2024/auto/AutoManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class AutoManager {
private final TwoFarSourceSubwooferStart TWO_FAR_SOURCE_SUBWOOFER;
private final ThreePointFiveFarSource THREE_PT_FIVE_FAR_SOURCE;
private final FivePointFive FIVE_PT_FIVE;
private final FourPieceSource FOUR_PC;
private final TunePathFollowerPID TUNE_PID;

public static AutoManager getInstance() {
Expand All @@ -41,6 +42,7 @@ private AutoManager() {
TWO_FAR_SOURCE_SUBWOOFER = new TwoFarSourceSubwooferStart();
THREE_PT_FIVE_FAR_SOURCE = new ThreePointFiveFarSource();
FIVE_PT_FIVE = new FivePointFive();
FOUR_PC = new FourPieceSource();
TUNE_PID = new TunePathFollowerPID();
}

Expand All @@ -58,6 +60,7 @@ public void loadAuto(int key) {
case 9 -> selectedRoutine = TWO_FAR_SOURCE_SUBWOOFER;
case 10 -> selectedRoutine = THREE_PT_FIVE_FAR_SOURCE;
case 11 -> selectedRoutine = FIVE_PT_FIVE;
case 12 -> selectedRoutine = FOUR_PC;
case 100 -> selectedRoutine = TUNE_PID;
}
System.out.println("Selected routine " + selectedRoutine.getClass().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void start() {
pathTimer.start();

PIDController translationController = new PIDController(7, 0, 0.0);
PIDController rotationController = new PIDController(3.5, 0, 0.0);
PIDController rotationController = new PIDController(3, 0, 0.0);
choreoController = Choreo.choreoSwerveController(translationController, translationController, rotationController);
Logger.recordOutput("Auto/Final Pose", trajectory.getFinalState().getPose());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ protected void configureRoutine() {
new SeriesAction(
new Wait(1.18),
new RunKicker(),
new Stow(),
new GroundIntake(),
new ShootFromGround(19)
)
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/codeorange/frc2024/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public static class Ports {
}
case HALEIWA -> {
FL_ABSOLUTE_ENCODER_OFFSET = -0.16748046875;
BL_ABSOLUTE_ENCODER_OFFSET = -0.521728515625;
FR_ABSOLUTE_ENCODER_OFFSET = -0.836181640625;
BR_ABSOLUTE_ENCODER_OFFSET = -0.453857421875;
BL_ABSOLUTE_ENCODER_OFFSET = -0.523681640625;
FR_ABSOLUTE_ENCODER_OFFSET = -0.826904296875;
BR_ABSOLUTE_ENCODER_OFFSET = -0.424560546875;
WRIST_ABSOLUTE_ENCODER_OFFSET = 0.0739746;
ARM_ABSOLUTE_ENCODER_OFFSET = 0.3251953125;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/codeorange/frc2024/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public void robotInit() {
autoChooser.addOption("Cursed path", 9);
autoChooser.addOption("3.5 Far Source", 10);
autoChooser.addOption("5.5", 11);
autoChooser.addOption("4 source", 12);
autoChooser.addOption("Tune PID", 100);
sideChooser.addDefaultOption("Blue", "blue");
sideChooser.addOption("Red", "red");
Expand Down Expand Up @@ -452,7 +453,7 @@ public void teleopPeriodic() {
shooter.stop();
}
if(xbox.getRisingEdge(XboxButtons.Y)) {
superstructure.wantedAngle = AngleLookupInterpolation.SHOOTER_ANGLE_BACK_LOW.get(drive.findDistanceToSpeaker())
superstructure.wantedAngle = AngleLookupInterpolation.SHOOTER_ANGLE_BACK_LOW.get(drive.findDistanceToSpeaker());
superstructure.isFlipped = drive.isForward();
superstructure.setGoalState(Superstructure.States.SPEAKER);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private void processVisionData(VisionIO io, VisionIO.VisionInputs inputs) {
if(Math.abs(drive.getPose().getRotation().minus(inputs.botPose2d.getRotation()).getDegrees()) > 5) return;

//exit if tags are too far in auto
// if(inputs.avgDist > 4 && DriverStation.isAutonomous()) return;
if(inputs.avgDist > 4 && DriverStation.isAutonomous()) return;


Logger.recordOutput("Vision/" + io.getName() + "/Accepted Pose", inputs.botPose2d);
Expand All @@ -97,7 +97,7 @@ private void processVisionData(VisionIO io, VisionIO.VisionInputs inputs) {

public void updateBotOrientation(double yaw, double yawVel, double pitch, double pitchVel, double roll, double rollVel) {
for(VisionIO io : visionIO) {
LimelightHelpers.SetRobotOrientation(io.getName(), yaw, yawVel, pitch, pitchVel, roll, rollVel);
LimelightHelpers.SetRobotOrientation(io.getName(), yaw, 0, 0, 0, 0, 0);
}
}
}

0 comments on commit 7a2e6ef

Please sign in to comment.