distance To Tag
fun Pose2d.distanceToTag(tagId: Int, fieldLayout: AprilTagFieldLayout = AprilTagFields.kDefaultField.layout): Distance?
Calculates the distance from a robot pose to a specific AprilTag.
Receiver
Pose2d The robot's current pose.
Return
Distance The distance to the tag, or null if the tag doesn't exist.
Parameters
tag Id
The AprilTag ID to calculate distance to.
field Layout
The field layout containing tag positions.