Send TargetMap json in constants flatbuffer
Signed-off-by: Yash Chainani <yashchainani28@gmail.com>
Change-Id: I9cb7fccb2d703ecfd6b476fb3397a6c1eb0e35d9
diff --git a/y2023/constants/7971.json b/y2023/constants/7971.json
index ded4869..3e05416 100644
--- a/y2023/constants/7971.json
+++ b/y2023/constants/7971.json
@@ -12,5 +12,6 @@
{
"calibration": {% include 'y2023/vision/calib_files/calibration_pi-7971-4_2021-06-12_15-37-25.706564865.json' %}
}
- ]
-}
+ ],
+ "target_map": {% include 'y2023/vision/maps/target_map.json' %}
+}
\ No newline at end of file
diff --git a/y2023/constants/BUILD b/y2023/constants/BUILD
index 360ecc2..9022cf7 100644
--- a/y2023/constants/BUILD
+++ b/y2023/constants/BUILD
@@ -18,7 +18,11 @@
jinja2_template(
name = "constants.json",
src = "constants.jinja2.json",
- includes = ["//y2023/vision/calib_files"] + ["7971.json"],
+ includes = [
+ "7971.json",
+ "//y2023/vision/calib_files",
+ "//y2023/vision/maps",
+ ],
parameters = {},
visibility = ["//visibility:public"],
)
@@ -28,7 +32,10 @@
srcs = ["constants.fbs"],
gen_reflections = True,
visibility = ["//visibility:public"],
- deps = ["//frc971/vision:calibration_fbs"],
+ deps = [
+ "//frc971/vision:calibration_fbs",
+ "//frc971/vision:target_map_fbs",
+ ],
)
flatbuffer_cc_library(
diff --git a/y2023/constants/constants.fbs b/y2023/constants/constants.fbs
index e62e253..628ea21 100644
--- a/y2023/constants/constants.fbs
+++ b/y2023/constants/constants.fbs
@@ -1,4 +1,5 @@
include "frc971/vision/calibration.fbs";
+include "frc971/vision/target_map.fbs";
namespace y2023;
@@ -8,6 +9,7 @@
table Constants {
cameras:[CameraConfiguration] (id: 0);
+ target_map:frc971.vision.TargetMap (id: 1);
}
root_type Constants;