Record Class PhotonPoseEstimator.ConstrainedSolvepnpParams
java.lang.Object
java.lang.Record
org.photonvision.PhotonPoseEstimator.ConstrainedSolvepnpParams
- Record Components:
headingFree- If true, heading is completely free to vary. If false, heading excursions from the provided heading measurement will be penalizedheadingScaleFactor- If headingFree is false, this weights the cost of changing our robot heading estimate against the tag corner reprojection error cost.
- Enclosing class:
PhotonPoseEstimator
public static record PhotonPoseEstimator.ConstrainedSolvepnpParams(boolean headingFree, double headingScaleFactor)
extends Record
Tuning handles we have over the CONSTRAINED_SOLVEPNP
PhotonPoseEstimator.PoseStrategy.
Internally, the cost function is a sum-squared of pixel reprojection error + (optionally)
heading error * heading scale factor.-
Constructor Summary
ConstructorsConstructorDescriptionConstrainedSolvepnpParams(boolean headingFree, double headingScaleFactor) Creates an instance of aConstrainedSolvepnpParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theheadingFreerecord component.doubleReturns the value of theheadingScaleFactorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConstrainedSolvepnpParams
Creates an instance of aConstrainedSolvepnpParamsrecord class.- Parameters:
headingFree- the value for theheadingFreerecord componentheadingScaleFactor- the value for theheadingScaleFactorrecord 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 with thecomparemethod from their corresponding wrapper classes. -
headingFree
Returns the value of theheadingFreerecord component.- Returns:
- the value of the
headingFreerecord component
-
headingScaleFactor
Returns the value of theheadingScaleFactorrecord component.- Returns:
- the value of the
headingScaleFactorrecord component
-