Add foxglove_image_converter to camera pis
This makes it so that we can more readily debug issues live by sending
JPEGs across the network instead of attempting to forward raw images and
then requiring the browser to handle them.
Also add the foxglove_websocket binary so that you can connect to the
pi.
Change-Id: Ia2164184fcbd6c43435bc90e4315129a159fb0b1
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/y2023/vision/foxglove_image_converter.cc b/y2023/vision/foxglove_image_converter.cc
new file mode 100644
index 0000000..8f3032b
--- /dev/null
+++ b/y2023/vision/foxglove_image_converter.cc
@@ -0,0 +1,21 @@
+#include "frc971/vision/foxglove_image_converter_lib.h"
+
+#include "aos/init.h"
+#include "aos/events/shm_event_loop.h"
+
+DEFINE_string(config, "aos_config.json", "Path to the config file to use.");
+
+int main(int argc, char *argv[]) {
+ aos::InitGoogle(&argc, &argv);
+
+ aos::FlatbufferDetachedBuffer<aos::Configuration> config =
+ aos::configuration::ReadConfig(FLAGS_config);
+
+ aos::ShmEventLoop event_loop(&config.message());
+
+ frc971::vision::FoxgloveImageConverter converter(
+ &event_loop, "/camera", "/camera",
+ frc971::vision::ImageCompression::kJpeg);
+
+ event_loop.Run();
+}