Skip to content

Commit

Permalink
Remove vision because we caused java itself to segfault lol
Browse files Browse the repository at this point in the history
  • Loading branch information
aidnem committed Oct 26, 2024
1 parent 5e2b96e commit 944229c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 48 deletions.
7 changes: 2 additions & 5 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ private void configureSubsystems() {
if (FeatureFlags.runIntake) {
initIntake();
}
if (FeatureFlags.runScoring
&& FeatureFlags.runIntake
&& FeatureFlags.runVision
&& FeatureFlags.runLEDS) {
if (FeatureFlags.runScoring && FeatureFlags.runIntake && FeatureFlags.runLEDS) {
initLEDs();
}
}
Expand Down Expand Up @@ -262,7 +259,7 @@ private void configureSuppliers() {

if (FeatureFlags.runLEDS) {
if (FeatureFlags.runVision) {
leds.setVisionWorkingSupplier(() -> tagVision.coprocessorConnected());
// leds.setVisionWorkingSupplier(() -> tagVision.coprocessorConnected());
} else {
leds.setVisionWorkingSupplier(() -> false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/constants/FeatureFlags.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public final class FeatureFlags {
public static final boolean runDrive = true;
public static final boolean runVision = true;
public static final boolean runVision = false;
// NOTE: A featureflag "runLocalizer" was removed from here recently.
// TODO: Figure out if we need this and add it back if necessary.
public static final boolean runLocalizer = false;
Expand Down
17 changes: 9 additions & 8 deletions src/main/java/frc/robot/constants/ScoringConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class ScoringConstants {

public static final double intakeAngleToleranceRotations = 0.05; // Todo: tune this value

public static final double aimerAmpPositionRot = 0.14;
public static final double aimerAmpPositionRot = 0.145;

public static final double aimMaxAngleRotations = 0.361328 - 0.184570;
public static final double aimMinAngleRotations = -0.212285;
Expand All @@ -79,19 +79,20 @@ public class ScoringConstants {
// Value - Aimer angle in rotations
public static HashMap<Double, Double> getAimerMap() {
HashMap<Double, Double> map = new HashMap<Double, Double>();
map.put(1.284, -0.1);
map.put(1.7, -0.13);
map.put(2.30, -0.15);
map.put(3.32, -0.175);
map.put(4.23, -0.195);
map.put(5.811, -0.2);
// map.put(1.284, -0.1);
map.put(1.428, -0.1);
// map.put(1.7, -0.13);
// map.put(2.30, -0.15);
// map.put(3.32, -0.175);
// map.put(4.23, -0.195);
// map.put(5.811, -0.2);

return map;
}

public static final double passLocationRot = -0.14;
public static final double passAngleToleranceRot = 0.005;
public static final double passShooterRpm = 3000.0;
public static final double passShooterRpm = 2800.0;

public static final double aimerStaticOffset = 0.0;

Expand Down
67 changes: 33 additions & 34 deletions src/main/java/frc/robot/constants/VisionConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import edu.wpi.first.math.Matrix;
import edu.wpi.first.math.VecBuilder;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Rotation3d;
import edu.wpi.first.math.geometry.Transform3d;
import edu.wpi.first.math.geometry.Translation3d;
import edu.wpi.first.math.numbers.N1;
import edu.wpi.first.math.numbers.N3;
import edu.wpi.first.math.util.Units;
Expand Down Expand Up @@ -38,38 +36,39 @@ public final class VisionConstants {

public static final Matrix<N3, N1> driveUncertainty = VecBuilder.fill(0.1, 0.1, 0.1);

public static final List<CameraParams> cameras =
List.of(
// new CameraParams(
// "Front-Left", // Front Right
// 1280,
// 960,
// 50,
// Rotation2d.fromDegrees(70),
// new Transform3d(
// new Translation3d(0.0328422, -0.3103626, 0.430911),
// new Rotation3d(0, -0.261799, 0.0)),
// CameraTrustZone.MIDDLE),
// new CameraParams(
// "Back-Right", // Back Right
// 1280,
// 960,
// 50,
// Rotation2d.fromDegrees(70),
// new Transform3d(
// new Translation3d(-0.3160014, -0.2327402, 0.3163316),
// new Rotation3d(0.0, -0.408546671, Math.PI)),
// CameraTrustZone.MIDDLE),
new CameraParams(
"Front-Right", // Front Left
1280,
960,
50,
Rotation2d.fromDegrees(70),
new Transform3d(
new Translation3d(0.0328422, 0.3103626, 0.430911),
new Rotation3d(Math.PI, -0.261799, 0.0)),
CameraTrustZone.MIDDLE));
public static final List<CameraParams> cameras = List.of();

// new CameraParams(
// "Front-Left", // Front Right
// 1280,
// 960,
// 50,
// Rotation2d.fromDegrees(70),
// new Transform3d(
// new Translation3d(0.0328422, -0.3103626, 0.430911),
// new Rotation3d(0, -0.261799, 0.0)),
// CameraTrustZone.MIDDLE));

// new CameraParams(
// "Back-Right", // Back Right
// 1280,
// 960,
// 50,
// Rotation2d.fromDegrees(70),
// new Transform3d(
// new Translation3d(-0.3160014, -0.2327402, 0.3163316),
// new Rotation3d(0.0, -0.408546671, Math.PI)),
// CameraTrustZone.MIDDLE),
// new CameraParams(
// "Front-Right", // Front Left
// 1280,
// 960,
// 50,
// Rotation2d.fromDegrees(70),
// new Transform3d(
// new Translation3d(0.0328422, 0.3103626, 0.430911),
// new Rotation3d(Math.PI, -0.261799, 0.0)),
// CameraTrustZone.MIDDLE));

// new CameraParams(
// "Front-Center", // Back Left
Expand Down

0 comments on commit 944229c

Please sign in to comment.