Skip to content

Commit

Permalink
fixing test auto drive
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfulHermes committed Dec 11, 2023
1 parent 97e71b3 commit c9578f9
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,14 @@ public void runOpMode() throws InterruptedException {
.lineTo(new Vector2d(10, -36))
.turn(Math.toRadians(90))


.waitSeconds(10)
.splineToSplineHeading(new Pose2d(11, -36, Math.toRadians(180)), Math.toRadians(180))
.addDisplacementMarker(()->{
.addTemporalMarker(() ->{
//ARM DROPS PIXEL
android.util.Log.i("DROP", "seconddDrop");
android.util.Log.i("DROP", "Drop");

})

.splineToSplineHeading(new Pose2d(11, -36, Math.toRadians(180)), Math.toRadians(180))

.turn(Math.toRadians(180))

.splineToSplineHeading(new Pose2d(3 * 12 + 5, -3 * 12, 0), 0)
Expand All @@ -115,19 +116,19 @@ public void runOpMode() throws InterruptedException {
traj = drive.trajectorySequenceBuilder(startPose)
.lineTo(new Vector2d(16, -36))
.turn(Math.toRadians(-90))
.addDisplacementMarker(() ->{
.addTemporalMarker(() ->{
//ARM DROPS PIXEL
android.util.Log.i("DROP", "drop");
})

.lineTo(new Vector2d(startPose.getX(), startPose.getY()))
.splineToSplineHeading(new Pose2d(3 * 12 + 5, -3 * 12, 0), 0)
.build();
break;
case CENTER:

traj = drive.trajectorySequenceBuilder(startPose)
.lineTo(new Vector2d(16, -36))
.addDisplacementMarker(() -> {
.addTemporalMarker(() -> {
//ARM DROPS PIXEL
android.util.Log.i("DROP", "drop");

Expand All @@ -146,7 +147,7 @@ public void runOpMode() throws InterruptedException {

.turn(Math.toRadians(90))

.addDisplacementMarker(() -> {
.addTemporalMarker(() -> {
//PIXEL DROP

android.util.Log.i("DROP", "drop");
Expand All @@ -169,6 +170,7 @@ public void runOpMode() throws InterruptedException {
//PIXEL DROP
android.util.Log.i("DROP", "drop");
})
.lineTo(new Vector2d(startPose.getX(), startPose.getY()))
//.splineToSplineHeading(new Pose2d(3*12 + 5, -3*12, 0), 0)
.lineToSplineHeading(new Pose2d(2 * 12, -3 * 12 + 2, Math.toRadians(90)))
.lineToSplineHeading(new Pose2d(3 * 12 + 5, -3 * 12 + 2, 0))
Expand All @@ -177,7 +179,7 @@ public void runOpMode() throws InterruptedException {
case CENTER:
traj = drive.trajectorySequenceBuilder(startPose)
.lineTo(new Vector2d(startPose.getX(), -3 * 12 + 2)) // drive forward to prevent the spline from cutting through the poles
.addDisplacementMarker(() -> {
.addTemporalMarker(() -> {
//PIXEL DROP
android.util.Log.i("DROP", "drop");
})
Expand Down

0 comments on commit c9578f9

Please sign in to comment.