Class OrinCameraInputs
java.lang.Object
frc.robot.subsystems.vision.OrinCameraInputs
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptiondouble[]Camera matrix, row-major 3x3; empty until the camera has connected.booleanPhotonLib'sisConnected(): the camera's heartbeat is on NetworkTables.double[]Distortion coefficients (the Jetson sends all 8); empty until connected.booleanPhotonLib'sgetEnabled(): false while turned off withsetEnabled(false).longdoublelongdoubledoubledoublelongdoubledoubledoubledoubledoubledoubledoubledoubledoubledoublelongintThe pipeline the camera reports running.intResults PhotonLib failed to read this loop (PhotonVision #2528); they were dropped.intResults the camera sent this loop, including any not logged inresults: 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).byte[][]SerializedPhotonPipelineResults, oldest first./photonvision/<camera>/settingsJson(section 11a); written to the log on change. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the per-loop fields before a read.voidvoid
-
Field Details
-
connected
public boolean connectedPhotonLib'sisConnected(): the camera's heartbeat is on NetworkTables. -
enabled
public boolean enabledPhotonLib'sgetEnabled(): false while turned off withsetEnabled(false). -
pipelineIndex
public int pipelineIndexThe pipeline the camera reports running. -
results
public byte[][] resultsSerializedPhotonPipelineResults, oldest first. -
resultCount
public int resultCountResults the camera sent this loop, including any not logged inresults: 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 readFailuresResults PhotonLib failed to read this loop (PhotonVision #2528); they were dropped. -
cameraMatrix
public double[] cameraMatrixCamera matrix, row-major 3x3; empty until the camera has connected. -
distCoeffs
public double[] distCoeffsDistortion 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
/photonvision/<camera>/settingsJson(section 11a); written to the log on change.
-
-
Constructor Details
-
OrinCameraInputs
public OrinCameraInputs()
-
-
Method Details
-
clearResults
public void clearResults()Clears the per-loop fields before a read. -
toLog
- Specified by:
toLogin interfaceLoggableInputs
-
fromLog
- Specified by:
fromLogin interfaceLoggableInputs
-