getDistanceToTag

abstract fun getDistanceToTag(tagId: Int? = null): Distance?

Gets the distance to a tag.

Return

Distance to the tag, or null if no matching tag is visible.

Parameters

tagId

Optional AprilTag ID. If provided, returns distance to that specific tag. If null, returns distance to the best/closest visible tag.