mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
[photon-targeting][photon-lib] Add tests to the targeting classes and cleanup photon-lib & photon-targeting (#1007)
* Make MultiTagPNPResult and PNPResult singular * add java tests * Formatting fixes * bring in the rest of the little stuff * final things * Formatting fixes * add multisubscriber back * Formatting fixes * make comments better about x and y relationship
This commit is contained in:
@@ -176,8 +176,7 @@ public class VisionSystemSim {
|
||||
*/
|
||||
public Optional<Pose3d> getCameraPose(PhotonCameraSim cameraSim, double timeSeconds) {
|
||||
var robotToCamera = getRobotToCamera(cameraSim, timeSeconds);
|
||||
if (robotToCamera.isEmpty()) return Optional.empty();
|
||||
return Optional.of(getRobotPose(timeSeconds).plus(robotToCamera.get()));
|
||||
return robotToCamera.map(transform3d -> getRobotPose(timeSeconds).plus(transform3d));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -405,6 +404,6 @@ public class VisionSystemSim {
|
||||
}
|
||||
}
|
||||
if (processed) dbgField.getObject("visibleTargetPoses").setPoses(visTgtPoses2d);
|
||||
if (cameraPoses2d.size() != 0) dbgField.getObject("cameras").setPoses(cameraPoses2d);
|
||||
if (!cameraPoses2d.isEmpty()) dbgField.getObject("cameras").setPoses(cameraPoses2d);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user