From 1c326fddff6a0a726b732e10a6cd4260f82e7a77 Mon Sep 17 00:00:00 2001 From: 2025246 Date: Fri, 8 Nov 2024 16:21:54 -0600 Subject: [PATCH] auto. --- .../main/java/indubitables/config/runmodes/Auto.java | 6 +++--- .../java/indubitables/config/util/FieldConstants.java | 6 +++--- .../java/indubitables/opmode/BlueObservation.java | 11 ++++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/TeamCode/src/main/java/indubitables/config/runmodes/Auto.java b/TeamCode/src/main/java/indubitables/config/runmodes/Auto.java index 9503b97..b3568c7 100644 --- a/TeamCode/src/main/java/indubitables/config/runmodes/Auto.java +++ b/TeamCode/src/main/java/indubitables/config/runmodes/Auto.java @@ -193,15 +193,15 @@ public void buildPaths() { .setLinearHeadingInterpolation(Math.toRadians(180), Math.toRadians(90)) .addPath(new BezierLine(new Point(58.000, 28.000, Point.CARTESIAN), new Point(24, 28.000, Point.CARTESIAN))) .setConstantHeadingInterpolation(Math.toRadians(90)) - .addPath(new BezierCurve(new Point(24, 28.000, Point.CARTESIAN), new Point(56.000, 30.000, Point.CARTESIAN), new Point(60.000, 18.000, Point.CARTESIAN))) + .addPath(new BezierCurve(new Point(24, 28.000, Point.CARTESIAN), new Point(56.000, 30.000, Point.CARTESIAN), new Point(60.000, 16.000, Point.CARTESIAN))) .setConstantHeadingInterpolation(Math.toRadians(90)) - .addPath(new BezierLine(new Point(60.000, 18.000, Point.CARTESIAN),new Point(24, 18.000, Point.CARTESIAN))) + .addPath(new BezierLine(new Point(60.000, 16.000, Point.CARTESIAN),new Point(24, 16.000, Point.CARTESIAN))) .setConstantHeadingInterpolation(Math.toRadians(90)) // .addPath(new BezierCurve(new Point(24, 16.000, Point.CARTESIAN), new Point(56.000, 16.000, Point.CARTESIAN), new Point(56.000, 9.50, Point.CARTESIAN))) // .setConstantHeadingInterpolation(Math.toRadians(0)) // .addPath(new BezierLine(new Point(56.000, 9.50, Point.CARTESIAN), new Point(24, 9.5, Point.CARTESIAN))) // .setConstantHeadingInterpolation(Math.toRadians(0)) - .addPath(new BezierLine(new Point(24, 18, Point.CARTESIAN), new Point(blueObservationSpecimenSetPose))) + .addPath(new BezierLine(new Point(24, 16, Point.CARTESIAN), new Point(blueObservationSpecimenSetPose))) .setLinearHeadingInterpolation(Math.toRadians(90), blueObservationSpecimenSetPose.getHeading()) .build(); diff --git a/TeamCode/src/main/java/indubitables/config/util/FieldConstants.java b/TeamCode/src/main/java/indubitables/config/util/FieldConstants.java index 0fc38e0..8502ad9 100644 --- a/TeamCode/src/main/java/indubitables/config/util/FieldConstants.java +++ b/TeamCode/src/main/java/indubitables/config/util/FieldConstants.java @@ -43,9 +43,9 @@ public enum RobotStart { public static final Pose blueObservationSpecimenSetPose = new Pose(16, 25.5, Math.toRadians(180)); public static final Pose blueObservationSpecimenPickupPose = new Pose(7.75, 27, Math.toRadians(180)); public static final Pose blueObservationSpecimenPickup2Pose = new Pose(7.75, 27, Math.toRadians(180)); - public static final Pose blueObservationSpecimen1Pose = new Pose(34, 72.625, Math.toRadians(180)); - public static final Pose blueObservationSpecimen2Pose = new Pose(34, 74.625, Math.toRadians(180)); - public static final Pose blueObservationSpecimen3Pose = new Pose(30.25, 76.625, Math.toRadians(180)); + public static final Pose blueObservationSpecimen1Pose = new Pose(32.75, 72.625, Math.toRadians(180)); + public static final Pose blueObservationSpecimen2Pose = new Pose(32.75, 76.625, Math.toRadians(180)); + public static final Pose blueObservationSpecimen3Pose = new Pose(30.25, 80.625, Math.toRadians(180)); public static final Pose blueObservationParkPose = new Pose(16, 24, 0); public static final Pose blueObservationParkControlPose = new Pose(16, 65); diff --git a/TeamCode/src/main/java/indubitables/opmode/BlueObservation.java b/TeamCode/src/main/java/indubitables/opmode/BlueObservation.java index e8ca66f..d4c3acb 100644 --- a/TeamCode/src/main/java/indubitables/opmode/BlueObservation.java +++ b/TeamCode/src/main/java/indubitables/opmode/BlueObservation.java @@ -63,7 +63,7 @@ public void pathUpdate() { break; case 2: //Once Chamber State Machine Machine finishes, begins Pathchain to push elements to the submersible if(auto.actionNotBusy()) { - auto.follower.setMaxPower(0.5); + auto.follower.setMaxPower(0.7); auto.follower.followPath(auto.pushSamples, true); setPathState(3); } break; @@ -81,7 +81,7 @@ public void pathUpdate() { break; case 4: //Runs to the position of the grab1 and holds it's point at full power if(auto.actionNotBusy() && !auto.follower.isBusy()) { - auto.follower.setMaxPower(0.65); + auto.follower.setMaxPower(0.7); auto.follower.followPath(auto.grab1, true); setPathState(5); } break; @@ -98,7 +98,7 @@ public void pathUpdate() { setPathState(8); } break; case 8: //Waits until follower reaches it's position then begins the Chamber State Machine - if(pathTimer.getElapsedTimeSeconds() > 0.5) { + if(pathTimer.getElapsedTimeSeconds() > 0) { auto.startChamber2(); setPathState(9); } break; @@ -109,7 +109,7 @@ public void pathUpdate() { break; case 10: //Begins the path for grab 2 & closes the claw once it reaches position and passes 0.75 seconds if(pathTimer.getElapsedTimeSeconds() > 0) { - auto.follower.setMaxPower(0.5); + auto.follower.setMaxPower(0.7); auto.follower.followPath(auto.grab2, true); setPathState(11); } @@ -131,13 +131,14 @@ public void pathUpdate() { setPathState(14); break; case 14: //Starts the Chamber State Machine - if(pathTimer.getElapsedTimeSeconds() > 1.25) { + if(pathTimer.getElapsedTimeSeconds() > 0) { auto.startChamber2(); setPathState(15); } break; case 15: //Park and End the autonomous if(auto.actionNotBusy()) { + auto.follower.setMaxPower(1); auto.follower.followPath(auto.park, true); setPathState(-1); }