Fine tuning to autonomous prior to switching to new robot
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
package org.firstinspires.ftc.teamcode;
|
package org.firstinspires.ftc.teamcode;
|
||||||
|
|
||||||
|
import static com.qualcomm.hardware.lynx.commands.core.LynxSetMotorPIDFControlLoopCoefficientsCommand.InternalMotorControlAlgorithm.Max;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.telemetry.TelemetryPacket;
|
import com.acmerobotics.dashboard.telemetry.TelemetryPacket;
|
||||||
@ -103,7 +105,7 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
theArmThingAgain();
|
theArmThingAgain();
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
//line six
|
//moveToParkPath6();
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
|
|
||||||
@ -148,7 +150,7 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void doArmThing() {
|
private void doArmThing() {
|
||||||
comp.highBucketDrop();
|
comp.highBucketDropAuto();
|
||||||
state = 2;
|
state = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +159,7 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
telemetry.addData("end?", follower.atParametricEnd());
|
telemetry.addData("end?", follower.atParametricEnd());
|
||||||
if (follower.atParametricEnd()){
|
if (follower.atParametricEnd()){
|
||||||
follower.breakFollowing();
|
follower.breakFollowing();
|
||||||
comp.highBucketDrop();
|
comp.highBucketDropAuto();
|
||||||
state = 6;
|
state = 6;
|
||||||
}
|
}
|
||||||
// follower.breakFollowing();
|
// follower.breakFollowing();
|
||||||
@ -165,7 +167,7 @@ public class ComeBotDriveDevV2 extends OpMode {
|
|||||||
|
|
||||||
private void theArmThingAgain() {
|
private void theArmThingAgain() {
|
||||||
follower.breakFollowing();
|
follower.breakFollowing();
|
||||||
comp.highBucketDrop();
|
comp.highBucketDropAuto();
|
||||||
state = 10;
|
state = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,38 +233,55 @@ 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() > 10.0) {
|
||||||
state = 5;
|
state = 5;
|
||||||
followingPath = false;
|
followingPath = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void thePickUp() {
|
private void thePickUpAuto() {
|
||||||
Actions.runBlocking(new SequentialAction(
|
Actions.runBlocking(new SequentialAction(
|
||||||
new SleepAction(.25),
|
new SleepAction(.1),
|
||||||
|
comp.claw.openClaw(),
|
||||||
|
new SleepAction(.2),
|
||||||
|
comp.wrist.toPickupPosition(),
|
||||||
|
new SleepAction(.2),
|
||||||
comp.arm.toSubmarinePosition(),
|
comp.arm.toSubmarinePosition(),
|
||||||
new SleepAction(.5),
|
new SleepAction(.5),
|
||||||
comp.wrist.toPickupPosition(),
|
|
||||||
new SleepAction(.75),
|
|
||||||
comp.claw.closeClaw(),
|
comp.claw.closeClaw(),
|
||||||
new SleepAction(.75),
|
new SleepAction(.3),
|
||||||
comp.wrist.toFloorPosition(),
|
comp.wrist.toFloorPosition(),
|
||||||
new SleepAction(0.5),
|
new SleepAction(.2),
|
||||||
comp.arm.toParkPosition(),
|
comp.arm.toParkPosition(),
|
||||||
new SleepAction(.25)
|
new SleepAction(.2)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
private void thePickUp() {
|
||||||
|
Actions.runBlocking(new SequentialAction(
|
||||||
|
new SleepAction(.5),
|
||||||
|
comp.wrist.toPickupPosition(),
|
||||||
|
new SleepAction(.5),
|
||||||
|
comp.arm.toSubmarinePosition(),
|
||||||
|
new SleepAction(.7),
|
||||||
|
comp.claw.closeClaw(),
|
||||||
|
new SleepAction(.7),
|
||||||
|
comp.wrist.toFloorPosition(),
|
||||||
|
new SleepAction(.5),
|
||||||
|
comp.arm.toParkPosition(),
|
||||||
|
new SleepAction(.5)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doPickUpThing() {
|
private void doPickUpThing() {
|
||||||
follower.breakFollowing();
|
follower.breakFollowing();
|
||||||
thePickUp();
|
thePickUpAuto();
|
||||||
state = 4;
|
state = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doPickUpThingAgain() {
|
private void doPickUpThingAgain() {
|
||||||
follower.breakFollowing();
|
follower.breakFollowing();
|
||||||
thePickUp();
|
thePickUpAuto();
|
||||||
state = 8;
|
state = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public class PedroConstants {
|
|||||||
/*
|
/*
|
||||||
Motor Max Power
|
Motor Max Power
|
||||||
*/
|
*/
|
||||||
public static final double MAX_POWER = .675;
|
public static final double MAX_POWER = .8;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
IMU
|
IMU
|
||||||
|
@ -212,20 +212,20 @@ public class CometBotTeleopCompetition {
|
|||||||
}
|
}
|
||||||
public void highBucketDropAuto() {
|
public void highBucketDropAuto() {
|
||||||
Actions.runBlocking(new SequentialAction(
|
Actions.runBlocking(new SequentialAction(
|
||||||
new SleepAction(.5),
|
new SleepAction(.1),
|
||||||
this.lift.toHighBucketPosition(),
|
this.lift.toHighBucketPosition(),
|
||||||
new SleepAction(.5),
|
new SleepAction(.25),
|
||||||
this.arm.toBucketPosition(),
|
this.arm.toBucketPosition(),
|
||||||
new SleepAction(.5),
|
new SleepAction(.25),
|
||||||
this.wrist.toBucketPosition(),
|
this.wrist.toBucketPosition(),
|
||||||
new SleepAction(.5),
|
new SleepAction(.25),
|
||||||
this.claw.openClaw(),
|
this.claw.openClaw(),
|
||||||
new SleepAction(.5),
|
new SleepAction(.25),
|
||||||
this.wrist.toFloorPosition(),
|
this.wrist.toFloorPosition(),
|
||||||
new SleepAction(.5),
|
new SleepAction(.25),
|
||||||
this.arm.toParkPosition(),
|
this.arm.toParkPosition(),
|
||||||
this.lift.toZeroPosition(),
|
this.lift.toZeroPosition(),
|
||||||
new SleepAction(.5)
|
new SleepAction(.25)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -115,11 +115,13 @@ public class LiftWristArmTest extends LinearOpMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentGamepad1.right_bumper && !previousGamepad1.right_bumper) {
|
if (currentGamepad1.right_bumper && !previousGamepad1.right_bumper) {
|
||||||
lift.setPosition(lift.getPosition() + 175);
|
lift.setPosition(lift.getPosition() + 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentGamepad1.left_bumper && !previousGamepad1.left_bumper) {
|
if (currentGamepad1.left_bumper && !previousGamepad1.left_bumper) {
|
||||||
lift.setPosition(lift.getPosition() - 25);
|
if (lift.getPosition() > 1000) {
|
||||||
|
lift.setPosition(lift.getPosition()-1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user