Class JetsonNTIO

java.lang.Object
frc.robot.subsystems.vision.JetsonNTIO
All Implemented Interfaces:
JetsonIO

public class JetsonNTIO extends Object implements JetsonIO
The Jetson's NetworkTables topics under /photonvision (SpectrumJetson docs/TECHNICAL.md and docs/REWIND.md). Numbers are read generically because the Jetson publishes some as double and some as integer.
  • Field Summary

    Fields inherited from interface JetsonIO

    NONE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    publishFieldMap(String name, String hash, String json)
    Publishes the robot's AprilTag field map under /SpectrumVision/FieldMap/, for the Jetson to load and to report back the hash of what it loaded.
    void
    At 1 Hz: the value changes every millisecond, so NetworkTables would send every call, and the Jetson only needs it fresher than 5 s.
    void
    setExcludedTags(long[] tagIds)
    Publishes the tags every camera's multi-tag solve should ignore ( /photonvision/excludedTags, sections 11b and 12).
    void
    setRewind(boolean record, String label)
    Sets Rewind's recording name and whether it records.
    void
    Fills inputs with the Jetson's latest values.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JetsonNTIO

      public JetsonNTIO()
  • Method Details

    • updateInputs

      public void updateInputs(JetsonInputs inputs)
      Description copied from interface: JetsonIO
      Fills inputs with the Jetson's latest values.
      Specified by:
      updateInputs in interface JetsonIO
      Parameters:
      inputs - the inputs to overwrite
    • setRewind

      public void setRewind(boolean record, String label)
      Description copied from interface: JetsonIO
      Sets Rewind's recording name and whether it records. The label is published first: the Jetson reads it when a recording starts (issue #10, section 4).
      Specified by:
      setRewind in interface JetsonIO
      Parameters:
      record - record while true
      label - recording name; empty lets the Jetson name it
    • publishRobotClock

      public void publishRobotClock()
      At 1 Hz: the value changes every millisecond, so NetworkTables would send every call, and the Jetson only needs it fresher than 5 s.
      Specified by:
      publishRobotClock in interface JetsonIO
    • setExcludedTags

      public void setExcludedTags(long[] tagIds)
      Description copied from interface: JetsonIO
      Publishes the tags every camera's multi-tag solve should ignore ( /photonvision/excludedTags, sections 11b and 12).
      Specified by:
      setExcludedTags in interface JetsonIO
      Parameters:
      tagIds - tag ids to exclude
    • publishFieldMap

      public void publishFieldMap(String name, String hash, String json)
      Description copied from interface: JetsonIO
      Publishes the robot's AprilTag field map under /SpectrumVision/FieldMap/, for the Jetson to load and to report back the hash of what it loaded.
      Specified by:
      publishFieldMap in interface JetsonIO
      Parameters:
      name - the WPILib field's name, or "custom"
      hash - the canonical hash (FieldMapHash)
      json - the layout as WPILib AprilTagFieldLayout JSON