Unify source of camera geometry data
Due to parallel development, camera pose information ended up being
populated in two constants files. This makes //y2019/vision:constants
the source for all of the constants.
Also, because the camera 19 calibration was done as if it was a front
camera, I had to negate its x/y position and offset the angle by 180
degrees.
This commit also adds validation for //y2019/vision:constants.cc to
ensure that it is not accidentally changed in a way that the codegen
cannot account for.
Change-Id: I85654d973e15ae7bf76589be63c3d0eaf72c3a45
diff --git a/y2019/vision/constants_formatting_main.cc b/y2019/vision/constants_formatting_main.cc
new file mode 100644
index 0000000..fd0bb22
--- /dev/null
+++ b/y2019/vision/constants_formatting_main.cc
@@ -0,0 +1,11 @@
+#include "y2019/vision/constants.h"
+#include <iostream>
+
+int main(int argc, char *argv[]) {
+ if (argc != 2) {
+ ::std::cout << "Expected a command line argument specifying the file name "
+ "to write to.\n";
+ return 1;
+ }
+ ::y2019::vision::DumpCameraConstants(argv[1], -1, {});
+}