Brian Silverman | c71537c | 2016-01-01 13:43:14 -0800 | [diff] [blame^] | 1 | package(default_visibility = ['//visibility:public']) |
| 2 | |
| 3 | load('/aos/build/queues', 'queue_library') |
| 4 | |
| 5 | cc_binary( |
| 6 | name = 'replay_drivetrain', |
| 7 | srcs = [ |
| 8 | 'replay_drivetrain.cc', |
| 9 | ], |
| 10 | deps = [ |
| 11 | ':drivetrain_queue', |
| 12 | '//aos/common/controls:replay_control_loop', |
| 13 | '//aos/linux_code:init', |
| 14 | '//frc971/queues:gyro', |
| 15 | ], |
| 16 | ) |
| 17 | |
| 18 | queue_library( |
| 19 | name = 'drivetrain_queue', |
| 20 | srcs = [ |
| 21 | 'drivetrain.q', |
| 22 | ], |
| 23 | deps = [ |
| 24 | '//aos/common/controls:control_loop_queues', |
| 25 | ], |
| 26 | ) |
| 27 | |
| 28 | genrule( |
| 29 | name = 'genrule_drivetrain', |
| 30 | visibility = ['//visibility:private'], |
| 31 | cmd = '$(location //y2012/control_loops/python:drivetrain) $(OUTS)', |
| 32 | tools = [ |
| 33 | '//y2012/control_loops/python:drivetrain', |
| 34 | ], |
| 35 | outs = [ |
| 36 | 'drivetrain_dog_motor_plant.h', |
| 37 | 'drivetrain_dog_motor_plant.cc', |
| 38 | 'kalman_drivetrain_motor_plant.h', |
| 39 | 'kalman_drivetrain_motor_plant.cc', |
| 40 | ], |
| 41 | ) |
| 42 | |
| 43 | genrule( |
| 44 | name = 'genrule_polydrivetrain', |
| 45 | visibility = ['//visibility:private'], |
| 46 | cmd = '$(location //y2012/control_loops/python:polydrivetrain) $(OUTS)', |
| 47 | tools = [ |
| 48 | '//y2012/control_loops/python:polydrivetrain', |
| 49 | ], |
| 50 | outs = [ |
| 51 | 'polydrivetrain_dog_motor_plant.h', |
| 52 | 'polydrivetrain_dog_motor_plant.cc', |
| 53 | 'polydrivetrain_cim_plant.h', |
| 54 | 'polydrivetrain_cim_plant.cc', |
| 55 | ], |
| 56 | ) |
| 57 | |
| 58 | cc_library( |
| 59 | name = 'polydrivetrain_plants', |
| 60 | srcs = [ |
| 61 | 'polydrivetrain_dog_motor_plant.cc', |
| 62 | 'drivetrain_dog_motor_plant.cc', |
| 63 | 'kalman_drivetrain_motor_plant.cc', |
| 64 | ], |
| 65 | hdrs = [ |
| 66 | 'polydrivetrain_dog_motor_plant.h', |
| 67 | 'drivetrain_dog_motor_plant.h', |
| 68 | 'kalman_drivetrain_motor_plant.h', |
| 69 | ], |
| 70 | deps = [ |
| 71 | '//frc971/control_loops:state_feedback_loop', |
| 72 | ], |
| 73 | ) |
| 74 | |
| 75 | cc_library( |
| 76 | name = 'ssdrivetrain', |
| 77 | srcs = [ |
| 78 | 'ssdrivetrain.cc', |
| 79 | ], |
| 80 | hdrs = [ |
| 81 | 'ssdrivetrain.h', |
| 82 | ], |
| 83 | deps = [ |
| 84 | ':polydrivetrain_plants', |
| 85 | ':drivetrain_queue', |
| 86 | '//aos/common/controls:polytope', |
| 87 | '//aos/common:math', |
| 88 | '//aos/common/messages:robot_state', |
| 89 | '//frc971/control_loops:state_feedback_loop', |
| 90 | '//frc971/control_loops:coerce_goal', |
| 91 | '//aos/common/util:log_interval', |
| 92 | '//aos/common/logging:queue_logging', |
| 93 | '//aos/common/logging:matrix_logging', |
| 94 | ], |
| 95 | ) |
| 96 | |
| 97 | cc_library( |
| 98 | name = 'polydrivetrain', |
| 99 | srcs = [ |
| 100 | 'polydrivetrain.cc', |
| 101 | ], |
| 102 | hdrs = [ |
| 103 | 'polydrivetrain.h', |
| 104 | ], |
| 105 | deps = [ |
| 106 | ':polydrivetrain_plants', |
| 107 | ':drivetrain_queue', |
| 108 | '//aos/common/controls:polytope', |
| 109 | '//aos/common:math', |
| 110 | '//aos/common/messages:robot_state', |
| 111 | '//frc971/control_loops:state_feedback_loop', |
| 112 | '//frc971/control_loops:coerce_goal', |
| 113 | '//aos/common/util:log_interval', |
| 114 | '//aos/common/logging:queue_logging', |
| 115 | '//aos/common/logging:matrix_logging', |
| 116 | ], |
| 117 | ) |
| 118 | |
| 119 | cc_library( |
| 120 | name = 'drivetrain_lib', |
| 121 | srcs = [ |
| 122 | 'drivetrain.cc', |
| 123 | ], |
| 124 | hdrs = [ |
| 125 | 'drivetrain.h', |
| 126 | ], |
| 127 | deps = [ |
| 128 | ':drivetrain_queue', |
| 129 | ':polydrivetrain', |
| 130 | ':polydrivetrain_plants', |
| 131 | ':ssdrivetrain', |
| 132 | '//aos/common/controls:control_loop', |
| 133 | '//frc971/queues:gyro', |
| 134 | '//aos/common/util:log_interval', |
| 135 | '//aos/common/logging:queue_logging', |
| 136 | '//aos/common/logging:matrix_logging', |
| 137 | ], |
| 138 | ) |
| 139 | |
| 140 | cc_binary( |
| 141 | name = 'drivetrain', |
| 142 | srcs = [ |
| 143 | 'drivetrain_main.cc', |
| 144 | ], |
| 145 | deps = [ |
| 146 | '//aos/linux_code:init', |
| 147 | ':drivetrain_lib', |
| 148 | ':drivetrain_queue', |
| 149 | ], |
| 150 | ) |