Rename our allwpilib (which is now 2020) to not have 2019 in the name

Change-Id: I3c07f85ed32ab8b97db765a9b43f2a6ce7da964a
diff --git a/simulation/gz_msgs/README.md b/simulation/gz_msgs/README.md
new file mode 100644
index 0000000..7df7a79
--- /dev/null
+++ b/simulation/gz_msgs/README.md
@@ -0,0 +1,12 @@
+gz_msgs
+=======
+gz_msgs is a library that allows the transmission of messages
+to and from Java and C++ programs.
+
+gz_msgs currently requires libprotobuf-dev on Debian like systems.
+
+If it's not found via pkg-config, then it's build is diabled.
+
+You can force it by specifying -PmakeSim on the gradle command line.
+
+If you are installing FRCSim with the script, then this *should* have be done for you.
diff --git a/simulation/gz_msgs/build.gradle b/simulation/gz_msgs/build.gradle
new file mode 100644
index 0000000..353f4ad
--- /dev/null
+++ b/simulation/gz_msgs/build.gradle
@@ -0,0 +1,95 @@
+plugins {
+    id 'cpp'
+    id 'java'
+    id 'com.google.protobuf' version '0.8.8'
+    id 'edu.wpi.first.NativeUtils'
+}
+
+description = "A C++ and Java library to pass FRC Simulation Messages in and out of Gazebo."
+
+/* The simulation does not run on real hardware; so we always skip Athena */
+ext.skiplinuxathena = true
+ext.skiplinuxraspbian = true
+apply from: "${rootDir}/shared/config.gradle"
+
+/* Use a sort of poor man's autoconf to find the protobuf development
+   files; on Debian, those are supplied by libprotobuf-dev.
+
+   This should get skipped on Windows.
+
+   TODO:  Add Windows support for the simulation code */
+
+def protobuf_version = ""
+try {
+    protobuf_version = "pkg-config --modversion protobuf".execute().text.trim()
+    println "Protobuf version is [${protobuf_version}]"
+} catch(Exception ex) {
+}
+
+if (!protobuf_version?.trim()) {
+    println "Protobuf is not available. (pkg-config --modversion protobuf failed)"
+    protobuf_version = "+"
+    if (project.hasProperty("makeSim")) {
+        /* Force the build even though we did not find protobuf. */
+        println "makeSim set. Forcing build - failure likely."
+    }
+    else {
+        ext.skip_gz_msgs = true
+        println "Skipping gz_msgs."
+    }
+}
+
+tasks.whenTaskAdded { task ->
+    task.onlyIf { !project.hasProperty('skip_gz_msgs') }
+}
+
+dependencies {
+      implementation "com.google.protobuf:protobuf-java:${protobuf_version}"
+      implementation "com.google.protobuf:protoc:${protobuf_version}"
+}
+
+/* There is a nice gradle plugin for protobuf, and the protoc tool
+   is included; using it simplifies our build process.
+   The trick is that we have to use the same version as the system
+   copy of libprotobuf-dev */
+protobuf {
+    protoc {
+        artifact = "com.google.protobuf:protoc:${protobuf_version}"
+    }
+
+    generatedFilesBaseDir = "$buildDir/generated"
+    generateProtoTasks {
+        all().each { task ->
+            task.builtins {
+                cpp {
+                    outputSubDir = 'simulation/gz_msgs'
+                }
+            }
+        }
+    }
+}
+
+model {
+    components {
+        gz_msgs(NativeLibrarySpec) {
+            sources {
+                cpp {
+                    source {
+                        srcDir "$buildDir/generated/main/simulation/gz_msgs"
+                        builtBy tasks.generateProto
+                    }
+                    exportedHeaders {
+                        srcDir "src/include"
+                        srcDir "$buildDir/generated/main"
+                    }
+                }
+            }
+            /* We must compile with -fPIC to link the static library into an so */
+            binaries {
+                all {
+                    cppCompiler.args "-fPIC"
+                }
+            }
+        }
+    }
+}
diff --git a/simulation/gz_msgs/src/include/simulation/gz_msgs/msgs.h b/simulation/gz_msgs/src/include/simulation/gz_msgs/msgs.h
new file mode 100644
index 0000000..e953ad5
--- /dev/null
+++ b/simulation/gz_msgs/src/include/simulation/gz_msgs/msgs.h
@@ -0,0 +1,47 @@
+/* This was originally auto generated by cmake.
+   However, it changes infrequently enough that it makes
+   sense to simply revise it by hand any time we change
+   the protobuf messages expressed in the .proto files */
+
+#ifndef _FRC_MSGS_H_
+#define _FRC_MSGS_H_
+
+#ifdef _WIN32
+  //include this before anything else includes windows.h
+  //putting this here saves putting it in more files
+  #include <Winsock2.h>
+#endif
+
+
+ #include "simulation/gz_msgs/bool.pb.h"
+ #include "simulation/gz_msgs/driver-station.pb.h"
+ #include "simulation/gz_msgs/float64.pb.h"
+ #include "simulation/gz_msgs/frc_joystick.pb.h"
+
+
+#include <gazebo/msgs/msgs.hh>
+#include <boost/shared_ptr.hpp>
+
+namespace gazebo {
+  namespace msgs {
+
+    typedef GzString String;
+
+    typedef boost::shared_ptr< gazebo::msgs::String > StringPtr;
+    typedef const boost::shared_ptr< const gazebo::msgs::String > ConstStringPtr;
+
+    typedef boost::shared_ptr< msgs::Float64 > Float64Ptr;
+    typedef const boost::shared_ptr< const msgs::Float64 > ConstFloat64Ptr;
+
+    typedef boost::shared_ptr< msgs::Bool > BoolPtr;
+    typedef const boost::shared_ptr< const msgs::Bool > ConstBoolPtr;
+
+    typedef boost::shared_ptr< msgs::FRCJoystick > FRCJoystickPtr;
+    typedef const boost::shared_ptr< const msgs::FRCJoystick > ConstFRCJoystickPtr;
+
+    typedef boost::shared_ptr< msgs::DriverStation > DriverStationPtr;
+    typedef const boost::shared_ptr< const msgs::DriverStation > ConstDriverStationPtr;
+  }
+}
+
+#endif /* _FRC_MSGS_H_ */
diff --git a/simulation/gz_msgs/src/main/proto/bool.proto b/simulation/gz_msgs/src/main/proto/bool.proto
new file mode 100644
index 0000000..90ab7fa
--- /dev/null
+++ b/simulation/gz_msgs/src/main/proto/bool.proto
@@ -0,0 +1,15 @@
+package gazebo.msgs;
+
+/// \ingroup gazebo_msgs
+/// \interface Bool
+/// \brief A message for boolean data
+/// \verbatim
+
+option java_outer_classname = "GzBool";
+
+message Bool
+{
+  required bool data = 1;
+}
+
+/// \endverbatim
diff --git a/simulation/gz_msgs/src/main/proto/driver-station.proto b/simulation/gz_msgs/src/main/proto/driver-station.proto
new file mode 100644
index 0000000..187e056
--- /dev/null
+++ b/simulation/gz_msgs/src/main/proto/driver-station.proto
@@ -0,0 +1,21 @@
+package gazebo.msgs;
+
+/// \ingroup gazebo_msgs
+/// \interface DriverStation
+/// \brief A message for DriverStation data
+/// \verbatim
+
+option java_outer_classname = "GzDriverStation";
+
+message DriverStation
+{
+  required bool enabled = 1;
+  enum State {
+    AUTO = 0;
+    TELEOP = 1;
+    TEST = 2;
+  }
+  required State state = 2;
+}
+
+/// \endverbatim
diff --git a/simulation/gz_msgs/src/main/proto/float64.proto b/simulation/gz_msgs/src/main/proto/float64.proto
new file mode 100644
index 0000000..dd3ddcc
--- /dev/null
+++ b/simulation/gz_msgs/src/main/proto/float64.proto
@@ -0,0 +1,15 @@
+package gazebo.msgs;
+
+/// \ingroup gazebo_msgs
+/// \interface Float64
+/// \brief A message for floating point data
+/// \verbatim
+
+option java_outer_classname = "GzFloat64";
+
+message Float64
+{
+  required double data = 1;
+}
+
+/// \endverbatim
diff --git a/simulation/gz_msgs/src/main/proto/frc_joystick.proto b/simulation/gz_msgs/src/main/proto/frc_joystick.proto
new file mode 100644
index 0000000..ec98aba
--- /dev/null
+++ b/simulation/gz_msgs/src/main/proto/frc_joystick.proto
@@ -0,0 +1,16 @@
+package gazebo.msgs;
+
+/// \ingroup gazebo_msgs
+/// \interface Joystick
+/// \brief A message for joystick data
+/// \verbatim
+
+option java_outer_classname = "GzFRCJoystick";
+
+message FRCJoystick
+{
+  repeated double axes = 1;
+  repeated bool buttons = 2;
+}
+
+/// \endverbatim