Camera

interface Camera

Common interface for all vision cameras (PhotonVision, Limelight, etc.).

Provides a unified API for accessing vision data regardless of the underlying camera implementation.

Implementations:

Inheritors

Properties

Link copied to clipboard
abstract val name: String

The name of this camera.

Functions

Link copied to clipboard

Gets all unprocessed vision measurements since the last call.

Link copied to clipboard
abstract fun getDistanceToTag(tagId: Int? = null): Distance?

Gets the distance to a tag.

Link copied to clipboard
abstract fun getLatestMeasurement(referencePose: Pose2d? = null): VisionMeasurement?

Gets the latest vision measurement from the camera.

Link copied to clipboard
abstract fun getTargetHorizontalOffset(): Angle?

Gets the horizontal offset to the currently tracked target.

Link copied to clipboard
abstract fun getTargetVerticalOffset(): Angle?

Gets the vertical offset to the currently tracked target.

Link copied to clipboard
abstract fun hasTarget(): Boolean

Checks if the camera currently sees any valid targets.