Class OrinCameraInputs

java.lang.Object
frc.robot.subsystems.vision.OrinCameraInputs
All Implemented Interfaces:
LoggableInputs

public class OrinCameraInputs extends Object implements LoggableInputs
Everything one Orin (Jetson + PhotonVision) camera reported since the last loop, as an AdvantageKit input: the raw PhotonLib results plus the Jetson's per-camera topics.

The results are logged as PhotonLib's own serialized bytes ( PhotonPipelineResult.photonStruct), one entry per result, including results with no targets (about 40 bytes; they show the frame rate and dropouts). OrinSolver turns them into pose observations from these inputs alone, so replay re-runs the whole Orin pipeline: a log recorded with placeholder mounts can be re-solved with measured ones.

Logged under /Vision/Orin/<camera>/.... Issue #10, sections 2, 7a, 9, 11a.

  • Field Details

    • connected

      public boolean connected
      PhotonLib's isConnected(): the camera's heartbeat is on NetworkTables.
    • enabled

      public boolean enabled
      PhotonLib's getEnabled(): false while turned off with setEnabled(false).
    • pipelineIndex

      public int pipelineIndex
      The pipeline the camera reports running.
    • results

      public byte[][] results
      Serialized PhotonPipelineResults, oldest first.
    • resultCount

      public int resultCount
      Results the camera sent this loop, including any not logged in results: while the robot is disabled only the newest result with targets is kept, at 10 Hz, to keep the log small (the Orin feeds neither the pose nor the seed while disabled). Frame rate and the no-frames alert use this count.
    • readFailures

      public int readFailures
      Results PhotonLib failed to read this loop (PhotonVision #2528); they were dropped.
    • cameraMatrix

      public double[] cameraMatrix
      Camera matrix, row-major 3x3; empty until the camera has connected.
    • distCoeffs

      public double[] distCoeffs
      Distortion coefficients (the Jetson sends all 8); empty until connected.
    • healthFps

      public double healthFps
    • healthPipelineMs

      public double healthPipelineMs
    • healthPipelineMsMax

      public double healthPipelineMsMax
    • healthLatencyMs

      public double healthLatencyMs
    • healthFrames

      public long healthFrames
    • healthDecodeFailures

      public long healthDecodeFailures
    • healthRecoveries

      public long healthRecoveries
    • mountHeightM

      public double mountHeightM
    • mountPitchDeg

      public double mountPitchDeg
    • mountRollDeg

      public double mountRollDeg
    • mountHeightStdM

      public double mountHeightStdM
    • mountPitchStdDeg

      public double mountPitchStdDeg
    • mountRollStdDeg

      public double mountRollStdDeg
    • mountFieldXM

      public double mountFieldXM
    • mountFieldYM

      public double mountFieldYM
    • mountFieldYawDeg

      public double mountFieldYawDeg
    • mountReprojErrorPx

      public double mountReprojErrorPx
    • mountSamples

      public long mountSamples
    • settingsJson

      public String settingsJson
      /photonvision/<camera>/settingsJson (section 11a); written to the log on change.
  • Constructor Details

    • OrinCameraInputs

      public OrinCameraInputs()
  • Method Details