Class PnpResult
java.lang.Object
org.photonvision.targeting.PnpResult
- All Implemented Interfaces:
PhotonStructSerializable<PnpResult>, org.wpilib.util.protobuf.ProtobufSerializable, org.wpilib.util.WPISerializable
public class PnpResult
extends Object
implements org.wpilib.util.protobuf.ProtobufSerializable, PhotonStructSerializable<PnpResult>
The best estimated transformation from solvePnP, and possibly an alternate transformation
depending on the solvePNP method. If an alternate solution is present, the ambiguity value
represents the ratio of reprojection error in the best solution to the alternate (best /
alternate).
Note that the coordinate frame of these transforms depends on the implementing solvePnP method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.wpilib.math.geometry.Transform3dAlternate, ambiguous solution from solvepnp.doubleIf no alternate solution is found, this is bestReprojErrdoubleIf no alternate solution is found, this is 0org.wpilib.math.geometry.Transform3dThe best-fit transform.doubleReprojection error of the best solution, in pixelsstatic final PnpResultSerdePnpResult PhotonStruct for serialization.static final PNPResultProtoPnpResult protobuf for serialization. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
best
The best-fit transform. The coordinate frame of this transform depends on the method which gave this result. -
bestReprojErr
Reprojection error of the best solution, in pixels -
alt
Alternate, ambiguous solution from solvepnp. If no alternate solution is found, this is equal to the best solution. -
altReprojErr
If no alternate solution is found, this is bestReprojErr -
ambiguity
If no alternate solution is found, this is 0 -
proto
PnpResult protobuf for serialization. -
photonStruct
PnpResult PhotonStruct for serialization.
-
-
Constructor Details
-
Method Details
-
hashCode
-
equals
-
toString
-
getSerde
Description copied from interface:PhotonStructSerializableReturns the PhotonStruct serializer for this type.- Specified by:
getSerdein interfacePhotonStructSerializable<PnpResult>- Returns:
- The PhotonStruct serializer
-