mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user