Make initial bot3 folder and structure.
Change-Id: I9b7e97fe8533b99a28ab15b4ade5e9ac95c7d836
diff --git a/bot3/control_loops/drivetrain/replay_drivetrain.cc b/bot3/control_loops/drivetrain/replay_drivetrain.cc
new file mode 100644
index 0000000..f2fb87c
--- /dev/null
+++ b/bot3/control_loops/drivetrain/replay_drivetrain.cc
@@ -0,0 +1,24 @@
+#include "aos/common/controls/replay_control_loop.h"
+#include "aos/linux_code/init.h"
+
+#include "bot3/control_loops/drivetrain/drivetrain.q.h"
+
+// Reads one or more log files and sends out all the queue messages (in the
+// correct order and at the correct time) to feed a "live" drivetrain process.
+
+int main(int argc, char **argv) {
+ if (argc <= 1) {
+ fprintf(stderr, "Need at least one file to replay!\n");
+ return EXIT_FAILURE;
+ }
+
+ ::aos::InitNRT();
+
+ ::aos::controls::ControlLoopReplayer<::bot3::control_loops::DrivetrainQueue>
+ replayer(&::bot3::control_loops::drivetrain_queue, "drivetrain");
+ for (int i = 1; i < argc; ++i) {
+ replayer.ProcessFile(argv[i]);
+ }
+
+ ::aos::Cleanup();
+}