Class AprilTagVisionIOSim

java.lang.Object
com.marslib.vision.AprilTagVisionIOSim
All Implemented Interfaces:
AprilTagVisionIO

public class AprilTagVisionIOSim extends Object implements AprilTagVisionIO
Desktop simulation implementation of AprilTagVisionIO using PhotonVision's simulation framework.

Renders synthetic camera views of the AprilTag field layout from the robot's true pose, injecting realistic calibration error, latency, and optional occlusion dropout to stress-test the pose estimator fusion pipeline without physical hardware.

  • Field Details

    • enableOcclusion

      public boolean enableOcclusion
    • occlusionDropProbability

      public double occlusionDropProbability
  • Constructor Details

    • AprilTagVisionIOSim

      public AprilTagVisionIOSim(String cameraName, edu.wpi.first.math.geometry.Transform3d robotToCamera, Supplier<edu.wpi.first.math.geometry.Pose3d> poseSupplier)
  • Method Details

    • resetSimulation

      public static void resetSimulation()
      Resets the shared VisionSystemSim singleton. Must be called in test @BeforeEach to prevent stale camera state from leaking between test classes.
    • updateInputs

      public void updateInputs(AprilTagVisionIO.AprilTagVisionIOInputs inputs)
      Specified by:
      updateInputs in interface AprilTagVisionIO