blob: 99c11b4ab035ef48ac60473ba3e27e53311ead27 [file] [log] [blame]
Brian Silverman17f503e2015-08-02 18:17:18 -07001#include <stdio.h>
2#include <string.h>
3#include <unistd.h>
4#include <math.h>
5
Austin Schuhbfb04122019-05-22 21:16:51 -07006#include "aos/actions/actions.h"
John Park398c74a2018-10-20 21:17:39 -07007#include "aos/init.h"
Austin Schuhbfb04122019-05-22 21:16:51 -07008#include "aos/input/action_joystick_input.h"
John Park33858a32018-09-28 23:05:48 -07009#include "aos/input/driver_station_data.h"
10#include "aos/logging/logging.h"
John Park33858a32018-09-28 23:05:48 -070011#include "aos/time/time.h"
Austin Schuhbfb04122019-05-22 21:16:51 -070012#include "aos/util/log_interval.h"
Brian Silverman17f503e2015-08-02 18:17:18 -070013
Brian Silverman17f503e2015-08-02 18:17:18 -070014#include "frc971/autonomous/auto.q.h"
Austin Schuhbfb04122019-05-22 21:16:51 -070015#include "frc971/control_loops/drivetrain/drivetrain.q.h"
16#include "frc971/queues/gyro.q.h"
Brian Silverman17f503e2015-08-02 18:17:18 -070017#include "y2014/actors/shoot_actor.h"
Austin Schuhbfb04122019-05-22 21:16:51 -070018#include "y2014/constants.h"
19#include "y2014/control_loops/claw/claw.q.h"
20#include "y2014/control_loops/drivetrain/drivetrain_base.h"
21#include "y2014/control_loops/shooter/shooter.q.h"
Brian Silverman17f503e2015-08-02 18:17:18 -070022
Comran Morshed5323ecb2015-12-26 20:50:55 +000023using ::frc971::control_loops::drivetrain_queue;
Brian Silverman17f503e2015-08-02 18:17:18 -070024using ::frc971::sensors::gyro_reading;
25
26using ::aos::input::driver_station::ButtonLocation;
27using ::aos::input::driver_station::JoystickAxis;
28using ::aos::input::driver_station::ControlBit;
29
30#define OLD_DS 0
31
Brian Silvermanb601d892015-12-20 18:24:38 -050032namespace y2014 {
Brian Silverman17f503e2015-08-02 18:17:18 -070033namespace input {
34namespace joysticks {
35
36const ButtonLocation kDriveControlLoopEnable1(1, 7),
37 kDriveControlLoopEnable2(1, 11);
38const JoystickAxis kSteeringWheel(1, 1), kDriveThrottle(2, 2);
Campbell Crowley5b27f022016-02-20 16:55:35 -080039const ButtonLocation kShiftHigh(2, 3), kShiftLow(2, 1);
Brian Silverman17f503e2015-08-02 18:17:18 -070040const ButtonLocation kQuickTurn(1, 5);
41
42const ButtonLocation kCatch(3, 10);
43
44#if OLD_DS
45const ButtonLocation kFire(3, 11);
46const ButtonLocation kUnload(1, 4);
47const ButtonLocation kReload(1, 2);
48
49const ButtonLocation kRollersOut(3, 12);
50const ButtonLocation kRollersIn(3, 7);
51
52const ButtonLocation kTuck(3, 9);
53const ButtonLocation kIntakePosition(3, 8);
54const ButtonLocation kIntakeOpenPosition(3, 10);
55const ButtonLocation kVerticalTuck(3, 1);
56const JoystickAxis kFlipRobot(3, 3);
57
58const ButtonLocation kLongShot(3, 5);
59const ButtonLocation kCloseShot(3, 2);
60const ButtonLocation kFenderShot(3, 3);
61const ButtonLocation kTrussShot(2, 11);
62const ButtonLocation kHumanPlayerShot(3, 2);
63#else
64const ButtonLocation kFire(3, 9);
65const ButtonLocation kUnload(1, 4);
66const ButtonLocation kReload(1, 2);
67
68const ButtonLocation kRollersOut(3, 8);
69const ButtonLocation kRollersIn(3, 3);
70
71const ButtonLocation kTuck(3, 4);
72const ButtonLocation kIntakePosition(3, 5);
73const ButtonLocation kIntakeOpenPosition(3, 11);
74const ButtonLocation kVerticalTuck(2, 6);
75const JoystickAxis kFlipRobot(3, 3);
76
77const ButtonLocation kLongShot(3, 7);
78const ButtonLocation kCloseShot(3, 6);
79const ButtonLocation kFenderShot(3, 2);
80const ButtonLocation kTrussShot(2, 11);
81const ButtonLocation kHumanPlayerShot(3, 1);
82#endif
83
84const ButtonLocation kUserLeft(2, 7);
85const ButtonLocation kUserRight(2, 10);
86
87const JoystickAxis kAdjustClawGoal(3, 2);
88const JoystickAxis kAdjustClawSeparation(3, 1);
89
90struct ClawGoal {
91 double angle;
92 double separation;
93};
94
95struct ShotGoal {
96 ClawGoal claw;
97 double shot_power;
98 double velocity_compensation;
99 double intake_power;
100};
101
102const double kIntakePower = 4.0;
103// In case we have to quickly adjust it.
104const double kGrabSeparation = 0;
105const double kShootSeparation = 0.11 + kGrabSeparation;
106
107const ClawGoal kTuckGoal = {-2.273474, -0.749484};
108const ClawGoal kVerticalTuckGoal = {0, kGrabSeparation};
109const ClawGoal kIntakeGoal = {-2.24, kGrabSeparation};
110const ClawGoal kIntakeOpenGoal = {-2.0, 1.1};
111
112// TODO(austin): Tune these by hand...
113const ClawGoal kFlippedTuckGoal = {2.733474, -0.75};
114const ClawGoal kFlippedIntakeGoal = {2.0, kGrabSeparation};
115const ClawGoal kFlippedIntakeOpenGoal = {0.95, 1.0};
116
117// 34" between near edge of colored line and rear edge of bumper.
118// Only works running?
119const ShotGoal kLongShotGoal = {
120 {-1.08, kShootSeparation}, 145, 0.04, kIntakePower};
121// old 34" {-1.06, kShootSeparation}, 140, 0.04, kIntakePower};
122const ShotGoal kFlippedLongShotGoal = {
123 {0.96, kShootSeparation}, 145, 0.09, kIntakePower};
124// old 34" {0.96, kShootSeparation}, 140, 0.09, kIntakePower};
125
126// 78" between near edge of colored line and rear edge of bumper.
127const ShotGoal kCloseShotGoal = {
128 {-0.95, kShootSeparation}, 105, 0.2, kIntakePower};
129// 3/4" plunger {-0.90, kShootSeparation}, 105, 0.2, kIntakePower};
130const ShotGoal kFlippedMediumShotGoal = {
131 {0.865, kShootSeparation}, 120, 0.2, kIntakePower};
132// 3/4" plunger {0.80, kShootSeparation}, 105, 0.2, kIntakePower};
133
134// Shot from the fender.
135const ShotGoal kFenderShotGoal = {
136 {-0.68, kShootSeparation}, 115.0, 0.0, kIntakePower};
137const ShotGoal kFlippedShortShotGoal = {
138 {0.63, kShootSeparation}, 115.0, 0.0, kIntakePower};
139
140const ShotGoal kHumanShotGoal = {
141 {-0.90, kShootSeparation}, 140, 0.04, kIntakePower};
142const ShotGoal kFlippedHumanShotGoal = {
143 {0.90, kShootSeparation}, 140, 0, kIntakePower};
144const ShotGoal kTrussShotGoal = {
145 {-0.68, kShootSeparation}, 88.0, 0.4, kIntakePower};
146const ShotGoal kFlippedTrussShotGoal = {
147 {0.68, kShootSeparation}, 92.0, 0.4, kIntakePower};
148
149const ShotGoal kFlippedDemoShotGoal = {
150 {1.0, kShootSeparation}, 65.0, 0.0, kIntakePower};
151const ShotGoal kDemoShotGoal = {
152 {-1.0, kShootSeparation}, 50.0, 0.0, kIntakePower};
153
154const ClawGoal k254PassGoal = {-1.95, kGrabSeparation};
155const ClawGoal kFlipped254PassGoal = {1.96, kGrabSeparation};
156
Austin Schuhbfb04122019-05-22 21:16:51 -0700157class Reader : public ::aos::input::ActionJoystickInput {
Brian Silverman17f503e2015-08-02 18:17:18 -0700158 public:
Austin Schuh3e45c752019-02-02 12:19:11 -0800159 Reader(::aos::EventLoop *event_loop)
Austin Schuhbfb04122019-05-22 21:16:51 -0700160 : ::aos::input::ActionJoystickInput(
161 event_loop, control_loops::GetDrivetrainConfig(),
162 ::aos::input::DrivetrainInputReader::InputType::kSteeringWheel, {}),
Brian Silverman17f503e2015-08-02 18:17:18 -0700163 shot_power_(80.0),
164 goal_angle_(0.0),
165 separation_angle_(kGrabSeparation),
166 velocity_compensation_(0.0),
Austin Schuhbfb04122019-05-22 21:16:51 -0700167 intake_power_(0.0) {}
Brian Silverman17f503e2015-08-02 18:17:18 -0700168
169 void SetGoal(ClawGoal goal) {
170 goal_angle_ = goal.angle;
171 separation_angle_ = goal.separation;
172 moving_for_shot_ = false;
173 velocity_compensation_ = 0.0;
174 intake_power_ = 0.0;
175 }
176
177 void SetGoal(ShotGoal goal) {
178 goal_angle_ = goal.claw.angle;
179 shot_separation_angle_ = goal.claw.separation;
180 separation_angle_ = kGrabSeparation;
181 moving_for_shot_ = true;
182 shot_power_ = goal.shot_power;
183 velocity_compensation_ = goal.velocity_compensation;
184 intake_power_ = goal.intake_power;
185 }
186
Austin Schuhbfb04122019-05-22 21:16:51 -0700187 void HandleTeleop(const ::aos::input::driver_station::Data &data) override {
Brian Silverman17f503e2015-08-02 18:17:18 -0700188 if (data.IsPressed(kRollersIn) || data.IsPressed(kRollersOut)) {
189 intake_power_ = 0.0;
190 separation_angle_ = kGrabSeparation;
191 moving_for_shot_ = false;
192 }
193
194 static const double kAdjustClawGoalDeadband = 0.08;
195 double claw_goal_adjust = data.GetAxis(kAdjustClawGoal);
196 if (OLD_DS || ::std::abs(claw_goal_adjust) < kAdjustClawGoalDeadband) {
197 claw_goal_adjust = 0;
198 } else {
199 claw_goal_adjust = (claw_goal_adjust -
200 ((claw_goal_adjust < 0) ? -kAdjustClawGoalDeadband
201 : kAdjustClawGoalDeadband)) *
202 0.035;
203 }
204 double claw_separation_adjust = data.GetAxis(kAdjustClawSeparation);
205 if (OLD_DS ||
206 ::std::abs(claw_separation_adjust) < kAdjustClawGoalDeadband) {
207 claw_separation_adjust = 0;
208 } else {
209 claw_separation_adjust =
210 (claw_separation_adjust -
211 ((claw_separation_adjust < 0) ? -kAdjustClawGoalDeadband
212 : kAdjustClawGoalDeadband)) *
213 -0.035;
214 }
215
216#if OLD_DS
217 if (data.IsPressed(kFenderShot)) {
218#else
219 if (data.GetAxis(kFlipRobot) > 0.9) {
220#endif
221 claw_goal_adjust += claw_separation_adjust;
222 claw_goal_adjust *= -1;
223
224 if (data.IsPressed(kIntakeOpenPosition)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700225 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700226 LOG(DEBUG, "Canceling\n");
227 SetGoal(kFlippedIntakeOpenGoal);
228 } else if (data.IsPressed(kIntakePosition)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700229 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700230 LOG(DEBUG, "Canceling\n");
231 SetGoal(kFlippedIntakeGoal);
232 } else if (data.IsPressed(kVerticalTuck)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700233 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700234 LOG(DEBUG, "Canceling\n");
235 SetGoal(kVerticalTuckGoal);
236 } else if (data.IsPressed(kTuck)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700237 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700238 LOG(DEBUG, "Canceling\n");
239 SetGoal(kFlippedTuckGoal);
240 } else if (data.PosEdge(kLongShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700241 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700242 LOG(DEBUG, "Canceling\n");
243 SetGoal(kFlippedLongShotGoal);
244 } else if (data.PosEdge(kCloseShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700245 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700246 LOG(DEBUG, "Canceling\n");
247 SetGoal(kFlippedMediumShotGoal);
248 } else if (data.PosEdge(kFenderShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700249 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700250 LOG(DEBUG, "Canceling\n");
251 SetGoal(kFlippedShortShotGoal);
252 } else if (data.PosEdge(kHumanPlayerShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700253 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700254 LOG(DEBUG, "Canceling\n");
255 SetGoal(kFlippedHumanShotGoal);
256 } else if (data.PosEdge(kUserLeft)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700257 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700258 LOG(DEBUG, "Canceling\n");
259 SetGoal(kFlipped254PassGoal);
260 } else if (data.PosEdge(kUserRight)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700261 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700262 LOG(DEBUG, "Canceling\n");
263 SetGoal(kFlippedDemoShotGoal);
264 } else if (data.PosEdge(kTrussShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700265 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700266 LOG(DEBUG, "Canceling\n");
267 SetGoal(kFlippedTrussShotGoal);
268 }
269 } else {
270 if (data.IsPressed(kIntakeOpenPosition)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700271 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700272 LOG(DEBUG, "Canceling\n");
273 SetGoal(kIntakeOpenGoal);
274 } else if (data.IsPressed(kIntakePosition)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700275 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700276 LOG(DEBUG, "Canceling\n");
277 SetGoal(kIntakeGoal);
278 } else if (data.IsPressed(kVerticalTuck)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700279 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700280 LOG(DEBUG, "Canceling\n");
281 SetGoal(kVerticalTuckGoal);
282 } else if (data.IsPressed(kTuck)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700283 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700284 LOG(DEBUG, "Canceling\n");
285 SetGoal(kTuckGoal);
286 } else if (data.PosEdge(kLongShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700287 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700288 LOG(DEBUG, "Canceling\n");
289 SetGoal(kLongShotGoal);
290 } else if (data.PosEdge(kCloseShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700291 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700292 LOG(DEBUG, "Canceling\n");
293 SetGoal(kCloseShotGoal);
294 } else if (data.PosEdge(kFenderShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700295 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700296 LOG(DEBUG, "Canceling\n");
297 SetGoal(kFenderShotGoal);
298 } else if (data.PosEdge(kHumanPlayerShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700299 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700300 LOG(DEBUG, "Canceling\n");
301 SetGoal(kHumanShotGoal);
302 } else if (data.PosEdge(kUserLeft)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700303 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700304 LOG(DEBUG, "Canceling\n");
305 SetGoal(k254PassGoal);
306 } else if (data.PosEdge(kUserRight)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700307 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700308 LOG(DEBUG, "Canceling\n");
309 SetGoal(kDemoShotGoal);
310 } else if (data.PosEdge(kTrussShot)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700311 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700312 LOG(DEBUG, "Canceling\n");
313 SetGoal(kTrussShotGoal);
314 }
315 }
316
317 if (data.PosEdge(kFire)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700318 EnqueueAction(actors::MakeShootAction());
Brian Silverman17f503e2015-08-02 18:17:18 -0700319 } else if (data.NegEdge(kFire)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700320 CancelCurrentAction();
Brian Silverman17f503e2015-08-02 18:17:18 -0700321 }
322
Brian Silverman17f503e2015-08-02 18:17:18 -0700323 if (data.IsPressed(kUnload) || data.IsPressed(kReload)) {
Austin Schuhbfb04122019-05-22 21:16:51 -0700324 CancelAllActions();
Brian Silverman17f503e2015-08-02 18:17:18 -0700325 LOG(DEBUG, "Canceling\n");
326 intake_power_ = 0.0;
327 velocity_compensation_ = 0.0;
328 }
329
330 // Send out the claw and shooter goals if no actions are running.
Austin Schuhbfb04122019-05-22 21:16:51 -0700331 if (!ActionRunning()) {
Brian Silverman17f503e2015-08-02 18:17:18 -0700332 goal_angle_ += claw_goal_adjust;
333 separation_angle_ += claw_separation_adjust;
334
335 // If the action just ended, turn the intake off and stop velocity
336 // compensating.
Austin Schuhbfb04122019-05-22 21:16:51 -0700337 if (was_running_action()) {
Brian Silverman17f503e2015-08-02 18:17:18 -0700338 intake_power_ = 0.0;
339 velocity_compensation_ = 0.0;
340 }
341
Comran Morshed5323ecb2015-12-26 20:50:55 +0000342 ::frc971::control_loops::drivetrain_queue.status.FetchLatest();
Brian Silverman17f503e2015-08-02 18:17:18 -0700343 double goal_angle = goal_angle_;
Comran Morshed5323ecb2015-12-26 20:50:55 +0000344 if (::frc971::control_loops::drivetrain_queue.status.get()) {
Brian Silverman17f503e2015-08-02 18:17:18 -0700345 goal_angle += SpeedToAngleOffset(
Comran Morshed5323ecb2015-12-26 20:50:55 +0000346 ::frc971::control_loops::drivetrain_queue.status->robot_speed);
Brian Silverman17f503e2015-08-02 18:17:18 -0700347 } else {
348 LOG_INTERVAL(no_drivetrain_status_);
349 }
350
351 if (moving_for_shot_) {
352 auto &claw_status = control_loops::claw_queue.status;
353 claw_status.FetchLatest();
354 if (claw_status.get()) {
355 if (::std::abs(claw_status->bottom - goal_angle) < 0.2) {
356 moving_for_shot_ = false;
357 separation_angle_ = shot_separation_angle_;
358 }
359 }
360 }
361
362 double separation_angle = separation_angle_;
363
364 if (data.IsPressed(kCatch)) {
365 const double kCatchSeparation = 1.0;
366 goal_angle -= kCatchSeparation / 2.0;
367 separation_angle = kCatchSeparation;
368 }
369
370 bool intaking =
371 data.IsPressed(kRollersIn) || data.IsPressed(kIntakePosition) ||
372 data.IsPressed(kIntakeOpenPosition) || data.IsPressed(kCatch);
373 if (!control_loops::claw_queue.goal.MakeWithBuilder()
374 .bottom_angle(goal_angle)
375 .separation_angle(separation_angle)
376 .intake(intaking ? 12.0
377 : (data.IsPressed(kRollersOut) ? -12.0
378 : intake_power_))
379 .centering(intaking ? 12.0 : 0.0)
380 .Send()) {
381 LOG(WARNING, "sending claw goal failed\n");
382 }
383
384 if (!control_loops::shooter_queue.goal.MakeWithBuilder()
385 .shot_power(shot_power_)
386 .shot_requested(data.IsPressed(kFire))
387 .unload_requested(data.IsPressed(kUnload))
388 .load_requested(data.IsPressed(kReload))
389 .Send()) {
390 LOG(WARNING, "sending shooter goal failed\n");
391 }
392 }
Brian Silverman17f503e2015-08-02 18:17:18 -0700393 }
394
395 double SpeedToAngleOffset(double speed) {
Brian Silvermanb601d892015-12-20 18:24:38 -0500396 const ::y2014::constants::Values &values = ::y2014::constants::GetValues();
Brian Silverman17f503e2015-08-02 18:17:18 -0700397 // scale speed to a [0.0-1.0] on something close to the max
398 // TODO(austin): Change the scale factor for different shots.
399 return (speed / values.drivetrain_max_speed) * velocity_compensation_;
400 }
401
402 private:
403 void StartAuto() {
404 LOG(INFO, "Starting auto mode\n");
405 ::frc971::autonomous::autonomous.MakeWithBuilder().run_auto(true).Send();
406 }
407
408 void StopAuto() {
409 LOG(INFO, "Stopping auto mode\n");
410 ::frc971::autonomous::autonomous.MakeWithBuilder().run_auto(false).Send();
411 }
412
Brian Silverman17f503e2015-08-02 18:17:18 -0700413 double shot_power_;
414 double goal_angle_;
415 double separation_angle_, shot_separation_angle_;
416 double velocity_compensation_;
417 double intake_power_;
Brian Silverman17f503e2015-08-02 18:17:18 -0700418 bool moving_for_shot_ = false;
419
Brian Silverman17f503e2015-08-02 18:17:18 -0700420 ::aos::util::SimpleLogInterval no_drivetrain_status_ =
Austin Schuh61bdc602016-12-04 19:10:10 -0800421 ::aos::util::SimpleLogInterval(::std::chrono::milliseconds(200), WARNING,
Brian Silverman17f503e2015-08-02 18:17:18 -0700422 "no drivetrain status");
423};
424
425} // namespace joysticks
426} // namespace input
Brian Silvermanb601d892015-12-20 18:24:38 -0500427} // namespace y2014
Brian Silverman17f503e2015-08-02 18:17:18 -0700428
429int main() {
Brian Silverman5090c432016-01-02 14:44:26 -0800430 ::aos::Init(-1);
Austin Schuh3e45c752019-02-02 12:19:11 -0800431 ::aos::ShmEventLoop event_loop;
432 ::y2014::input::joysticks::Reader reader(&event_loop);
Brian Silverman17f503e2015-08-02 18:17:18 -0700433 reader.Run();
434 ::aos::Cleanup();
435}