Bump wpilib to 2024-beta-4 and report resource photon usage ids from 2024v2 image (#1042)

This commit is contained in:
Sriman Achanta
2023-12-16 13:14:52 -05:00
committed by GitHub
parent 3de878c510
commit 2e39549771
11 changed files with 96 additions and 73 deletions

View File

@@ -18,6 +18,7 @@
package org.photonvision.estimation;
import edu.wpi.first.cscore.CvSink;
import edu.wpi.first.math.MatBuilder;
import edu.wpi.first.math.Matrix;
import edu.wpi.first.math.Nat;
import edu.wpi.first.math.Num;
@@ -63,8 +64,8 @@ public final class OpenCVHelp {
}
static {
NWU_TO_EDN = new Rotation3d(Matrix.mat(Nat.N3(), Nat.N3()).fill(0, -1, 0, 0, 0, -1, 1, 0, 0));
EDN_TO_NWU = new Rotation3d(Matrix.mat(Nat.N3(), Nat.N3()).fill(0, 0, 1, -1, 0, 0, 0, -1, 0));
NWU_TO_EDN = new Rotation3d(MatBuilder.fill(Nat.N3(), Nat.N3(), 0, -1, 0, 0, 0, -1, 1, 0, 0));
EDN_TO_NWU = new Rotation3d(MatBuilder.fill(Nat.N3(), Nat.N3(), 0, 0, 1, -1, 0, 0, 0, -1, 0));
}
public static Mat matrixToMat(SimpleMatrix matrix) {