Updating image_streamer to work with JeVois camera

Starting with y2018 code and updating it to work with the new
JeVois camera.  The JeVois camera sends a raw image.  This
needs to be converted to work in a MJPEG stream.

March 9, 2019 (Tyler)
Responded to Brian's comments.

March 7, 2019 (Tyler)
Rebased on master.

March 6, 2019, 9:35 pm
A bit more cleanup.  Ready for another review.

March 6, 2019, 7:10 pm
Moved files and updated scripts and build files to work.
Responded to Austin's Gerrit comments.

March 6, 2019, 7:55 pm
Made new directory with better name and move image_streamer files
into it.

March 5, 2019, 9:22 pm
Reworked deploy script.  Need to respond to Austin's comments.
I will do this next.

March 3, 2019, 5:50 pm
Working on deploy script. Not ready to be reviewed.

March 2, 2019, 8:15 pm
Added command line option to set the IP address for the roboRIO.

March 2, 2019, 6:30 pm
Removed y2018 code dependancy.

March 1, 2019, 10:29 pm
Cleaned up the code and set up to run for 9971 robot.

March 1, 2019, 9:20 pm
This version works and boots on the ODROID.  The logging was keeping
the program from starting.

March 1, 2019, 8:20 pm
Has debug lines and first version to work with the ODROID.
Jay and Bahar helped me with it.

Change-Id: I93511cb0397eb961d9691791b87b4148289e159b
diff --git a/y2019/image_streamer/deploy.sh b/y2019/image_streamer/deploy.sh
new file mode 100755
index 0000000..584d09e
--- /dev/null
+++ b/y2019/image_streamer/deploy.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+set -e
+
+echo ""
+echo "USAGE: $0 ODROID_ip_address"
+echo "Example: $0 10.9.71.179"
+echo "Example: $0 10.99.71.179"
+echo ""
+
+if [ $# != 1 ]
+  then
+    echo "Illegal number of parameters"
+    exit
+fi
+
+if [[ $1 == -*[hH]* ]]
+  then
+    exit
+fi
+
+# Get the script directory (from https://devhints.io/bash)
+DIR="${0%/*}"
+
+# Move into the script directory
+cd "${DIR}"
+echo "# Working in `pwd`"
+
+ODROID_IP_ADDRESS=$1
+ODROID="root@${ODROID_IP_ADDRESS}"
+# Get the IP address of the roboRIO from the ODROID IP address
+# This is needed to properly configure supervisorctl on the ODROID
+# for image_streamer to communicate with the roboRIO.
+ROBORIO=`echo ${ODROID_IP_ADDRESS} | sed 's/\.[0-9]*$/.2/'`
+
+echo "# Using ODORID  ${ODROID}"
+echo "# Using roboRIO ${ROBORIO}"
+
+# This builds the ODROID image_streamer code.
+echo -e "\n# Building image_streamer"
+(
+set -x
+bazel build -c opt //y2019/image_streamer:image_streamer --cpu=armhf-debian
+)
+
+echo -e "\n# Copy files to ODROID"
+(
+set -x
+rsync -av --progress ../../bazel-bin/y2019/image_streamer/image_streamer "${ODROID}":.
+rsync -av --progress README_ODROID_setup.txt "${ODROID}":.
+rsync -av --progress vision.conf "${ODROID}":/etc/supervisor/conf.d/
+)
+
+echo "# Make sure supervisorctl has the correct IP address."
+(
+set -x
+ssh "${ODROID}" sed -i -e "'/image_streamer/ s/10.9.71.2/${ROBORIO}/'" /etc/supervisor/conf.d/vision.conf
+
+ssh "${ODROID}" sync
+)
+
+echo -e "\nCan't restart image_streamer with supervisorctl because the USB devices don't come up reliably..." >&2
+echo "Restart the ODROID now" >&2