Compare commits
3 Commits
11df322ec1
...
653c81ca7e
Author | SHA1 | Date | |
---|---|---|---|
653c81ca7e | |||
d41add449c | |||
1c90a851e7 |
@ -18,6 +18,8 @@ import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath1;
|
|||||||
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath2;
|
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath2;
|
||||||
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath3;
|
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath3;
|
||||||
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath4;
|
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath4;
|
||||||
|
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath5;
|
||||||
|
import org.firstinspires.ftc.teamcode.subsystem.HighBasketAutoPath6;
|
||||||
import org.firstinspires.ftc.teamcode.subsystem.LiftActionsSubsystem;
|
import org.firstinspires.ftc.teamcode.subsystem.LiftActionsSubsystem;
|
||||||
import org.firstinspires.ftc.teamcode.subsystem.SkyHookSubsystem;
|
import org.firstinspires.ftc.teamcode.subsystem.SkyHookSubsystem;
|
||||||
|
|
||||||
@ -32,6 +34,8 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
|
|
||||||
private HighBasketAutoPath3 path3;
|
private HighBasketAutoPath3 path3;
|
||||||
private HighBasketAutoPath4 path4;
|
private HighBasketAutoPath4 path4;
|
||||||
|
private HighBasketAutoPath5 path5;
|
||||||
|
private HighBasketAutoPath6 path6;
|
||||||
|
|
||||||
private AutoPark pathPark;
|
private AutoPark pathPark;
|
||||||
private SkyHookSubsystem hook;
|
private SkyHookSubsystem hook;
|
||||||
@ -48,6 +52,10 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
path1 = new HighBasketAutoPath1();
|
path1 = new HighBasketAutoPath1();
|
||||||
path2 = new HighBasketAutoPath2();
|
path2 = new HighBasketAutoPath2();
|
||||||
path3 = new HighBasketAutoPath3();
|
path3 = new HighBasketAutoPath3();
|
||||||
|
path4 = new HighBasketAutoPath4();
|
||||||
|
path5 = new HighBasketAutoPath5();
|
||||||
|
path6 = new HighBasketAutoPath6();
|
||||||
|
|
||||||
pathPark = new AutoPark();
|
pathPark = new AutoPark();
|
||||||
|
|
||||||
comp = new CometBotTeleopCompetition(hardwareMap, telemetry, gamepad1, gamepad2);
|
comp = new CometBotTeleopCompetition(hardwareMap, telemetry, gamepad1, gamepad2);
|
||||||
@ -83,16 +91,16 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
theArmThing();
|
theArmThing();
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
//moveToPickupAgainPath4();
|
moveToPickupAgainPath4();
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
//doPickUpThingAgain();
|
doPickUpThingAgain();
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
//line five
|
moveToPickupAgainPath5();
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
//theArmThingAgain();
|
theArmThingAgain();
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
//line six
|
//line six
|
||||||
@ -156,6 +164,7 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void theArmThingAgain() {
|
private void theArmThingAgain() {
|
||||||
|
follower.breakFollowing();
|
||||||
comp.highBucketDrop();
|
comp.highBucketDrop();
|
||||||
state = 10;
|
state = 10;
|
||||||
}
|
}
|
||||||
@ -181,13 +190,40 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
}
|
}
|
||||||
if (runtime != null) {
|
if (runtime != null) {
|
||||||
telemetry.addData("Runtime (seconds)", runtime.seconds());
|
telemetry.addData("Runtime (seconds)", runtime.seconds());
|
||||||
if (follower.atParametricEnd() || runtime.seconds() > 12.0) {
|
if (follower.atParametricEnd() || runtime.seconds() > 27.0) {
|
||||||
state = 7;
|
state = 7;
|
||||||
followingPath = false;
|
followingPath = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void moveToPickupAgainPath5() {
|
||||||
|
if (!followingPath) {
|
||||||
|
path5.moveToPickupAgainPath5(follower);
|
||||||
|
followingPath = true;
|
||||||
|
}
|
||||||
|
if (runtime != null) {
|
||||||
|
telemetry.addData("Runtime (seconds)", runtime.seconds());
|
||||||
|
if (follower.atParametricEnd() || runtime.seconds() > 36.0) {
|
||||||
|
state = 9;
|
||||||
|
followingPath = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void moveToParkPath6() {
|
||||||
|
if (!followingPath) {
|
||||||
|
path6.moveToParkPath6(follower);
|
||||||
|
followingPath = true;
|
||||||
|
}
|
||||||
|
if (runtime != null) {
|
||||||
|
telemetry.addData("Runtime (seconds)", runtime.seconds());
|
||||||
|
if (follower.atParametricEnd() || runtime.seconds() > 48.0) {
|
||||||
|
state = 11;
|
||||||
|
followingPath = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void moveToBasketPath3() {
|
private void moveToBasketPath3() {
|
||||||
if (!followingPath) {
|
if (!followingPath) {
|
||||||
path3.moveToBasketPath3(follower);
|
path3.moveToBasketPath3(follower);
|
||||||
@ -225,6 +261,7 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void doPickUpThingAgain() {
|
private void doPickUpThingAgain() {
|
||||||
|
follower.breakFollowing();
|
||||||
thePickUp();
|
thePickUp();
|
||||||
state = 8;
|
state = 8;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ public class HighBasketAutoPath2 {
|
|||||||
// Line 1
|
// Line 1
|
||||||
new BezierLine(
|
new BezierLine(
|
||||||
new Point(18.000, 126.000, Point.CARTESIAN),
|
new Point(18.000, 126.000, Point.CARTESIAN),
|
||||||
new Point(29.000, 120.000, Point.CARTESIAN)
|
new Point(25.500, 120.000, Point.CARTESIAN)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.setLinearHeadingInterpolation(Math.toRadians(135), Math.toRadians(0));
|
.setLinearHeadingInterpolation(Math.toRadians(135), Math.toRadians(0));
|
||||||
|
@ -18,7 +18,6 @@ public class HighBasketAutoPath3 {
|
|||||||
public void moveToBasketPath3(Follower robot) {
|
public void moveToBasketPath3(Follower robot) {
|
||||||
PathChain pathChain;
|
PathChain pathChain;
|
||||||
PathBuilder builder = new PathBuilder();
|
PathBuilder builder = new PathBuilder();
|
||||||
// robot.setStartingPose( new Pose(29, 120));
|
|
||||||
builder
|
builder
|
||||||
.addPath(
|
.addPath(
|
||||||
// Line 1
|
// Line 1
|
||||||
|
@ -22,7 +22,7 @@ public class HighBasketAutoPath4 {
|
|||||||
// Line 1
|
// Line 1
|
||||||
new BezierLine(
|
new BezierLine(
|
||||||
new Point(18.000, 126.000, Point.CARTESIAN),
|
new Point(18.000, 126.000, Point.CARTESIAN),
|
||||||
new Point(29.000, 131.400, Point.CARTESIAN)
|
new Point(25.000, 129.900, Point.CARTESIAN)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.setLinearHeadingInterpolation(Math.toRadians(135), Math.toRadians(0));
|
.setLinearHeadingInterpolation(Math.toRadians(135), Math.toRadians(0));
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
package org.firstinspires.ftc.teamcode.subsystem;
|
||||||
|
|
||||||
|
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.follower.Follower;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.BezierLine;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.PathBuilder;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.PathChain;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Point;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
AutoLine# - This file does something of a path......
|
||||||
|
|
||||||
|
*/
|
||||||
|
public class HighBasketAutoPath5 {
|
||||||
|
|
||||||
|
public void moveToPickupAgainPath5(Follower robot) {
|
||||||
|
PathChain pathChain;
|
||||||
|
PathBuilder builder = new PathBuilder();
|
||||||
|
builder
|
||||||
|
.addPath(
|
||||||
|
// Line 1
|
||||||
|
new BezierLine(
|
||||||
|
new Point(24.000, 131.000, Point.CARTESIAN),
|
||||||
|
new Point(18.000, 126.000, Point.CARTESIAN)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.setLinearHeadingInterpolation(Math.toRadians(0), Math.toRadians(135));
|
||||||
|
pathChain = builder.build();
|
||||||
|
robot.followPath(pathChain);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
|||||||
|
package org.firstinspires.ftc.teamcode.subsystem;
|
||||||
|
|
||||||
|
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.follower.Follower;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.BezierLine;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.PathBuilder;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.PathChain;
|
||||||
|
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Point;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
AutoLine# - This file does something of a path......
|
||||||
|
|
||||||
|
*/
|
||||||
|
public class HighBasketAutoPath6 {
|
||||||
|
|
||||||
|
public void moveToParkPath6(Follower robot) {
|
||||||
|
PathChain pathChain;
|
||||||
|
PathBuilder builder = new PathBuilder();
|
||||||
|
builder
|
||||||
|
.addPath(
|
||||||
|
// Line 1
|
||||||
|
new BezierLine(
|
||||||
|
new Point(18.000, 126.000, Point.CARTESIAN),
|
||||||
|
new Point(18.000, 126.000, Point.CARTESIAN)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.setLinearHeadingInterpolation(Math.toRadians(135), Math.toRadians(270))
|
||||||
|
.addPath(
|
||||||
|
// Line 2
|
||||||
|
new BezierLine(
|
||||||
|
new Point(18.000, 126.000, Point.CARTESIAN),
|
||||||
|
new Point(81.000, 125.000, Point.CARTESIAN)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.setLinearHeadingInterpolation(Math.toRadians(270), Math.toRadians(270))
|
||||||
|
.addPath(
|
||||||
|
// Line 3
|
||||||
|
new BezierLine(
|
||||||
|
new Point(81.000, 125.000, Point.CARTESIAN),
|
||||||
|
new Point(81.000, 100.000, Point.CARTESIAN)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.setLinearHeadingInterpolation(Math.toRadians(270), Math.toRadians(270));
|
||||||
|
pathChain = builder.build();
|
||||||
|
robot.followPath(pathChain);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user