blob: ce226d19a240bd89f05ec4df903a7487fe1b7dd4 [file] [log] [blame]
milind-u37385182023-02-20 15:07:28 -08001cc_library(
2 name = "arm",
3 srcs = [
4 "arm.cc",
5 ],
6 hdrs = [
7 "arm.h",
8 ],
9 target_compatible_with = ["@platforms//os:linux"],
10 visibility = ["//visibility:public"],
11 deps = [
12 ":generated_graph",
milind-u37385182023-02-20 15:07:28 -080013 "//frc971/control_loops/double_jointed_arm:ekf",
14 "//frc971/control_loops/double_jointed_arm:graph",
milind-u37385182023-02-20 15:07:28 -080015 "//frc971/zeroing",
16 "//y2023:constants",
17 "//y2023/control_loops/superstructure:superstructure_position_fbs",
18 "//y2023/control_loops/superstructure:superstructure_status_fbs",
19 "//y2023/control_loops/superstructure/arm:arm_constants",
milind-u18a901d2023-02-17 21:51:55 -080020 "//y2023/control_loops/superstructure/arm:trajectory",
21 "//y2023/control_loops/superstructure/roll:roll_plants",
milind-u37385182023-02-20 15:07:28 -080022 ],
23)
24
25genrule(
26 name = "generated_graph_genrule",
27 outs = [
28 "generated_graph.h",
29 "generated_graph.cc",
30 ],
31 cmd = "$(location //y2023/control_loops/python:graph_codegen) $(OUTS)",
32 target_compatible_with = ["@platforms//os:linux"],
33 tools = [
34 "//y2023/control_loops/python:graph_codegen",
35 ],
36)
37
38cc_library(
39 name = "generated_graph",
40 srcs = [
41 "generated_graph.cc",
42 ],
43 hdrs = ["generated_graph.h"],
44 copts = [
45 "-O1",
46 ],
47 target_compatible_with = ["@platforms//os:linux"],
48 visibility = ["//visibility:public"],
49 deps = [
50 ":arm_constants",
51 "//frc971/control_loops/double_jointed_arm:graph",
milind-u18a901d2023-02-17 21:51:55 -080052 "//y2023/control_loops/superstructure/arm:trajectory",
53 "//y2023/control_loops/superstructure/roll:roll_plants",
milind-u37385182023-02-20 15:07:28 -080054 ],
55)
56
57cc_library(
58 name = "arm_constants",
59 hdrs = ["arm_constants.h"],
60 target_compatible_with = ["@platforms//os:linux"],
61 visibility = ["//visibility:public"],
62 deps = [
63 "//frc971/control_loops/double_jointed_arm:dynamics",
64 ],
65)
milind-u0a7d28d2023-02-20 17:44:37 -080066
67cc_binary(
68 name = "arm_design",
69 srcs = [
70 "arm_design.cc",
71 ],
72 target_compatible_with = ["@platforms//os:linux"],
73 deps = [
74 ":arm_constants",
75 "//aos:init",
76 "//frc971/analysis:in_process_plotter",
77 "//frc971/control_loops:dlqr",
78 "//frc971/control_loops:jacobian",
79 "//frc971/control_loops/double_jointed_arm:dynamics",
80 ],
81)
Austin Schuhb83e1c72023-02-20 21:41:51 -080082
83cc_library(
84 name = "trajectory",
85 srcs = ["trajectory.cc"],
86 hdrs = ["trajectory.h"],
87 target_compatible_with = ["@platforms//os:linux"],
88 deps = [
89 "//frc971/control_loops:binomial",
90 "//frc971/control_loops:dlqr",
91 "//frc971/control_loops:fixed_quadrature",
92 "//frc971/control_loops:hybrid_state_feedback_loop",
93 "//frc971/control_loops/double_jointed_arm:dynamics",
94 "//frc971/control_loops/double_jointed_arm:ekf",
95 "@org_tuxfamily_eigen//:eigen",
96 ],
97)
98
99cc_test(
100 name = "trajectory_test",
101 srcs = ["trajectory_test.cc"],
102 target_compatible_with = ["@platforms//os:linux"],
103 deps = [
104 ":arm_constants",
105 ":trajectory",
106 "//aos/testing:googletest",
107 "//y2023/control_loops/superstructure/roll:roll_plants",
108 ],
109)
110
111cc_binary(
112 name = "trajectory_plot",
113 srcs = [
114 "trajectory_plot.cc",
115 ],
116 target_compatible_with = ["@platforms//cpu:x86_64"],
117 deps = [
118 ":arm_constants",
Austin Schuha32a1892023-02-21 14:04:07 -0800119 ":generated_graph",
Austin Schuhb83e1c72023-02-20 21:41:51 -0800120 ":trajectory",
121 "//frc971/analysis:in_process_plotter",
122 "//frc971/control_loops:binomial",
123 "//frc971/control_loops:fixed_quadrature",
124 "//frc971/control_loops/double_jointed_arm:ekf",
125 "//y2023/control_loops/superstructure/roll:roll_plants",
126 "@com_github_gflags_gflags//:gflags",
127 "@org_tuxfamily_eigen//:eigen",
128 ],
129)