Skip to content

Commit

Permalink
auto.
Browse files Browse the repository at this point in the history
  • Loading branch information
richpant committed Nov 8, 2024
1 parent 7ba156f commit 1c326fd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions TeamCode/src/main/java/indubitables/config/runmodes/Auto.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
11 changes: 6 additions & 5 deletions TeamCode/src/main/java/indubitables/opmode/BlueObservation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 1c326fd

Please sign in to comment.