Class Jetson
java.lang.Object
frc.robot.subsystems.vision.Jetson
The Jetson Orin as a whole: what the robot tells it, and what the robot checks about it before a
match. Issue #10, sections 4, 6, 7, 8a, 8f, 9, 11 and 12.
- Rewind (8a): with the FMS attached, records from enable until 10 s after the last
disable, so a match is one recording (auto, the gap and teleop), named
<event>-Q12-r0. Without the FMS it leavesrecordalone unless the dashboard's manual switch changes, so bench tests can drive it themselves. - Clock (6): the robot's wall clock every loop, for the Jetson's dates.
- Excluded tags (11b, 12): a dashboard list, defaulting to the event config, published to the Jetson and also applied to single-tag solves.
- Profile (11c): one dashboard switch sets every camera to pipeline 0 (event) or 1 (practice field); event is the default, so a forgotten switch can't carry practice settings into a match.
- Alerts (7b, 8f, 9a, 9b): Jetson down, cameras out or slow, overheating, throttling, JPEG fallback, Rewind problems, stale timestamps, and a bumped camera mount.
Everything here reads logged inputs, and everything it sends goes through JetsonIO or
OrinCameraIO, which are no-ops in replay.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne configured Orin camera, asJetsonsees it. -
Constructor Summary
ConstructorsConstructorDescriptionJetson(JetsonIO io, List<Jetson.Camera> cameras, int[] defaultExcludedTags, BooleanSupplier expectJetson) -
Method Summary
Modifier and TypeMethodDescriptionThe configured Orin cameras.booleanWhether the Jetson should answer: installed, on a real robot or a replay of one.booleanWhether the dashboard has the Orin cameras on the practice-field pipeline.booleanWhether the Jetson's heartbeat is ticking.voidperiodic(boolean robotStill) Sends the Jetson this loop's commands and updates the alerts.voidpublishFieldMap(String name, String hash, String json) Publishes the robot's field map for the Jetson to load (once, at boot).booleantimestampsLookWrong(String camera) Whether a camera's result timestamps have been far from now (a time-sync problem).voidReads the Jetson.
-
Constructor Details
-
Jetson
public Jetson(JetsonIO io, List<Jetson.Camera> cameras, int[] defaultExcludedTags, BooleanSupplier expectJetson) - Parameters:
io- the Jetson (JetsonIO.NONEin replay)cameras- the Orin camerasdefaultExcludedTags- the event's bad tags, until changed on the dashboardexpectJetson- whether the Jetson should be there (installed, and a real robot or a replay of one)
-
-
Method Details
-
isExpected
public boolean isExpected()Whether the Jetson should answer: installed, on a real robot or a replay of one. -
isPracticeFieldProfile
public boolean isPracticeFieldProfile()Whether the dashboard has the Orin cameras on the practice-field pipeline. -
isResponding
public boolean isResponding()Whether the Jetson's heartbeat is ticking. -
getCameras
The configured Orin cameras. -
timestampsLookWrong
Whether a camera's result timestamps have been far from now (a time-sync problem). -
publishFieldMap
-
updateInputs
public void updateInputs()Reads the Jetson. Call before the Orin sources update, so they see this loop's tag list. -
periodic
public void periodic(boolean robotStill) Sends the Jetson this loop's commands and updates the alerts.- Parameters:
robotStill- whether the robot is still enough for the mount check
-
getInputs
-
getExcludedTags
-