Files
allwpilib/apriltag
Gold856 97d0b15f7d Add README files for some subprojects and update various other docs (#8640)
Adds a section on design philosophy so we have something to point to
when people suggest features that aren't compatible with the way WPILib
is designed. Fixes some missed reorg changes (although the native-utils
link intentionally points to main as to be up-to-date in the future) and
generally cleans up any outdated information. Also includes wording
about supporting FTC. Per discussion in Slack, the LabVIEW wording has
been removed, and anything to do with LabVIEW is going to have to be
NI's job. And pursuant to #2757 and #5331, additional (light) developer
documentation has been added to some subprojects, mostly being a quick
summary of the what the project does and what it's for (or not for).

---------

Co-authored-by: sciencewhiz <sciencewhiz@users.noreply.github.com>
Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
2026-04-26 16:39:26 -07:00
..

AprilTag

A C++ wrapper around the University of Michigan's AprilTag detector, alongside a vendored copy of their code with some patches (patches are located in upstream_utils).

Adding new field to AprilTagFields

Adding field JSON

  1. Add a field layout CSV file to src/main/native/resources/org/wpilib/vision/apriltag
    1. See docstring in convert_apriltag_layouts.py for more
  2. Run convert_apriltag_layouts.py in the same directory as this readme to generate the JSON
  3. That script overwrites all generated JSONs, so undo undesired changes if necessary
  4. Update the field dimensions at the bottom of the JSON
    1. Length should be in meters from alliance wall to alliance wall
    2. Width should be in meters from inside guardrail plastic to plastic

Java updates

  1. Update src/main/java/org/wpilib/vision/apriltag/AprilTagFields.java
    1. Add enum value for new field to AprilTagFields
    2. Update AprilTagFields.kDefaultField if necessary

C++ updates

  1. Update src/main/native/include/wpi/apriltag/AprilTagFields.hpp
    1. Add enum value for new field to AprilTagFields
    2. Update AprilTagFields::kDefaultField if necessary
  2. Update src/main/native/cpp/AprilTagFieldLayout.cpp
    1. Add resource getter prototype like std::string_view GetResource_2024_crescendo_json()
    2. Add case for new field to switch in LoadField(AprilTagField field)