AprilTagData

data class AprilTagData(val id: Int, val hamming: Int, val decisionMargin: Float, val center: Point, val corners: List<Point>, val metadata: Optional<AprilTagMetadata>, val ftcPose: Optional<AprilTagPoseFtc>, val robotPose: Optional<Pose3D>, val rawPose: Optional<AprilTagPoseRaw>, val frameAcquisitionNanoTime: Long) : VisionData

Utility data structure for AprilTag Detections.

Since

1.0.0-pre

Constructors

Link copied to clipboard
constructor(id: Int, hamming: Int, decisionMargin: Float, center: Point, corners: List<Point>, metadata: Optional<AprilTagMetadata>, ftcPose: Optional<AprilTagPoseFtc>, robotPose: Optional<Pose3D>, rawPose: Optional<AprilTagPoseRaw>, frameAcquisitionNanoTime: Long)

Properties

Link copied to clipboard
val center: Point

The image pixel coordinates of the center of the tag.

Link copied to clipboard
val corners: List<Point>

The image pixel coordinates of the corners of the tag.

Link copied to clipboard

How much margin remains before the detector would decide to reject a tag.

Link copied to clipboard

Timestamp of when the image in which this detection was found was acquired.

Link copied to clipboard
val ftcPose: Optional<AprilTagPoseFtc>

6DOF pose data formatted in useful ways for FTC gameplay. Optional value may be null depending on the used AprilTag Library. Units from this pose will be in inches and degrees.

Link copied to clipboard

The number of bits corrected when reading the tag ID payload.

Link copied to clipboard
val id: Int

AprilTag ID.

Link copied to clipboard
val metadata: Optional<AprilTagMetadata>

Metadata pertaining to this AprilTag as specified by the FTC SDK. Optional value may be null depending on the used AprilTag Library.

Link copied to clipboard
val rawPose: Optional<AprilTagPoseRaw>

Raw translation vector and orientation matrix returned by the pose solver. Optional value may be null depending on the used AprilTag Library. This is the backing pose that ftcPose uses internally.

Link copied to clipboard
val robotPose: Optional<Pose3D>

Robot pose data returned by the pose solver calculated via the robot pose offset (set via the builder). Optional value may be null depending on the used AprilTag Library.

Functions

Link copied to clipboard

Check if this AprilTag has metadata and pose information available, as it is present in the currently used library.