Skip to content

Commit

Permalink
tag layout as field
Browse files Browse the repository at this point in the history
  • Loading branch information
amquake committed Oct 25, 2023
1 parent cfcc120 commit f2cbc90
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package org.photonvision.simulation;

import edu.wpi.first.apriltag.AprilTagFieldLayout;
import edu.wpi.first.apriltag.AprilTagFields;
import edu.wpi.first.cameraserver.CameraServer;
import edu.wpi.first.cscore.CvSource;
Expand Down Expand Up @@ -81,6 +82,8 @@ public class PhotonCameraSim implements AutoCloseable {
private double minTargetAreaPercent;
private PhotonTargetSortMode sortMode = PhotonTargetSortMode.Largest;

private AprilTagFieldLayout tagLayout = AprilTagFields.kDefaultField.loadAprilTagLayoutField();

// video stream simulation
private final CvSource videoSimRaw;
private final Mat videoSimFrameRaw = new Mat();
Expand Down Expand Up @@ -532,7 +535,6 @@ public PhotonPipelineResult process(
var multitagResults = new MultiTargetPNPResults();
// TODO: Implement ATFL subscribing in backend
// var tagLayout = cam.getAprilTagFieldLayout();
var tagLayout = AprilTagFields.kDefaultField.loadAprilTagLayoutField();
var visibleLayoutTags = VisionEstimation.getVisibleLayoutTags(detectableTgts, tagLayout);
if (visibleLayoutTags.size() > 1) {
List<Integer> usedIDs =
Expand Down

0 comments on commit f2cbc90

Please sign in to comment.