blob: 14890d4347dbdfa42b1e2505186ef3d863fd1a9d [file] [log] [blame]
Austin Schuhbcce26a2018-03-26 23:41:24 -07001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Alex Perrycb7da4b2019-08-28 19:35:56 -07003load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
Brian Silverman100534c2015-09-07 15:51:23 -04004
5cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -07006 name = "control_loop_test",
7 testonly = True,
8 srcs = [
9 "control_loop_test.cc",
10 ],
11 hdrs = [
12 "control_loop_test.h",
13 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080014 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -070015 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070016 "//aos:flatbuffers",
17 "//aos:json_to_flatbuffer",
Austin Schuh9fe68f72019-08-10 19:32:03 -070018 "//aos/events:simulated_event_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -070019 "//aos/robot_state:joystick_state_fbs",
20 "//aos/robot_state:robot_state_fbs",
Austin Schuhbcce26a2018-03-26 23:41:24 -070021 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -070022 "//aos/testing:test_logging",
Austin Schuh2001aa42018-10-29 22:57:02 -070023 "//aos/time",
Austin Schuhbcce26a2018-03-26 23:41:24 -070024 ],
Brian Silverman100534c2015-09-07 15:51:23 -040025)
26
27cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070028 name = "polytope",
29 hdrs = [
30 "polytope.h",
31 ],
32 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070033 "@org_tuxfamily_eigen//:eigen",
Philipp Schraderdada1072020-11-24 11:34:46 -080034 ] + select({
35 "@platforms//os:linux": [
36 "//aos/logging",
37 "//third_party/cddlib",
38 "@com_github_google_glog//:glog",
39 ],
40 "//conditions:default": [],
41 }),
Brian Silvermanaba7bf62016-01-31 18:03:59 -050042)
43
44cc_test(
Austin Schuhbcce26a2018-03-26 23:41:24 -070045 name = "polytope_test",
46 srcs = [
47 "polytope_test.cc",
48 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080049 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -070050 deps = [
51 ":polytope",
52 "//aos/testing:googletest",
53 "//aos/testing:test_logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070054 "@org_tuxfamily_eigen//:eigen",
Austin Schuhbcce26a2018-03-26 23:41:24 -070055 ],
Brian Silverman100534c2015-09-07 15:51:23 -040056)
57
Alex Perrycb7da4b2019-08-28 19:35:56 -070058flatbuffer_cc_library(
59 name = "control_loop_fbs",
Austin Schuhbcce26a2018-03-26 23:41:24 -070060 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070061 "control_loops.fbs",
Austin Schuhbcce26a2018-03-26 23:41:24 -070062 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080063 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman100534c2015-09-07 15:51:23 -040064)
65
66cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070067 name = "control_loop",
68 srcs = [
69 "control_loop.cc",
70 "control_loop-tmpl.h",
71 ],
72 hdrs = [
73 "control_loop.h",
74 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080075 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -070076 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070077 "//aos/events:event_loop",
78 "//aos/events:shm_event_loop",
John Park33858a32018-09-28 23:05:48 -070079 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070080 "//aos/robot_state:joystick_state_fbs",
81 "//aos/robot_state:robot_state_fbs",
Austin Schuh2001aa42018-10-29 22:57:02 -070082 "//aos/time",
John Park33858a32018-09-28 23:05:48 -070083 "//aos/util:log_interval",
Austin Schuhbcce26a2018-03-26 23:41:24 -070084 ],
Brian Silverman100534c2015-09-07 15:51:23 -040085)
Brian Silvermandac0a4b2020-06-23 17:03:09 -070086
87cc_library(
88 name = "quaternion_utils",
89 srcs = [
90 "quaternion_utils.cc",
91 ],
92 hdrs = [
93 "quaternion_utils.h",
94 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080095 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermandac0a4b2020-06-23 17:03:09 -070096 deps = [
97 "@com_github_google_glog//:glog",
98 "@org_tuxfamily_eigen//:eigen",
99 ],
100)
101
102cc_test(
103 name = "quarternion_utils_test",
104 srcs = [
105 "quaternion_utils_test.cc",
106 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800107 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermandac0a4b2020-06-23 17:03:09 -0700108 deps = [
109 ":quaternion_utils",
110 "//aos/testing:googletest",
111 "//aos/testing:random_seed",
112 "@com_github_google_glog//:glog",
113 "@org_tuxfamily_eigen//:eigen",
114 ],
115)