blob: e1e3392d340fd63a323fd7af214e34fd5bb19d7a [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",
milind-u738832d2023-02-24 19:55:54 -080017 "//y2023/control_loops/drivetrain:drivetrain_can_position_fbs",
milind-u37385182023-02-20 15:07:28 -080018 "//y2023/control_loops/superstructure:superstructure_position_fbs",
19 "//y2023/control_loops/superstructure:superstructure_status_fbs",
20 "//y2023/control_loops/superstructure/arm:arm_constants",
milind-u18a901d2023-02-17 21:51:55 -080021 "//y2023/control_loops/superstructure/arm:trajectory",
22 "//y2023/control_loops/superstructure/roll:roll_plants",
milind-u37385182023-02-20 15:07:28 -080023 ],
24)
25
26genrule(
27 name = "generated_graph_genrule",
28 outs = [
29 "generated_graph.h",
30 "generated_graph.cc",
31 ],
32 cmd = "$(location //y2023/control_loops/python:graph_codegen) $(OUTS)",
33 target_compatible_with = ["@platforms//os:linux"],
34 tools = [
35 "//y2023/control_loops/python:graph_codegen",
36 ],
37)
38
39cc_library(
40 name = "generated_graph",
41 srcs = [
42 "generated_graph.cc",
43 ],
44 hdrs = ["generated_graph.h"],
45 copts = [
46 "-O1",
47 ],
48 target_compatible_with = ["@platforms//os:linux"],
49 visibility = ["//visibility:public"],
50 deps = [
51 ":arm_constants",
52 "//frc971/control_loops/double_jointed_arm:graph",
milind-u18a901d2023-02-17 21:51:55 -080053 "//y2023/control_loops/superstructure/arm:trajectory",
54 "//y2023/control_loops/superstructure/roll:roll_plants",
milind-u37385182023-02-20 15:07:28 -080055 ],
56)
57
58cc_library(
59 name = "arm_constants",
60 hdrs = ["arm_constants.h"],
61 target_compatible_with = ["@platforms//os:linux"],
62 visibility = ["//visibility:public"],
63 deps = [
64 "//frc971/control_loops/double_jointed_arm:dynamics",
65 ],
66)
milind-u0a7d28d2023-02-20 17:44:37 -080067
68cc_binary(
69 name = "arm_design",
70 srcs = [
71 "arm_design.cc",
72 ],
73 target_compatible_with = ["@platforms//os:linux"],
74 deps = [
75 ":arm_constants",
76 "//aos:init",
77 "//frc971/analysis:in_process_plotter",
78 "//frc971/control_loops:dlqr",
79 "//frc971/control_loops:jacobian",
80 "//frc971/control_loops/double_jointed_arm:dynamics",
81 ],
82)
Austin Schuhb83e1c72023-02-20 21:41:51 -080083
84cc_library(
85 name = "trajectory",
86 srcs = ["trajectory.cc"],
87 hdrs = ["trajectory.h"],
88 target_compatible_with = ["@platforms//os:linux"],
89 deps = [
90 "//frc971/control_loops:binomial",
91 "//frc971/control_loops:dlqr",
92 "//frc971/control_loops:fixed_quadrature",
93 "//frc971/control_loops:hybrid_state_feedback_loop",
94 "//frc971/control_loops/double_jointed_arm:dynamics",
95 "//frc971/control_loops/double_jointed_arm:ekf",
96 "@org_tuxfamily_eigen//:eigen",
97 ],
98)
99
100cc_test(
101 name = "trajectory_test",
102 srcs = ["trajectory_test.cc"],
103 target_compatible_with = ["@platforms//os:linux"],
104 deps = [
105 ":arm_constants",
106 ":trajectory",
107 "//aos/testing:googletest",
108 "//y2023/control_loops/superstructure/roll:roll_plants",
109 ],
110)
111
112cc_binary(
113 name = "trajectory_plot",
114 srcs = [
115 "trajectory_plot.cc",
116 ],
117 target_compatible_with = ["@platforms//cpu:x86_64"],
118 deps = [
119 ":arm_constants",
Austin Schuha32a1892023-02-21 14:04:07 -0800120 ":generated_graph",
Austin Schuhb83e1c72023-02-20 21:41:51 -0800121 ":trajectory",
122 "//frc971/analysis:in_process_plotter",
123 "//frc971/control_loops:binomial",
124 "//frc971/control_loops:fixed_quadrature",
125 "//frc971/control_loops/double_jointed_arm:ekf",
126 "//y2023/control_loops/superstructure/roll:roll_plants",
127 "@com_github_gflags_gflags//:gflags",
128 "@org_tuxfamily_eigen//:eigen",
129 ],
130)