Merge remote-tracking branch 'origin/danielv5' into update-teleop
This commit is contained in:
@@ -5,6 +5,19 @@ import com.acmerobotics.dashboard.config.Config;
|
||||
@Config
|
||||
public class ServoPositions {
|
||||
|
||||
public static double rapidFireBlocker_Closed = 0.3;
|
||||
public static double rapidFireBlocker_Open = 0.5;
|
||||
|
||||
public static double spindexBlocker_Closed = 0.31;
|
||||
public static double spindexBlocker_Open = 0.5;
|
||||
|
||||
public static double spindexer_A1 = 0.16;
|
||||
public static double spindexer_A2 = 0.35;
|
||||
public static double spindexer_A3 = 0.54;
|
||||
public static double spindexer_B1 = 0.73;
|
||||
public static double spindexer_B2 = 0.92;
|
||||
|
||||
|
||||
public static double spindexer_intakePos1 = 0.18; //0.13;
|
||||
|
||||
public static double spindexer_intakePos2 = 0.37; //0.33;//0.5;
|
||||
@@ -21,13 +34,13 @@ public class ServoPositions {
|
||||
|
||||
public static double shootAllSpindexerSpeedIncrease = 0.01;
|
||||
|
||||
public static double transferServo_out = 0.15;
|
||||
public static double transferServo_out = 0.57;
|
||||
|
||||
public static double transferServo_in = 0.38;
|
||||
public static double transferServo_in = 0.77;
|
||||
|
||||
public static double hoodAuto = 0.27;
|
||||
|
||||
public static double hoodOffset = -0.05; // offset from 0.93 (or position at 0,0 in targeting class)
|
||||
public static double hoodOffset = 0; // offset from 0.93 (or position at 0,0 in targeting class)
|
||||
|
||||
public static double turret_redClose = 0;
|
||||
public static double turret_blueClose = 0;
|
||||
@@ -44,4 +57,10 @@ public class ServoPositions {
|
||||
public static double redTurretShootPos = 0.05;
|
||||
public static double blueTurretShootPos = -0.05;
|
||||
|
||||
public static double tilt1_down = 0.6;
|
||||
public static double tilt2_down = 0.4;
|
||||
public static double tilt1_up = 0.08;
|
||||
public static double tilt2_up = 0.97;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -17,13 +17,10 @@ import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
|
||||
@Config
|
||||
public class Constants {
|
||||
public static FollowerConstants followerConstants = new FollowerConstants()
|
||||
.mass(15.5)
|
||||
.mass(14.37888)
|
||||
.forwardZeroPowerAcceleration(-29.512)
|
||||
.lateralZeroPowerAcceleration(-72.872)
|
||||
.translationalPIDFCoefficients(new PIDFCoefficients(0.35, 0, 0.03, 0.012))
|
||||
.headingPIDFCoefficients(new PIDFCoefficients(1, 0, 0.025, 0.02))
|
||||
.drivePIDFCoefficients(new FilteredPIDFCoefficients(0.03, 0, 0, 0.6, 0.03))
|
||||
.centripetalScaling(0.0005);
|
||||
.centripetalScaling(0);
|
||||
|
||||
public static MecanumConstants driveConstants = new MecanumConstants()
|
||||
.maxPower(1)
|
||||
@@ -42,8 +39,8 @@ public class Constants {
|
||||
public static PathConstraints pathConstraints = new PathConstraints(0.99, 100, breakingStrength, 1);
|
||||
|
||||
public static PinpointConstants localizerConstants = new PinpointConstants()
|
||||
.forwardPodY(-7.5)
|
||||
.strafePodX(-3.75)
|
||||
.forwardPodY(-3.676)
|
||||
.strafePodX(3.780)
|
||||
.distanceUnit(DistanceUnit.INCH)
|
||||
.hardwareMapName("pinpoint")
|
||||
.encoderResolution(GoBildaPinpointDriver.GoBildaOdometryPods.goBILDA_4_BAR_POD)
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.acmerobotics.dashboard.config.Config;
|
||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
|
||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
import com.qualcomm.robotcore.hardware.NormalizedRGBA;
|
||||
|
||||
import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
|
||||
@@ -52,6 +53,11 @@ public class Hardware_Tester extends LinearOpMode {
|
||||
robot = new Robot(hardwareMap);
|
||||
TELE = new MultipleTelemetry();
|
||||
|
||||
robot.shooter1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
|
||||
robot.shooter2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
|
||||
|
||||
waitForStart();
|
||||
|
||||
if (isStopRequested()) return;
|
||||
while (opModeIsActive()){
|
||||
// Non-subsystem based components
|
||||
@@ -116,9 +122,9 @@ public class Hardware_Tester extends LinearOpMode {
|
||||
|
||||
// Sensor Data
|
||||
|
||||
TELE.addData("Beam Break 1?", robot.beam1.isPressed());
|
||||
TELE.addData("Beam Break 2?", robot.beam2.isPressed());
|
||||
TELE.addData("Beam Break 3?", robot.beam3.isPressed());
|
||||
// TELE.addData("Beam Break 1?", robot.beam1.isPressed());
|
||||
// TELE.addData("Beam Break 2?", robot.beam2.isPressed());
|
||||
// TELE.addData("Beam Break 3?", robot.beam3.isPressed());
|
||||
|
||||
NormalizedRGBA revColor = robot.revSensor.getNormalizedColors();
|
||||
TELE.addData("REV Distance", robot.revSensor.getDistance(DistanceUnit.MM));
|
||||
|
||||
@@ -83,6 +83,7 @@ public class Robot {
|
||||
backRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
|
||||
|
||||
intake = hardwareMap.get(DcMotorEx.class, "intake");
|
||||
intake.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||
|
||||
shooter1 = hardwareMap.get(DcMotorEx.class, "shooter1");
|
||||
|
||||
@@ -103,11 +104,12 @@ public class Robot {
|
||||
|
||||
turr2 = hardwareMap.get(Servo.class, "turr2");
|
||||
|
||||
spin1 = hardwareMap.get(Servo.class, "spin2");
|
||||
spin1 = hardwareMap.get(Servo.class, "spin1");
|
||||
|
||||
spin2 = hardwareMap.get(Servo.class, "spin1");
|
||||
spin2 = hardwareMap.get(Servo.class, "spin2");
|
||||
|
||||
transfer = hardwareMap.get(DcMotorEx.class, "transfer");
|
||||
transfer.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||
|
||||
transferServo = hardwareMap.get(Servo.class, "transferServo");
|
||||
|
||||
@@ -121,27 +123,27 @@ public class Robot {
|
||||
tilt1 = hardwareMap.get(Servo.class, "tilt1");
|
||||
tilt2 = hardwareMap.get(Servo.class, "tilt2");
|
||||
|
||||
beam1 = hardwareMap.get(TouchSensor.class, "beam1");
|
||||
beam2 = hardwareMap.get(TouchSensor.class, "beam2");
|
||||
beam3 = hardwareMap.get(TouchSensor.class, "beam3");
|
||||
// beam1 = hardwareMap.get(TouchSensor.class, "beam1");
|
||||
// beam2 = hardwareMap.get(TouchSensor.class, "beam2");
|
||||
// beam3 = hardwareMap.get(TouchSensor.class, "beam3");
|
||||
|
||||
revSensor = hardwareMap.get(RevColorSensorV3.class, "rev");
|
||||
|
||||
// Below is disregarded
|
||||
|
||||
turr1Pos = hardwareMap.get(AnalogInput.class, "t1Pos"); // Encoder of turret plugged in intake port
|
||||
|
||||
spin1Pos = hardwareMap.get(AnalogInput.class, "spin1Pos");
|
||||
|
||||
spin2Pos = hardwareMap.get(AnalogInput.class, "spin2Pos");
|
||||
|
||||
transferServoPos = hardwareMap.get(AnalogInput.class, "tSPos");
|
||||
|
||||
color1 = hardwareMap.get(RevColorSensorV3.class, "c1");
|
||||
|
||||
color2 = hardwareMap.get(RevColorSensorV3.class, "c2");
|
||||
|
||||
color3 = hardwareMap.get(RevColorSensorV3.class, "c3");
|
||||
// turr1Pos = hardwareMap.get(AnalogInput.class, "t1Pos"); // Encoder of turret plugged in intake port
|
||||
//
|
||||
// spin1Pos = hardwareMap.get(AnalogInput.class, "spin1Pos");
|
||||
//
|
||||
// spin2Pos = hardwareMap.get(AnalogInput.class, "spin2Pos");
|
||||
//
|
||||
// transferServoPos = hardwareMap.get(AnalogInput.class, "tSPos");
|
||||
//
|
||||
// color1 = hardwareMap.get(RevColorSensorV3.class, "c1");
|
||||
//
|
||||
// color2 = hardwareMap.get(RevColorSensorV3.class, "c2");
|
||||
//
|
||||
// color3 = hardwareMap.get(RevColorSensorV3.class, "c3");
|
||||
|
||||
if (usingLimelight) {
|
||||
limelight = hardwareMap.get(Limelight3A.class, "limelight");
|
||||
@@ -150,7 +152,8 @@ public class Robot {
|
||||
aprilTagProcessor = AprilTagProcessor.easyCreateWithDefaults();
|
||||
}
|
||||
|
||||
light = hardwareMap.get(Servo.class, "light");
|
||||
// light = hardwareMap.get(Servo.class, "light");
|
||||
|
||||
voltage = hardwareMap.voltageSensor.iterator().next();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ public class Turret {
|
||||
|
||||
public static double turretTolerance = 0.02;
|
||||
public static double turrPosScalar = 0.00011264432;
|
||||
public static double turret180Range = 0.55;
|
||||
public static double turrDefault = 0.35;
|
||||
public static double turrMin = 0;
|
||||
public static double turrMax = 0.69;
|
||||
public static double turret180Range = 0.58;
|
||||
public static double turrDefault = 0.51;
|
||||
public static double turrMin = 0.05;
|
||||
public static double turrMax = 0.95;
|
||||
public static boolean limelightUsed = true;
|
||||
public static double limelightPosOffset = 5;
|
||||
public static double manualOffset = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user