mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-25 01:41:40 +00:00
Rotate all solvePNP-ed poses to be 180 about Z facing camera (#500)
* Rotate all solvePNP-ed poses to be 180 about Z facing camera * Run spotless * Fix test coordinate systems
This commit is contained in:
@@ -79,15 +79,14 @@ public class AprilTagTest {
|
||||
var objZ = new Translation3d(0, 0, 1).rotateBy(pose.getRotation()).getX();
|
||||
System.out.printf("Object x %.2f y %.2f z %.2f\n", objX, objY, objZ);
|
||||
|
||||
// We expect the object X axis to be to the right, or negative-Y in world space
|
||||
// We expect the object X to be forward, or -X in world space
|
||||
Assertions.assertEquals(
|
||||
-1, new Translation3d(1, 0, 0).rotateBy(pose.getRotation()).getY(), 0.08);
|
||||
// We expect the object Y axis to be up, or +Z in world space
|
||||
-1, new Translation3d(1, 0, 0).rotateBy(pose.getRotation()).getX(), 0.1);
|
||||
// We expect the object Y axis to be right, or negative-Y in world space
|
||||
Assertions.assertEquals(
|
||||
1, new Translation3d(0, 1, 0).rotateBy(pose.getRotation()).getZ(), 0.08);
|
||||
// We expect the object Z axis to towards the camera, or negative-X in world space
|
||||
Assertions.assertEquals(
|
||||
-1, new Translation3d(0, 0, 1).rotateBy(pose.getRotation()).getX(), 0.08);
|
||||
-1, new Translation3d(0, 1, 0).rotateBy(pose.getRotation()).getY(), 0.1);
|
||||
// We expect the object Z axis to be up, or +Z in world space
|
||||
Assertions.assertEquals(1, new Translation3d(0, 0, 1).rotateBy(pose.getRotation()).getZ(), 0.1);
|
||||
}
|
||||
|
||||
private static void printTestResults(CVPipelineResult pipelineResult) {
|
||||
|
||||
Reference in New Issue
Block a user