-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
22 changed files
with
275 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package org.firstinspires.ftc.teamcode.opmode.auton; | ||
|
||
import com.acmerobotics.roadrunner.geometry.Pose2d; | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous; | ||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; | ||
|
||
import org.firstinspires.ftc.teamcode.drive.SampleMecanumDrive; | ||
import org.firstinspires.ftc.teamcode.hardware.Webcam; | ||
import org.firstinspires.ftc.teamcode.trajectorysequence.TrajectorySequence; | ||
|
||
@Autonomous (name = "ALL AUTO", group = "_main") | ||
public class AllAuto extends LinearOpMode { | ||
|
||
public static double FORWARD_DIST = 36; | ||
public static double LATERAL_DIST = 23; | ||
|
||
private SampleMecanumDrive drive; | ||
private Webcam webcam = new Webcam(this); | ||
|
||
@Override | ||
public void runOpMode() throws InterruptedException { | ||
drive = new SampleMecanumDrive(hardwareMap); | ||
webcam.init(hardwareMap); | ||
|
||
TrajectorySequence leftPark = drive.trajectorySequenceBuilder(new Pose2d()) | ||
.forward(FORWARD_DIST) | ||
.waitSeconds(0.5) | ||
.strafeLeft(LATERAL_DIST) | ||
.build(); | ||
|
||
TrajectorySequence middlePark = drive.trajectorySequenceBuilder(new Pose2d()) | ||
.forward(FORWARD_DIST) | ||
.build(); | ||
|
||
TrajectorySequence rightPark = drive.trajectorySequenceBuilder(new Pose2d()) | ||
.forward(FORWARD_DIST) | ||
.waitSeconds(0.5) | ||
.strafeRight(LATERAL_DIST) | ||
.build(); | ||
|
||
waitForStart(); | ||
|
||
switch (webcam.side()) { | ||
case ONE: | ||
drive.followTrajectorySequenceAsync(leftPark); | ||
break; | ||
case TWO: | ||
drive.followTrajectorySequenceAsync(middlePark); | ||
break; | ||
case THREE: | ||
drive.followTrajectorySequenceAsync(rightPark); | ||
break; | ||
case NOT_FOUND: | ||
default: | ||
drive.followTrajectorySequenceAsync(middlePark); | ||
break; | ||
} | ||
|
||
while (opModeIsActive() && !isStopRequested()) { | ||
drive.update(); | ||
} | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.