blob: 79056e2bcd59debfaa85e22cbe5d4235689f590e [file] [log] [blame]
Neil Balchacfca5b2018-01-28 14:04:08 -08001#include <math.h>
2#include <stdio.h>
3#include <string.h>
4#include <unistd.h>
Austin Schuh8d5fff42018-05-30 20:44:12 -07005#include <mutex>
Neil Balchacfca5b2018-01-28 14:04:08 -08006
7#include "aos/common/actions/actions.h"
8#include "aos/common/input/driver_station_data.h"
9#include "aos/common/logging/logging.h"
Austin Schuh8d5fff42018-05-30 20:44:12 -070010#include "aos/common/stl_mutex.h"
Neil Balchacfca5b2018-01-28 14:04:08 -080011#include "aos/common/time.h"
12#include "aos/common/util/log_interval.h"
13#include "aos/input/drivetrain_input.h"
14#include "aos/input/joystick_input.h"
15#include "aos/linux_code/init.h"
Austin Schuh8d5fff42018-05-30 20:44:12 -070016#include "aos/vision/events/udp.h"
Austin Schuha3c148e2018-03-09 21:04:05 -080017#include "frc971/autonomous/auto.q.h"
18#include "frc971/autonomous/base_autonomous_actor.h"
Neil Balchacfca5b2018-01-28 14:04:08 -080019#include "frc971/control_loops/drivetrain/drivetrain.q.h"
20#include "y2018/control_loops/drivetrain/drivetrain_base.h"
Austin Schuhab15c4d2018-03-09 21:21:03 -080021#include "y2018/control_loops/superstructure/arm/generated_graph.h"
Neil Balch07fee582018-01-27 15:46:49 -080022#include "y2018/control_loops/superstructure/superstructure.q.h"
Austin Schuh8d5fff42018-05-30 20:44:12 -070023#include "y2018/vision.pb.h"
Neil Balchacfca5b2018-01-28 14:04:08 -080024
Austin Schuh8d5fff42018-05-30 20:44:12 -070025using ::aos::monotonic_clock;
Neil Balchacfca5b2018-01-28 14:04:08 -080026using ::frc971::control_loops::drivetrain_queue;
Neil Balch07fee582018-01-27 15:46:49 -080027using ::y2018::control_loops::superstructure_queue;
Austin Schuh8d5fff42018-05-30 20:44:12 -070028using ::aos::events::ProtoTXUdpSocket;
29using ::aos::events::RXUdpSocket;
Neil Balchacfca5b2018-01-28 14:04:08 -080030using ::aos::input::driver_station::ButtonLocation;
31using ::aos::input::driver_station::ControlBit;
32using ::aos::input::driver_station::JoystickAxis;
33using ::aos::input::driver_station::POVLocation;
34using ::aos::input::DrivetrainInputReader;
35
Austin Schuh60cdb3e2018-04-06 21:52:32 -070036using ::y2018::control_loops::superstructure::arm::FrontPoints;
37using ::y2018::control_loops::superstructure::arm::BackPoints;
38
Neil Balchacfca5b2018-01-28 14:04:08 -080039namespace y2018 {
40namespace input {
41namespace joysticks {
42
Austin Schuhab15c4d2018-03-09 21:21:03 -080043namespace arm = ::y2018::control_loops::superstructure::arm;
Neil Balch07fee582018-01-27 15:46:49 -080044
Sabina Davis833ccf62018-04-06 20:52:31 -070045const ButtonLocation kIntakeClosed(3, 2);
46const ButtonLocation kDuck(3, 9);
47const ButtonLocation kSmallBox(3, 1);
Austin Schuh47d74942018-03-04 01:15:59 -080048
Sabina Davis833ccf62018-04-06 20:52:31 -070049const ButtonLocation kIntakeIn(3, 4);
50const ButtonLocation kIntakeOut(3, 3);
Neil Balch07fee582018-01-27 15:46:49 -080051
Sabina Davis833ccf62018-04-06 20:52:31 -070052const ButtonLocation kArmFrontHighBox(4, 11);
53const ButtonLocation kArmFrontExtraHighBox(4, 1);
54const ButtonLocation kArmFrontMiddle2Box(4, 9);
55const ButtonLocation kArmFrontMiddle1Box(4, 7);
56const ButtonLocation kArmFrontLowBox(4, 5);
57const ButtonLocation kArmFrontSwitch(3, 7);
Austin Schuhab15c4d2018-03-09 21:21:03 -080058
Sabina Davis833ccf62018-04-06 20:52:31 -070059const ButtonLocation kArmBackHighBox(4, 12);
60const ButtonLocation kArmBackExtraHighBox(3, 14);
61const ButtonLocation kArmBackMiddle2Box(4, 10);
62const ButtonLocation kArmBackMiddle1Box(4, 8);
63const ButtonLocation kArmBackLowBox(4, 6);
64const ButtonLocation kArmBackSwitch(3, 10);
Austin Schuhab15c4d2018-03-09 21:21:03 -080065
Sabina Davis833ccf62018-04-06 20:52:31 -070066const ButtonLocation kArmAboveHang(3, 15);
67const ButtonLocation kArmBelowHang(3, 16);
Austin Schuh17e484e2018-03-11 01:11:36 -080068
Sabina Davis833ccf62018-04-06 20:52:31 -070069const ButtonLocation kWinch(4, 2);
Austin Schuh17e484e2018-03-11 01:11:36 -080070
Sabina Davis833ccf62018-04-06 20:52:31 -070071const ButtonLocation kArmNeutral(3, 8);
72const ButtonLocation kArmUp(3, 11);
Austin Schuhab15c4d2018-03-09 21:21:03 -080073
Sabina Davis833ccf62018-04-06 20:52:31 -070074const ButtonLocation kArmStepUp(3, 13);
75const ButtonLocation kArmStepDown(3, 12);
Austin Schuhab15c4d2018-03-09 21:21:03 -080076
Sabina Davis833ccf62018-04-06 20:52:31 -070077const ButtonLocation kArmPickupBoxFromIntake(4, 3);
78
79const ButtonLocation kClawOpen(4, 4);
Neil Balchba9cbba2018-04-06 22:26:38 -070080const ButtonLocation kDriverClawOpen(2, 4);
Neil Balch07fee582018-01-27 15:46:49 -080081
Neil Balchacfca5b2018-01-28 14:04:08 -080082std::unique_ptr<DrivetrainInputReader> drivetrain_input_reader_;
83
84class Reader : public ::aos::input::JoystickInput {
85 public:
Austin Schuh8d5fff42018-05-30 20:44:12 -070086 Reader() : video_tx_("10.9.71.179", 5000) {
Neil Balchacfca5b2018-01-28 14:04:08 -080087 drivetrain_input_reader_ = DrivetrainInputReader::Make(
Austin Schuh2b1fce02018-03-02 20:05:20 -080088 DrivetrainInputReader::InputType::kPistol,
Neil Balchacfca5b2018-01-28 14:04:08 -080089 ::y2018::control_loops::drivetrain::GetDrivetrainConfig());
90 }
91
92 void RunIteration(const ::aos::input::driver_station::Data &data) override {
93 bool last_auto_running = auto_running_;
94 auto_running_ = data.GetControlBit(ControlBit::kAutonomous) &&
95 data.GetControlBit(ControlBit::kEnabled);
96 if (auto_running_ != last_auto_running) {
97 if (auto_running_) {
98 StartAuto();
99 } else {
100 StopAuto();
101 }
102 }
103
104 if (!auto_running_) {
105 HandleDrivetrain(data);
106 HandleTeleop(data);
107 }
108
109 // Process any pending actions.
110 action_queue_.Tick();
111 was_running_ = action_queue_.Running();
112 }
113
114 void HandleDrivetrain(const ::aos::input::driver_station::Data &data) {
115 drivetrain_input_reader_->HandleDrivetrain(data);
Neil Balchacfca5b2018-01-28 14:04:08 -0800116 }
117
118 void HandleTeleop(const ::aos::input::driver_station::Data &data) {
119 if (!data.GetControlBit(ControlBit::kEnabled)) {
120 action_queue_.CancelAllActions();
121 LOG(DEBUG, "Canceling\n");
122 }
Neil Balch07fee582018-01-27 15:46:49 -0800123
Austin Schuhab15c4d2018-03-09 21:21:03 -0800124 superstructure_queue.position.FetchLatest();
Neil Balch07fee582018-01-27 15:46:49 -0800125 superstructure_queue.status.FetchLatest();
Austin Schuhab15c4d2018-03-09 21:21:03 -0800126 if (!superstructure_queue.status.get() ||
127 !superstructure_queue.position.get()) {
Neil Balch07fee582018-01-27 15:46:49 -0800128 LOG(ERROR, "Got no superstructure status packet.\n");
129 return;
130 }
131
Neil Balch07fee582018-01-27 15:46:49 -0800132 auto new_superstructure_goal = superstructure_queue.goal.MakeMessage();
133
Sabina Davisfdd7a112018-02-04 16:16:23 -0800134 new_superstructure_goal->intake.left_intake_angle = intake_goal_;
135 new_superstructure_goal->intake.right_intake_angle = intake_goal_;
Neil Balch07fee582018-01-27 15:46:49 -0800136
Austin Schuh8d5fff42018-05-30 20:44:12 -0700137 if (data.PosEdge(kIntakeIn) || data.PosEdge(kSmallBox) ||
138 data.PosEdge(kIntakeClosed)) {
139 vision_control_.set_high_video(false);
140 }
141
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700142 if (data.IsPressed(kIntakeIn)) {
Neil Balch07fee582018-01-27 15:46:49 -0800143 // Turn on the rollers.
Neil Balchba9cbba2018-04-06 22:26:38 -0700144 new_superstructure_goal->intake.roller_voltage = 8.0;
Neil Balch07fee582018-01-27 15:46:49 -0800145 } else if (data.IsPressed(kIntakeOut)) {
146 // Turn off the rollers.
Austin Schuh17dd0892018-03-02 20:06:31 -0800147 new_superstructure_goal->intake.roller_voltage = -12.0;
Neil Balch07fee582018-01-27 15:46:49 -0800148 } else {
149 // We don't want the rollers on.
150 new_superstructure_goal->intake.roller_voltage = 0.0;
151 }
152
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700153 if (data.IsPressed(kSmallBox)) {
154 // Deploy the intake.
155 if (superstructure_queue.position->box_back_beambreak_triggered) {
156 intake_goal_ = 0.30;
157 } else {
158 if (new_superstructure_goal->intake.roller_voltage > 0.1 &&
159 superstructure_queue.position->box_distance < 0.15) {
160 intake_goal_ = 0.18;
161 } else {
162 intake_goal_ = -0.60;
163 }
164 }
165 } else if (data.IsPressed(kIntakeClosed)) {
166 // Deploy the intake.
167 if (superstructure_queue.position->box_back_beambreak_triggered) {
168 intake_goal_ = 0.30;
169 } else {
170 if (new_superstructure_goal->intake.roller_voltage > 0.1) {
Neil Balchba9cbba2018-04-06 22:26:38 -0700171 if (superstructure_queue.position->box_distance < 0.10) {
172 new_superstructure_goal->intake.roller_voltage -= 3.0;
173 intake_goal_ = 0.22;
174 } else if (superstructure_queue.position->box_distance < 0.17) {
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700175 intake_goal_ = 0.13;
176 } else if (superstructure_queue.position->box_distance < 0.25) {
Neil Balchba9cbba2018-04-06 22:26:38 -0700177 intake_goal_ = 0.05;
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700178 } else {
Neil Balchba9cbba2018-04-06 22:26:38 -0700179 intake_goal_ = -0.10;
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700180 }
181 } else {
182 intake_goal_ = -0.60;
183 }
184 }
185 } else {
186 // Bring in the intake.
187 intake_goal_ = -3.3;
188 }
189
Neil Balchba9cbba2018-04-06 22:26:38 -0700190 if (new_superstructure_goal->intake.roller_voltage > 0.1 &&
191 intake_goal_ > 0.0) {
192 if (superstructure_queue.position->box_distance < 0.10) {
193 new_superstructure_goal->intake.roller_voltage -= 3.0;
194 }
195 new_superstructure_goal->intake.roller_voltage += 3.0;
196 }
197
Austin Schuhb874fd32018-03-05 00:27:10 -0800198 // If we are disabled, stay at the node closest to where we start. This
199 // should remove long motions when enabled.
Neil Balchba9cbba2018-04-06 22:26:38 -0700200 if (!data.GetControlBit(ControlBit::kEnabled) || never_disabled_) {
Austin Schuhb874fd32018-03-05 00:27:10 -0800201 arm_goal_position_ = superstructure_queue.status->arm.current_node;
Neil Balchba9cbba2018-04-06 22:26:38 -0700202 never_disabled_ = false;
Austin Schuhb874fd32018-03-05 00:27:10 -0800203 }
204
Austin Schuhab15c4d2018-03-09 21:21:03 -0800205 bool grab_box = false;
206 if (data.IsPressed(kArmPickupBoxFromIntake)) {
Austin Schuhab15c4d2018-03-09 21:21:03 -0800207 grab_box = true;
Neil Balchba9cbba2018-04-06 22:26:38 -0700208 }
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700209 const bool near_goal =
210 superstructure_queue.status->arm.current_node == arm_goal_position_ &&
211 superstructure_queue.status->arm.path_distance_to_go < 1e-3;
Austin Schuh822a1e52018-04-06 22:50:21 -0700212 if (data.IsPressed(kArmStepDown) && near_goal) {
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700213 uint32_t *front_point = ::std::find(
214 front_points_.begin(), front_points_.end(), arm_goal_position_);
215 uint32_t *back_point = ::std::find(
216 back_points_.begin(), back_points_.end(), arm_goal_position_);
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700217 if (front_point != front_points_.end()) {
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700218 ++front_point;
219 if (front_point != front_points_.end()) {
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700220 arm_goal_position_ = *front_point;
221 }
222 } else if (back_point != back_points_.end()) {
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700223 ++back_point;
224 if (back_point != back_points_.end()) {
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700225 arm_goal_position_ = *back_point;
226 }
227 }
Austin Schuh822a1e52018-04-06 22:50:21 -0700228 } else if (data.IsPressed(kArmStepUp) && near_goal) {
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700229 const uint32_t *front_point = ::std::find(
230 front_points_.begin(), front_points_.end(), arm_goal_position_);
231 const uint32_t *back_point = ::std::find(
232 back_points_.begin(), back_points_.end(), arm_goal_position_);
233 if (front_point != front_points_.end()) {
234 if (front_point != front_points_.begin()) {
235 --front_point;
236 arm_goal_position_ = *front_point;
237 }
238 } else if (back_point != back_points_.end()) {
239 if (back_point != back_points_.begin()) {
240 --back_point;
241 arm_goal_position_ = *back_point;
242 }
243 }
244 } else if (data.PosEdge(kArmPickupBoxFromIntake)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700245 vision_control_.set_high_video(false);
Neil Balchba9cbba2018-04-06 22:26:38 -0700246 arm_goal_position_ = arm::NeutralIndex();
247 } else if (data.IsPressed(kDuck)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700248 vision_control_.set_high_video(false);
Neil Balchba9cbba2018-04-06 22:26:38 -0700249 arm_goal_position_ = arm::DuckIndex();
Austin Schuhab15c4d2018-03-09 21:21:03 -0800250 } else if (data.IsPressed(kArmNeutral)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700251 vision_control_.set_high_video(false);
Austin Schuhab15c4d2018-03-09 21:21:03 -0800252 arm_goal_position_ = arm::NeutralIndex();
253 } else if (data.IsPressed(kArmUp)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700254 vision_control_.set_high_video(true);
Austin Schuhab15c4d2018-03-09 21:21:03 -0800255 arm_goal_position_ = arm::UpIndex();
256 } else if (data.IsPressed(kArmFrontSwitch)) {
257 arm_goal_position_ = arm::FrontSwitchIndex();
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700258 } else if (data.IsPressed(kArmFrontExtraHighBox)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700259 vision_control_.set_high_video(true);
Austin Schuhab15c4d2018-03-09 21:21:03 -0800260 arm_goal_position_ = arm::FrontHighBoxIndex();
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700261 } else if (data.IsPressed(kArmFrontHighBox)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700262 vision_control_.set_high_video(true);
Austin Schuhab15c4d2018-03-09 21:21:03 -0800263 arm_goal_position_ = arm::FrontMiddle2BoxIndex();
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700264 } else if (data.IsPressed(kArmFrontMiddle2Box)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700265 vision_control_.set_high_video(true);
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700266 arm_goal_position_ = arm::FrontMiddle3BoxIndex();
Austin Schuhab15c4d2018-03-09 21:21:03 -0800267 } else if (data.IsPressed(kArmFrontMiddle1Box)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700268 vision_control_.set_high_video(true);
Austin Schuhab15c4d2018-03-09 21:21:03 -0800269 arm_goal_position_ = arm::FrontMiddle1BoxIndex();
270 } else if (data.IsPressed(kArmFrontLowBox)) {
Austin Schuh8d5fff42018-05-30 20:44:12 -0700271 vision_control_.set_high_video(true);
Austin Schuhab15c4d2018-03-09 21:21:03 -0800272 arm_goal_position_ = arm::FrontLowBoxIndex();
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700273 } else if (data.IsPressed(kArmBackExtraHighBox)) {
Austin Schuhab15c4d2018-03-09 21:21:03 -0800274 arm_goal_position_ = arm::BackHighBoxIndex();
Austin Schuh83cdd8a2018-03-21 20:49:02 -0700275 } else if (data.IsPressed(kArmBackHighBox) ||
276 data.IsPressed(kArmBackMiddle2Box)) {
Austin Schuhab15c4d2018-03-09 21:21:03 -0800277 arm_goal_position_ = arm::BackMiddle2BoxIndex();
278 } else if (data.IsPressed(kArmBackMiddle1Box)) {
279 arm_goal_position_ = arm::BackMiddle1BoxIndex();
280 } else if (data.IsPressed(kArmBackLowBox)) {
281 arm_goal_position_ = arm::BackLowBoxIndex();
282 } else if (data.IsPressed(kArmBackSwitch)) {
283 arm_goal_position_ = arm::BackSwitchIndex();
Austin Schuh17e484e2018-03-11 01:11:36 -0800284 } else if (data.IsPressed(kArmAboveHang)) {
285 if (data.IsPressed(kIntakeIn)) {
286 arm_goal_position_ = arm::SelfHangIndex();
287 } else if (data.IsPressed(kIntakeOut)) {
288 arm_goal_position_ = arm::PartnerHangIndex();
289 } else {
290 arm_goal_position_ = arm::AboveHangIndex();
291 }
292 } else if (data.IsPressed(kArmBelowHang)) {
293 arm_goal_position_ = arm::BelowHangIndex();
Neil Balch07fee582018-01-27 15:46:49 -0800294 }
295
Austin Schuh17e484e2018-03-11 01:11:36 -0800296 new_superstructure_goal->deploy_fork =
297 data.IsPressed(kArmAboveHang) && data.IsPressed(kClawOpen);
298
299 if (new_superstructure_goal->deploy_fork) {
300 intake_goal_ = -2.0;
301 }
302
303 if (data.IsPressed(kWinch)) {
Neil Balchba9cbba2018-04-06 22:26:38 -0700304 LOG(INFO, "Winching\n");
Austin Schuh17e484e2018-03-11 01:11:36 -0800305 new_superstructure_goal->voltage_winch = 12.0;
306 } else {
307 new_superstructure_goal->voltage_winch = 0.0;
308 }
309
310 new_superstructure_goal->hook_release = data.IsPressed(kArmBelowHang);
311
Austin Schuhcb091712018-02-21 20:01:55 -0800312 new_superstructure_goal->arm_goal_position = arm_goal_position_;
313
Neil Balchba9cbba2018-04-06 22:26:38 -0700314 if ((data.IsPressed(kClawOpen) && data.IsPressed(kDriverClawOpen)) ||
315 data.PosEdge(kArmPickupBoxFromIntake)) {
Neil Balch07fee582018-01-27 15:46:49 -0800316 new_superstructure_goal->open_claw = true;
Austin Schuhab15c4d2018-03-09 21:21:03 -0800317 } else {
Neil Balch07fee582018-01-27 15:46:49 -0800318 new_superstructure_goal->open_claw = false;
319 }
320
Austin Schuhab15c4d2018-03-09 21:21:03 -0800321 new_superstructure_goal->grab_box = grab_box;
Neil Balch07fee582018-01-27 15:46:49 -0800322
323 LOG_STRUCT(DEBUG, "sending goal", *new_superstructure_goal);
324 if (!new_superstructure_goal.Send()) {
325 LOG(ERROR, "Sending superstructure goal failed.\n");
326 }
Austin Schuh8d5fff42018-05-30 20:44:12 -0700327
328 video_tx_.Send(vision_control_);
Neil Balchacfca5b2018-01-28 14:04:08 -0800329 }
330
331 private:
Austin Schuha3c148e2018-03-09 21:04:05 -0800332 void StartAuto() {
333 LOG(INFO, "Starting auto mode\n");
334
335 ::frc971::autonomous::AutonomousActionParams params;
336 ::frc971::autonomous::auto_mode.FetchLatest();
337 if (::frc971::autonomous::auto_mode.get() != nullptr) {
Austin Schuhc231df42018-03-21 20:43:24 -0700338 params.mode = ::frc971::autonomous::auto_mode->mode << 2;
Austin Schuha3c148e2018-03-09 21:04:05 -0800339 } else {
340 LOG(WARNING, "no auto mode values\n");
341 params.mode = 0;
342 }
Austin Schuhc231df42018-03-21 20:43:24 -0700343 // TODO(austin): use the mode later if we care. We don't care right now.
344 params.mode = static_cast<int>(::aos::joystick_state->switch_left) |
345 (static_cast<int>(::aos::joystick_state->scale_left) << 1);
Austin Schuha3c148e2018-03-09 21:04:05 -0800346 action_queue_.EnqueueAction(
347 ::frc971::autonomous::MakeAutonomousAction(params));
348 }
Neil Balchacfca5b2018-01-28 14:04:08 -0800349
350 void StopAuto() {
351 LOG(INFO, "Stopping auto mode\n");
352 action_queue_.CancelAllActions();
353 }
354
Neil Balch07fee582018-01-27 15:46:49 -0800355 // Current goals to send to the robot.
Austin Schuh17e484e2018-03-11 01:11:36 -0800356 double intake_goal_ = 0.0;
Neil Balch07fee582018-01-27 15:46:49 -0800357
Neil Balchacfca5b2018-01-28 14:04:08 -0800358 bool was_running_ = false;
359 bool auto_running_ = false;
Neil Balchba9cbba2018-04-06 22:26:38 -0700360 bool never_disabled_ = true;
Neil Balchacfca5b2018-01-28 14:04:08 -0800361
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700362 uint32_t arm_goal_position_ = 0;
Austin Schuh8d5fff42018-05-30 20:44:12 -0700363 VisionControl vision_control_;
Austin Schuh60cdb3e2018-04-06 21:52:32 -0700364
365 decltype(FrontPoints()) front_points_ = FrontPoints();
366 decltype(BackPoints()) back_points_ = BackPoints();
Austin Schuhcb091712018-02-21 20:01:55 -0800367
Neil Balchacfca5b2018-01-28 14:04:08 -0800368 ::aos::common::actions::ActionQueue action_queue_;
Austin Schuh8d5fff42018-05-30 20:44:12 -0700369
370 ProtoTXUdpSocket<VisionControl> video_tx_;
Neil Balchacfca5b2018-01-28 14:04:08 -0800371};
372
373} // namespace joysticks
374} // namespace input
375} // namespace y2018
376
377int main() {
378 ::aos::Init(-1);
379 ::y2018::input::joysticks::Reader reader;
380 reader.Run();
381 ::aos::Cleanup();
382}