Files
allwpilib/apriltag
PJ Reiniger 51a3876330 [robotpy] Build examples (#8629)
This hooks up the bazel build to the robotpyExamples. It can use the
(formly pyfrc or whatever) automatic unit tests for an example, as well
as exposing the ability to run the example in simulation, with or
without `halsim_gui` with a command such as `bazel run
//robotpyExamples:AddressableLED-sim`

This required building and using wheels instead of just a normal
`py_library`, so that things like `ENTRY_POINTS` can be used. I took a
bare bones approach to building and naming the wheels (for example the
native ones don't have the OS info or python version in them, so they
wouldn't be suitable publish to pypi, but that can always be updated
later.
2026-03-05 23:18:37 -08:00
..
2026-03-04 22:09:40 -07:00

AprilTag

Adding new field to AprilTagFields

Adding field JSON

  1. Add a field layout CSV file to src/main/native/resources/edu/wpi/first/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/edu/wpi/first/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/frc/apriltag/AprilTagFields.h
    1. Add enum value for new field to AprilTagFields
    2. Update AprilTagFields::kDefaultField if necessary
  2. Update src/main/native/cpp/AprilTagFields.cpp
    1. Add resource getter prototype like std::string_view GetResource_2024_crescendo_json()
    2. Add case for new field to switch in LoadAprilTagLayoutField()