Change from k2024Crescendo to kDefaultField for AprilTagFieldLayout (#1667)

This reduces the things we need to update each year

Signed-off-by: Jade Turner <spacey-sooty@proton.me>
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
Jade
2025-01-03 22:03:00 +08:00
committed by GitHub
parent 09a741f540
commit 7c254ec5dc
8 changed files with 10 additions and 10 deletions

View File

@@ -17,12 +17,12 @@ The API documentation can be found in here: [Java](https://github.wpilib.org/all
.. code-block:: Java
// The field from AprilTagFields will be different depending on the game.
AprilTagFieldLayout aprilTagFieldLayout = AprilTagFields.k2024Crescendo.loadAprilTagLayoutField();
AprilTagFieldLayout aprilTagFieldLayout = AprilTagFieldLayout.loadField(AprilTagFields.kDefaultField);
.. code-block:: C++
// The parameter for LoadAPrilTagLayoutField will be different depending on the game.
frc::AprilTagFieldLayout aprilTagFieldLayout = frc::LoadAprilTagLayoutField(frc::AprilTagField::k2024Crescendo);
frc::AprilTagFieldLayout aprilTagFieldLayout = frc::LoadAprilTagLayoutField(frc::AprilTagField::kDefaultField);
.. code-block:: Python
@@ -91,7 +91,7 @@ The PhotonPoseEstimator has a constructor that takes an `AprilTagFieldLayout` (s
self.cam = PhotonCamera("YOUR CAMERA NAME")
self.camPoseEst = PhotonPoseEstimator(
loadAprilTagLayoutField(AprilTagField.k2024Crescendo),
loadAprilTagLayoutField(AprilTagField.kDefaultField),
PoseStrategy.CLOSEST_TO_REFERENCE_POSE,
self.cam,
kRobotToCam

View File

@@ -103,7 +103,7 @@ For convenience, an `AprilTagFieldLayout` can also be added to automatically cre
.. code-block:: Java
// The layout of AprilTags which we want to add to the vision system
AprilTagFieldLayout tagLayout = AprilTagFieldLayout.loadFromResource(AprilTagFields.k2024Crescendo.m_resourceFile);
AprilTagFieldLayout tagLayout = AprilTagFieldLayout.loadFromResource(AprilTagFields.kDefaultField.m_resourceFile);
visionSim.addAprilTags(tagLayout);
```