Class LibVisionIOPhotonVision

java.lang.Object
com.flarerobotics.lib.subsystem.vision.io.LibVisionIOPhotonVision
All Implemented Interfaces:
LibVisionIO
Direct Known Subclasses:
LibVisionIOPhotonVisionSim

public class LibVisionIOPhotonVision extends Object implements LibVisionIO
IO implementation for real PhotonVision hardware.
  • Field Details

    • m_camera

      public final org.photonvision.PhotonCamera m_camera
    • m_robotToCamera

      public final edu.wpi.first.math.geometry.Transform3d m_robotToCamera
  • Constructor Details

    • LibVisionIOPhotonVision

      public LibVisionIOPhotonVision(String name, edu.wpi.first.math.geometry.Transform3d robotToCamera)
      Constructs a new LibVisionIOPhotonVision.
      Parameters:
      name - The name of the camera.
      robotToCamera - The 3D position of the camera relative to the robot (the offset from the center).
  • Method Details

    • updateInputs

      public void updateInputs(LibVisionIO.VisionIOInputs inputs)
      Description copied from interface: LibVisionIO
      Updates the given vision inputs.
      Specified by:
      updateInputs in interface LibVisionIO
      Parameters:
      inputs - The inputs.
    • setPipeline

      public void setPipeline(int pipelineIndex)
      Description copied from interface: LibVisionIO
      Sets the current pipeline index.
      Specified by:
      setPipeline in interface LibVisionIO
      Parameters:
      pipelineIndex - The index.