Class Limelight.PoseEstimate
java.lang.Object
com.limelightvision.Limelight.PoseEstimate
- Enclosing class:
Limelight
A robot pose estimate with the metadata needed for pose-estimator fusion.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleAverage area of contributing tags (percentage of image).doubleAverage distance to contributing tags in meters.intNumber of fielded tags.longThe frame index of the source camera.doubleTotal latency (capture + targeting) in milliseconds.org.wpilib.math.geometry.Pose2dThe fiducials visible in this frame.intOR of theLimelight.PoseEstimateConfigREJECT_* flags for every check this estimate failed.double[]Standard deviations [x, y, z, roll, pitch, yaw] reported by the camera.intCamera-reported botpose tag count, telemetry only.org.wpilib.math.linalg.Vector<org.wpilib.math.numbers.N3> Fusion-ready standard deviations [x meters, y meters, theta radians].doubleMax distance between contributing tags in meters.doubleLatency-compensated capture timestamp in the local NetworkTables timebase.Which pose estimate output this is (origin + algorithm). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the visible fiducials that contributed to pose estimation.booleanisMT2()Returns true if this estimate was produced by the MegaTag2 algorithm.booleanisValid()Returns true if at least one fielded tag produced this estimate and no check rejected it.toString()
-
Field Details
-
pose
public org.wpilib.math.geometry.Pose2d pose -
timestampSeconds
public double timestampSecondsLatency-compensated capture timestamp in the local NetworkTables timebase. Pass this value directly toaddVisionMeasurementin WPILib. -
latencyMillis
public double latencyMillisTotal latency (capture + targeting) in milliseconds. -
reportedTagCount
public int reportedTagCountCamera-reported botpose tag count, telemetry only. -
fieldedTagCount
public int fieldedTagCountNumber of fielded tags. Used for validity, filtering, and standard deviation scaling -
tagSpanMeters
public double tagSpanMetersMax distance between contributing tags in meters. -
avgTagDistanceMeters
public double avgTagDistanceMetersAverage distance to contributing tags in meters. -
avgTagAreaPercent
public double avgTagAreaPercentAverage area of contributing tags (percentage of image). -
stdDevs
public org.wpilib.math.linalg.Vector<org.wpilib.math.numbers.N3> stdDevsFusion-ready standard deviations [x meters, y meters, theta radians]. TheLimelight.PoseEstimateConfigof this camera computes them from tag distance and tag count. Pass this value as the third argument toaddVisionMeasurement. -
reportedStdDevs
public double[] reportedStdDevsStandard deviations [x, y, z, roll, pitch, yaw] reported by the camera. The camera averages them over a long window. Use them for telemetry only. Do not give them to a pose estimator. UsestdDevsinstead. -
rawFiducials
The fiducials visible in this frame. -
type
Which pose estimate output this is (origin + algorithm). -
frameIndex
public long frameIndexThe frame index of the source camera. Estimates from the same camera with the same index came from one frame. Do not fuse more than one pose type from one frame. The index can reset when the camera restarts. -
rejectionFlags
public int rejectionFlagsOR of theLimelight.PoseEstimateConfigREJECT_* flags for every check this estimate failed. 0 = accepted. Decode withLimelight.PoseEstimateConfig.describeRejection(int). The flags reflect the filter configured for the algorithm of this estimate.
-
-
Constructor Details
-
PoseEstimate
public PoseEstimate()
-
-
Method Details
-
getFieldedFiducials
Returns the visible fiducials that contributed to pose estimation.- Returns:
- The visible fiducials that contributed to pose estimation. These have
Limelight.FiducialTarget.fieldedset
-
isMT2
public boolean isMT2()Returns true if this estimate was produced by the MegaTag2 algorithm.- Returns:
- True if this estimate was produced by the MegaTag2 algorithm
-
isValid
public boolean isValid()Returns true if at least one fielded tag produced this estimate and no check rejected it.- Returns:
- True if at least one fielded tag produced this estimate and no check rejected it. This does not show current camera health. It does not show whether the frame was already read.
-
toString
-