From 77a649bedbddf7f808c9eb51128be109c2525416 Mon Sep 17 00:00:00 2001 From: Julius <74841960+JuliusZhou124@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:42:52 -0800 Subject: [PATCH 1/3] Cleanup Docs for PhotonPoseEstimator --- .../docs/programming/photonlib/robot-pose-estimator.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/source/docs/programming/photonlib/robot-pose-estimator.md b/docs/source/docs/programming/photonlib/robot-pose-estimator.md index f0e3e6ccad..b1e14865e2 100644 --- a/docs/source/docs/programming/photonlib/robot-pose-estimator.md +++ b/docs/source/docs/programming/photonlib/robot-pose-estimator.md @@ -32,7 +32,7 @@ The API documentation can be found in here: [Java](https://github.wpilib.org/all ## Creating a `PhotonPoseEstimator` -The PhotonPoseEstimator has a constructor that takes an `AprilTagFieldLayout` (see above), `PoseStrategy`, `PhotonCamera`, and `Transform3d`. `PoseStrategy` has six possible values: +The PhotonPoseEstimator has a constructor that takes an `AprilTagFieldLayout` (see above), `PoseStrategy`, `PhotonCamera`, and `Transform3d`. `PoseStrategy` has nine possible values: - MULTI_TAG_PNP_ON_COPROCESSOR - Calculates a new robot position estimate by combining all visible tag corners. Recommended for all teams as it will be the most accurate. @@ -155,3 +155,7 @@ Updates the stored reference pose when using the CLOSEST_TO_REFERENCE_POSE strat ### `setLastPose(Pose3d lastPose)` Update the stored last pose. Useful for setting the initial estimate when using the CLOSEST_TO_LAST_POSE strategy. + +### `public void addHeadingData(double timestampSeconds, Rotation3d heading)` + +Adds robot heading data to be stored in buffer. Must be called periodically with a proper timestamp for the PNP_DISTANCE_TRIG_SOLVE and CONSTRAINED_SOLVEPNP strategies From 3e3115a945636d4d75681493526628d4da9cbfe8 Mon Sep 17 00:00:00 2001 From: Julius <74841960+JuliusZhou124@users.noreply.github.com> Date: Sun, 2 Mar 2025 23:28:19 -0800 Subject: [PATCH 2/3] Update docs/source/docs/programming/photonlib/robot-pose-estimator.md Co-authored-by: Jade --- docs/source/docs/programming/photonlib/robot-pose-estimator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/docs/programming/photonlib/robot-pose-estimator.md b/docs/source/docs/programming/photonlib/robot-pose-estimator.md index b1e14865e2..f20fab1b37 100644 --- a/docs/source/docs/programming/photonlib/robot-pose-estimator.md +++ b/docs/source/docs/programming/photonlib/robot-pose-estimator.md @@ -156,6 +156,6 @@ Updates the stored reference pose when using the CLOSEST_TO_REFERENCE_POSE strat Update the stored last pose. Useful for setting the initial estimate when using the CLOSEST_TO_LAST_POSE strategy. -### `public void addHeadingData(double timestampSeconds, Rotation3d heading)` +### `addHeadingData(double timestampSeconds, Rotation3d heading)` Adds robot heading data to be stored in buffer. Must be called periodically with a proper timestamp for the PNP_DISTANCE_TRIG_SOLVE and CONSTRAINED_SOLVEPNP strategies From 7c8cb7f4692e2243d2a52edcaa40ccb92fff879c Mon Sep 17 00:00:00 2001 From: Julius <74841960+JuliusZhou124@users.noreply.github.com> Date: Sun, 2 Mar 2025 23:34:44 -0800 Subject: [PATCH 3/3] Change to Rotation2d --- docs/source/docs/programming/photonlib/robot-pose-estimator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/docs/programming/photonlib/robot-pose-estimator.md b/docs/source/docs/programming/photonlib/robot-pose-estimator.md index f20fab1b37..ac5342c646 100644 --- a/docs/source/docs/programming/photonlib/robot-pose-estimator.md +++ b/docs/source/docs/programming/photonlib/robot-pose-estimator.md @@ -156,6 +156,6 @@ Updates the stored reference pose when using the CLOSEST_TO_REFERENCE_POSE strat Update the stored last pose. Useful for setting the initial estimate when using the CLOSEST_TO_LAST_POSE strategy. -### `addHeadingData(double timestampSeconds, Rotation3d heading)` +### `addHeadingData(double timestampSeconds, Rotation2d heading)` Adds robot heading data to be stored in buffer. Must be called periodically with a proper timestamp for the PNP_DISTANCE_TRIG_SOLVE and CONSTRAINED_SOLVEPNP strategies