Skip to content

Commit

Permalink
recal cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewis-Seiden committed Apr 8, 2024
1 parent ff258a0 commit a9d8cce
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/main/java/frc/robot/subsystems/swerve/SwerveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import frc.robot.Robot;
import frc.robot.Robot.RobotMode;
import frc.robot.subsystems.swerve.Module.ModuleConstants;
import frc.robot.subsystems.swerve.SwerveSubsystem.AutoAimStates;
import frc.robot.subsystems.vision.Vision;
import frc.robot.subsystems.vision.Vision.VisionConstants;
import frc.robot.subsystems.vision.VisionHelper;
Expand Down Expand Up @@ -154,34 +155,32 @@ public class AutoAimStates {
private double lastOdometryUpdateTimestamp = 0.0;

public static final Matrix<N3, N3> LEFT_CAMERA_MATRIX =
MatBuilder.fill(Nat.N3(), Nat.N3(), 912.58, 0.0, 829.49, 0.0, 912.97, 650.11, 0.0, 0.0, 1.0);
public static final Matrix<N5, N1> LEFT_DIST_COEFFS =
MatBuilder.fill(
Nat.N5(), Nat.N1(), 0.013, -0.031, 0, -0.002, 0.115); // Last 3 values have been truncated
public static final Matrix<N3, N3> RIGHT_CAMERA_MATRIX =
MatBuilder.fill(
Nat.N3(),
Nat.N3(),
905.8460068929472,
902.0832829888818,
0.0,
609.5597530043692,
611.9702186077134,
0.0,
902.8748199030964,
404.79249985937037,
902.2731968281233,
400.755534902121,
0.0,
0.0,
1.0);
public static final Matrix<N5, N1> LEFT_DIST_COEFFS =
MatBuilder.fill(
Nat.N5(), Nat.N1(), 0.042, -0.055, -0.003, 0.001,
0.018); // Last 3 values have been truncated
public static final Matrix<N3, N3> RIGHT_CAMERA_MATRIX =
MatBuilder.fill(
Nat.N3(), Nat.N3(), 911.3512229, 0, 613.8313639, 0, 907.3772729, 361.1892783, 0, 0, 1);
public static final Matrix<N5, N1> RIGHT_DIST_COEFFS =
MatBuilder.fill(
Nat.N5(),
Nat.N1(),
0.0475654581,
-0.05424391133,
-0.00171161002,
0.0007729068571,
0.001176848411); // Last 3 values have been truncated
0.05398335403070431,
-0.07589158973947994,
-0.003081304772847505,
-0.0010797674400397023,
0.015185486932866137); // Last 3 values have been truncated
public static final VisionConstants leftCamConstants =
new VisionConstants(
"Left_Camera",
Expand Down

0 comments on commit a9d8cce

Please sign in to comment.