Add accelerometer readings and logging to drivetrain tests
Also, this adds a "truth" channel for the drivetrain status so that,
when reading logfiles, we can readily compare the localizer's estimates
to the actual drivetrain position.
This has some subtle effects on the 2019 tests that affect the angle
estimates. Because I don't feel like putting too much effort into
isolating separate commits, I also preemptively up the thresholds in
y2019/control_loops/drivetrain/localized_drivetrain_test.cc, which
I have to do anyways in a later commit.
Change-Id: I548c4b36a87e65243de76865ce89f9a332c76859
diff --git a/y2019/control_loops/drivetrain/BUILD b/y2019/control_loops/drivetrain/BUILD
index aabd3e5..cd3a793 100644
--- a/y2019/control_loops/drivetrain/BUILD
+++ b/y2019/control_loops/drivetrain/BUILD
@@ -1,4 +1,5 @@
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos:config.bzl", "aos_config")
load("//tools/build_rules:select.bzl", "compiler_select", "cpu_select")
genrule(
@@ -159,7 +160,7 @@
"arm": [],
}),
linkstatic = True,
- shard_count = 5,
+ shard_count = 8,
deps = [
":localizer",
":drivetrain_base",
@@ -178,10 +179,20 @@
}),
)
+aos_config(
+ name = "simulation_config",
+ src = "drivetrain_simulation_config.json",
+ visibility = ["//visibility:public"],
+ deps = [
+ "//frc971/control_loops/drivetrain:simulation_channels",
+ "//y2019:config",
+ ],
+)
+
cc_test(
name = "localized_drivetrain_test",
srcs = ["localized_drivetrain_test.cc"],
- data = ["//y2019:config.json"],
+ data = [":simulation_config.json"],
deps = [
":camera_fbs",
":drivetrain_base",