Skip to content

Commit f499e4f

Browse files
authored
[NFC] Invert AprilTag family default (#2124)
## Description Switch default tag family used in AprilTag pipeline. We already functionally changed the default in #1333 but since 2024 FIRST appears to have been using 36h11 so switching here seems to make sense as well. ## Meta Merge checklist: - [ ] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [x] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added --------- Signed-off-by: Jade Turner <[email protected]>
1 parent e5c8859 commit f499e4f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

photon-core/src/main/java/org/photonvision/vision/pipeline/AprilTagPipeline.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ protected void setPipeParamsImpl() {
7373
settings.threads = Math.max(1, settings.threads);
7474

7575
// for now, hard code tag width based on enum value
76-
// 2023/other: best guess is 6in
77-
double tagWidth = Units.inchesToMeters(6);
78-
TargetModel tagModel = TargetModel.kAprilTag16h5;
79-
if (settings.tagFamily == AprilTagFamily.kTag36h11) {
80-
// 2024 tag, 6.5in
81-
tagWidth = Units.inchesToMeters(6.5);
82-
tagModel = TargetModel.kAprilTag36h11;
76+
// From 2024 best guess is 6.5
77+
double tagWidth = Units.inchesToMeters(6.5);
78+
TargetModel tagModel = TargetModel.kAprilTag36h11;
79+
if (settings.tagFamily == AprilTagFamily.kTag16h5) {
80+
// 2023 tag, 6in
81+
tagWidth = Units.inchesToMeters(6);
82+
tagModel = TargetModel.kAprilTag16h5;
8383
}
8484

8585
var config = new AprilTagDetector.Config();

photon-core/src/test/java/org/photonvision/vision/pipeline/AprilTagTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ public void testApriltagDistorted() {
109109
pipeline.getSettings().solvePNPEnabled = true;
110110
pipeline.getSettings().cornerDetectionAccuracyPercentage = 4;
111111
pipeline.getSettings().cornerDetectionUseConvexHulls = true;
112-
pipeline.getSettings().targetModel = TargetModel.kAprilTag6p5in_36h11;
113112
pipeline.getSettings().tagFamily = AprilTagFamily.kTag16h5;
114113

115114
var frameProvider =

0 commit comments

Comments
 (0)