VisionMeasurement

data class VisionMeasurement(val pose: Pose2d, val timestamp: Time, val targetsUsed: Int, val stdDevs: Matrix<N3, N1>, val averageTagDistance: Distance = Units.Meters.of(0.0), val ambiguity: Double = 0.0)

Represents a vision measurement from a camera.

Contains the estimated robot pose, timestamp, number of targets used, and standard deviations for pose estimation accuracy.

Constructors

Link copied to clipboard
constructor(pose: Pose2d, timestamp: Time, targetsUsed: Int, stdDevs: Matrix<N3, N1>, averageTagDistance: Distance = Units.Meters.of(0.0), ambiguity: Double = 0.0)

Properties

Link copied to clipboard

The pose ambiguity (0.0 = perfect, higher = more ambiguous, unitless).

Link copied to clipboard
val averageTagDistance: Distance

The average distance to all visible tags.

Link copied to clipboard
val pose: Pose2d

The estimated robot pose on the field.

Link copied to clipboard
val stdDevs: Matrix<N3, N1>

The standard deviations for x, y, and theta (rotation).

Link copied to clipboard

The number of AprilTags or targets used for this estimate.

Link copied to clipboard
val timestamp: Time

The timestamp of the measurement.

Link copied to clipboard

Gets the timestamp in seconds for backward compatibility.