blob: 236270822dcc5b2517c7ffde616a8342b8b1789f [file] [log] [blame]
Austin Schuhbcce26a2018-03-26 23:41:24 -07001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Austin Schuhbcce26a2018-03-26 23:41:24 -07003load("//aos/build:queues.bzl", "queue_library")
4load("//tools:environments.bzl", "mcu_cpus")
Brian Silverman100534c2015-09-07 15:51:23 -04005
6cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -07007 name = "replay_control_loop",
8 hdrs = [
9 "replay_control_loop.h",
10 ],
11 deps = [
12 ":control_loop",
John Park33858a32018-09-28 23:05:48 -070013 "//aos:queues",
John Park33858a32018-09-28 23:05:48 -070014 "//aos/logging:queue_logging",
15 "//aos/logging:replay",
Austin Schuh2001aa42018-10-29 22:57:02 -070016 "//aos/time",
Austin Schuhbcce26a2018-03-26 23:41:24 -070017 ],
Brian Silverman100534c2015-09-07 15:51:23 -040018)
19
20cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070021 name = "control_loop_test",
22 testonly = True,
23 srcs = [
24 "control_loop_test.cc",
25 ],
26 hdrs = [
27 "control_loop_test.h",
28 ],
29 deps = [
John Park33858a32018-09-28 23:05:48 -070030 "//aos/logging:queue_logging",
Austin Schuh2001aa42018-10-29 22:57:02 -070031 "//aos/robot_state",
Austin Schuhbcce26a2018-03-26 23:41:24 -070032 "//aos/testing:googletest",
33 "//aos/testing:test_shm",
Austin Schuh2001aa42018-10-29 22:57:02 -070034 "//aos/time",
Austin Schuhbcce26a2018-03-26 23:41:24 -070035 ],
Brian Silverman100534c2015-09-07 15:51:23 -040036)
37
38cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070039 name = "polytope_uc",
40 hdrs = [
41 "polytope.h",
42 ],
43 restricted_to = mcu_cpus,
44 deps = [
45 "//third_party/eigen",
46 ],
47)
48
49cc_library(
50 name = "polytope",
51 hdrs = [
52 "polytope.h",
53 ],
54 deps = [
John Park33858a32018-09-28 23:05:48 -070055 "//aos/logging",
56 "//aos/logging:matrix_logging",
Austin Schuhbcce26a2018-03-26 23:41:24 -070057 "//third_party/cddlib",
58 "//third_party/eigen",
59 ],
Brian Silvermanaba7bf62016-01-31 18:03:59 -050060)
61
62cc_test(
Austin Schuhbcce26a2018-03-26 23:41:24 -070063 name = "polytope_test",
64 srcs = [
65 "polytope_test.cc",
66 ],
67 deps = [
68 ":polytope",
69 "//aos/testing:googletest",
70 "//aos/testing:test_logging",
71 "//third_party/eigen",
Austin Schuhbcce26a2018-03-26 23:41:24 -070072 ],
Brian Silverman100534c2015-09-07 15:51:23 -040073)
74
75queue_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070076 name = "control_loop_queues",
77 srcs = [
78 "control_loops.q",
79 ],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070080 compatible_with = [
81 "//tools:armhf-debian",
82 ],
Brian Silverman100534c2015-09-07 15:51:23 -040083)
84
85cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070086 name = "control_loop",
87 srcs = [
88 "control_loop.cc",
89 "control_loop-tmpl.h",
90 ],
91 hdrs = [
92 "control_loop.h",
93 ],
94 deps = [
95 ":control_loop_queues",
John Park33858a32018-09-28 23:05:48 -070096 "//aos:queues",
John Park33858a32018-09-28 23:05:48 -070097 "//aos/logging",
98 "//aos/logging:queue_logging",
Austin Schuh2001aa42018-10-29 22:57:02 -070099 "//aos/robot_state",
100 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700101 "//aos/util:log_interval",
Austin Schuhbcce26a2018-03-26 23:41:24 -0700102 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400103)