Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 2 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 3 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 4 | |
| 5 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 6 | name = "control_loop_test", |
| 7 | testonly = True, |
| 8 | srcs = [ |
| 9 | "control_loop_test.cc", |
| 10 | ], |
| 11 | hdrs = [ |
| 12 | "control_loop_test.h", |
| 13 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 14 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 15 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 16 | "//aos:flatbuffers", |
| 17 | "//aos:json_to_flatbuffer", |
Austin Schuh | 9fe68f7 | 2019-08-10 19:32:03 -0700 | [diff] [blame] | 18 | "//aos/events:simulated_event_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 19 | "//aos/robot_state:joystick_state_fbs", |
| 20 | "//aos/robot_state:robot_state_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 21 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 22 | "//aos/testing:test_logging", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 23 | "//aos/time", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 24 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 25 | ) |
| 26 | |
| 27 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 28 | name = "polytope", |
| 29 | hdrs = [ |
| 30 | "polytope.h", |
| 31 | ], |
| 32 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 33 | "@org_tuxfamily_eigen//:eigen", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 34 | ] + select({ |
| 35 | "@platforms//os:linux": [ |
| 36 | "//aos/logging", |
| 37 | "//third_party/cddlib", |
| 38 | "@com_github_google_glog//:glog", |
| 39 | ], |
| 40 | "//conditions:default": [], |
| 41 | }), |
Brian Silverman | aba7bf6 | 2016-01-31 18:03:59 -0500 | [diff] [blame] | 42 | ) |
| 43 | |
| 44 | cc_test( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 45 | name = "polytope_test", |
| 46 | srcs = [ |
| 47 | "polytope_test.cc", |
| 48 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 49 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 50 | deps = [ |
| 51 | ":polytope", |
| 52 | "//aos/testing:googletest", |
| 53 | "//aos/testing:test_logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 54 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 55 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 56 | ) |
| 57 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 58 | flatbuffer_cc_library( |
| 59 | name = "control_loop_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 60 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 61 | "control_loops.fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 62 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 63 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 64 | ) |
| 65 | |
| 66 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 67 | name = "control_loop", |
| 68 | srcs = [ |
| 69 | "control_loop.cc", |
| 70 | "control_loop-tmpl.h", |
| 71 | ], |
| 72 | hdrs = [ |
| 73 | "control_loop.h", |
| 74 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 75 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 76 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 77 | "//aos/events:event_loop", |
| 78 | "//aos/events:shm_event_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 79 | "//aos/logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 80 | "//aos/robot_state:joystick_state_fbs", |
| 81 | "//aos/robot_state:robot_state_fbs", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 82 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 83 | "//aos/util:log_interval", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 84 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 85 | ) |
Brian Silverman | dac0a4b | 2020-06-23 17:03:09 -0700 | [diff] [blame] | 86 | |
| 87 | cc_library( |
| 88 | name = "quaternion_utils", |
| 89 | srcs = [ |
| 90 | "quaternion_utils.cc", |
| 91 | ], |
| 92 | hdrs = [ |
| 93 | "quaternion_utils.h", |
| 94 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 95 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | dac0a4b | 2020-06-23 17:03:09 -0700 | [diff] [blame] | 96 | deps = [ |
| 97 | "@com_github_google_glog//:glog", |
| 98 | "@org_tuxfamily_eigen//:eigen", |
| 99 | ], |
| 100 | ) |
| 101 | |
| 102 | cc_test( |
| 103 | name = "quarternion_utils_test", |
| 104 | srcs = [ |
| 105 | "quaternion_utils_test.cc", |
| 106 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 107 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | dac0a4b | 2020-06-23 17:03:09 -0700 | [diff] [blame] | 108 | 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 | ) |