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