Can anyone point me to the location of the json file containing the April Tag Field layout information for use with (in C++):
◆ AprilTagFieldLayout() [2/3]
frc::AprilTagFieldLayout::AprilTagFieldLayout ( std::string_view path )
explicit
Construct a new AprilTagFieldLayout with values imported from a JSON file.
Parameters
path Path of the JSON file to import from.
Hoping it already exists somewhere and I don’t have to create it.
Imo, the class layout is confusing. You’re the third person I’ve seen at this point asking where the JSON file is, which shows AprilTagFields is not discoverable in either C++ or Java. It would make more sense if the contents of AprilTagFields was in AprilTagFieldLayout as static factory functions or a constructor overload that takes an enum.
Got it… So looks like this for people who need to know:
// include both of these...
//#include <frc/apriltag/AprilTagFieldLayout.h>
//#include <frc/apriltag/AprilTagFields.h>
frc::AprilTagFieldLayout aprilTagFieldLayout = frc::LoadAprilTagLayoutField(frc::AprilTagField::k2024Crescendo);