Record Class VisionFrame
java.lang.Object
java.lang.Record
yall.VisionFrame
- Record Components:
result- The frame's targets.estimate- The robot pose estimated from the frame, if any.vendorRejection- Why the vendor's own filter rejected the estimate, if it did.vendorStdDevs- Standard deviations from the vendor, used instead of the filter's.
public record VisionFrame(VisionResult result, Optional<VisionPoseEstimate> estimate, Optional<String> vendorRejection, Optional<Matrix<N3,N1>> vendorStdDevs)
extends Record
One frame read from a camera, before the pose filter. Camera wrappers make these; robot code
reads
VisionResults and VisionPoseEstimates instead.-
Constructor Summary
ConstructorsConstructorDescriptionVisionFrame(VisionResult result, Optional<VisionPoseEstimate> estimate) A frame with no vendor filtering.VisionFrame(VisionResult result, Optional<VisionPoseEstimate> estimate, Optional<String> vendorRejection, Optional<Matrix<N3, N1>> vendorStdDevs) Creates an instance of aVisionFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.estimate()Returns the value of theestimaterecord component.final inthashCode()Returns a hash code value for this object.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevendorRejectionrecord component.Returns the value of thevendorStdDevsrecord component.
-
Constructor Details
-
VisionFrame
A frame with no vendor filtering.- Parameters:
result- The frame's targets.estimate- The robot pose estimated from the frame, if any.
-
VisionFrame
public VisionFrame(VisionResult result, Optional<VisionPoseEstimate> estimate, Optional<String> vendorRejection, Optional<Matrix<N3, N1>> vendorStdDevs) Creates an instance of aVisionFramerecord class.- Parameters:
result- the value for theresultrecord componentestimate- the value for theestimaterecord componentvendorRejection- the value for thevendorRejectionrecord componentvendorStdDevs- the value for thevendorStdDevsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
result
-
estimate
-
vendorRejection
Returns the value of thevendorRejectionrecord component.- Returns:
- the value of the
vendorRejectionrecord component
-
vendorStdDevs
Returns the value of thevendorStdDevsrecord component.- Returns:
- the value of the
vendorStdDevsrecord component
-