Package org.photonvision
Enum Class PhotonPoseEstimator.PoseStrategy
- All Implemented Interfaces:
Serializable
,Comparable<PhotonPoseEstimator.PoseStrategy>
,Constable
- Enclosing class:
- PhotonPoseEstimator
Position estimation strategies that can be used by the
PhotonPoseEstimator
class.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturn the average of the best target poses using ambiguity as weight.Choose the Pose which is closest to the camera height.Choose the Pose which is closest to the last pose calculatedChoose the Pose which is closest to a set Reference position.Solve a constrained version of the Perspective-n-Point problem with the robot's drivebase flat on the floor.Choose the Pose with the lowest ambiguity.Use all visible tags to compute a single pose estimate on coprocessor.Use all visible tags to compute a single pose estimate.Use distance data from best visible tag to compute a Pose. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static PhotonPoseEstimator.PoseStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LOWEST_AMBIGUITY
Choose the Pose with the lowest ambiguity. -
CLOSEST_TO_CAMERA_HEIGHT
Choose the Pose which is closest to the camera height. -
CLOSEST_TO_REFERENCE_POSE
Choose the Pose which is closest to a set Reference position. -
CLOSEST_TO_LAST_POSE
Choose the Pose which is closest to the last pose calculated -
AVERAGE_BEST_TARGETS
Return the average of the best target poses using ambiguity as weight. -
MULTI_TAG_PNP_ON_COPROCESSOR
Use all visible tags to compute a single pose estimate on coprocessor. This option needs to be enabled on the PhotonVision web UI as well. -
MULTI_TAG_PNP_ON_RIO
Use all visible tags to compute a single pose estimate. This runs on the RoboRIO, and can take a lot of time. -
PNP_DISTANCE_TRIG_SOLVE
Use distance data from best visible tag to compute a Pose. This runs on the RoboRIO in order to access the robot's yaw heading, and MUST have addHeadingData called every frame so heading data is up-to-date.Yields a Pose2d in estimatedRobotPose (0 for z, roll, pitch)
https://www.chiefdelphi.com/t/frc-6328-mechanical-advantage-2025-build-thread/477314/98
-
CONSTRAINED_SOLVEPNP
Solve a constrained version of the Perspective-n-Point problem with the robot's drivebase flat on the floor. This computation takes place on the RoboRIO, and typically takes not more than 2ms. SeePhotonPoseEstimator.ConstrainedSolvepnpParams
andConstrainedSolvepnpJni
for details and tuning handles this strategy exposes. This strategy needs addHeadingData called every frame so heading data is up-to-date. If Multi-Tag PNP is enabled on the coprocessor, it will be used to provide an initial seed to the optimization algorithm -- otherwise, the multi-tag fallback strategy will be used as the seed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-