class frc_apriltags.NetworkCommunications

Bases: object

Use this class to communicate with the RoboRio over NetworkTables.

enableLogging()

Enables logging for this class.

setBestResult(result)

Sends the best result over NetworkTables. This method will send [tagId, xTranslate, yTranslate, zTranslate, yaw, pitch, roll]. All translation data is in meters. All rotation data is in radians.

Parameters:

result – The result generated by the Detector class.

setBestResultId(id: int)

Sets the tag id of the best result.

Parameters:

id – The AprilTag’s id.

setDetectionTimeSec(timeSec: float)

Sets the time when a detection was made.

Parameters:

timeSec – The current time in seconds.

setTargetValid(tv: bool)

Sets if a valid target was detected.

Parameters:

tv – Is the target valid?