merged from frcsim branch

verified to work on real robots
adds sim eclipse plugins, fixed JavaGazebo, made wpilibC++Sim build on windows
 - Java and C++ simulation robot programs run on windows
 - simulation eclipse plugin delivers models and gazebo plugins
 - Java Gazebo now respects GAZEBO_IP variables and can work across networks
 - hal and network tables win32 hacked to work on windows
 - smart dashboard broken on windows due to network tables hacks
 - wpilibC++Sim, gz_msgs, and frcsim_gazebo_plugins build with CMake
 - removed constexpr for cross platform compatibility
 - msgs generated using .protos as a part of build process
 - some spare and unused cmake/pom files deleted
 - simulation ubuntu debians removed entirely
 - refactored CMake project flags and macros
 - updated to match non-sim C++ API
 - fixed and updated documentation
 - servo added to simulation

Change-Id: Ia702ff0f1fee10d77f543810ad88f56696443b05
This commit is contained in:
peter mitrano
2015-04-26 19:19:57 -04:00
parent 4e46692191
commit 29d029fa61
211 changed files with 2143 additions and 6491 deletions

5
.gitignore vendored
View File

@@ -179,8 +179,11 @@ __pycache__
# PDT-specific
.buildpath
# sbteclipse plugin
# sbteclipse plugin
.target
# TeXlipse plugin
.texlipse
#catkin stuff
package.xml

View File

@@ -1,30 +1,47 @@
Building everything requires Maven
mvn package -DembeddedJDKHome=/home/patrick/Downloads/arm-jdk1.7.0_45/
TODO... Explain maven....
TODO.. how to import into eclipse correctly...
Building everything requires Maven, and the arm jdk
Building C++ only
------------------
To build eclipse plugins (also build wpilibc/j)
========================
./gradlew eclipsePlugins //this is what is most often used
C++ requires cmake if not run from maven, and is much faster.
Make a new directory and then run:
```
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../arm-toolchain.cmake -G "MSYS Makefiles"
make # multicore add -j(num of cpu cores + 1), so -j3 on dual core for faster compile
make install DESTDIR=/some/dir/you/want/to/put/all/headers/and/libs #optional
``
other possible targets are "build" or "frcuserprogram"
Note that you will receive a warning about libstdc++, but the build should complete successfully
Alternatively, if you like IDEs, you can import it directly into QtDeveloper, or a number of other IDEs such as Code::Blocks or Eclipse. See CMake documentation for details.
Eclipse demo:
```
cd ..
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../allwpilib/arm-toolchain.cmake .. -G "Eclipse CDT4 - Unix Makefiles"
```
and then import that directory into eclipse. Eclipse will detect a CDT project and standard tools will work.
To build on CMake Projects (gz_msgs, frc_gazebo_plugins, WPILIbC++Sim
=========================
//STARTING FROM ALLWPILIB DIRECTORY
$> mkdir build
$> cd build
// on linux
$> cmake .. && make -j4
// on windows
$> ..\configure.bat
$> jom
## You can build subprojects of CMake stuff
To find all of them, you can navigate to "build" and type "make <tab> <tab>"
Examples:
make WPILibC++Sim
make dc_motor
make gz_msgs
make clean
## Note: For the latest version of FRCSim that uses the NI Driverstation, there is a circular dependency between CMake and Gradle projects.
wpilibc++sim depends on hal which is gradle, but eclipse plugins depends on wpilibc++sim which is cmake
so if you want everything to work nicely, run:
./gradlew :hal:build
mkdir build; cd build //if you haven't already done so
cmake .. && make -j4
./gradlew eclipsePlugins //or whatever else
Other gradle options
========================
./gradlew tasks //list some available tasks
TODO: Explain maven....
TODO: how to import into eclipse correctly...
GCC versions
------------

View File

@@ -1,20 +1,59 @@
cmake_minimum_required(VERSION 2.8)
project(All-WPILib)
set(CMAKE_BUILD_TYPE Debug)
# TODO: When the compiler allows us to actually call deprecated functions from
# within deprecated functions, remove -Wno-error=deprecated-declarations
# (this will cause calling deprecated functions to be treated as a warning
# rather than an error).
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -Wno-error=deprecated-declarations -fPIC")
project(AllC++Sim)
file(GLOB_RECURSE NI_LIBS ni-libraries/*.so*)
list(REMOVE_ITEM NI_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi.so ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi_2015.so)
SET(WPI_LD_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi.so ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi_2015.so)
get_filename_component(WPILIB_INCLUDES wpilibc/wpilibC++/include REALPATH)
get_filename_component(HAL_API_INCLUDES hal/include REALPATH)
get_filename_component(NWT_API_INCLUDES networktables/cpp/include REALPATH)
file(GLOB_RECURSE COM_SRC_FILES wpilibc/wpilibC++/src/*.cpp)
include(CheckCXXCompilerFlag)
include (FindPkgConfig)
include(GNUInstallDirs)
add_subdirectory(hal)
add_subdirectory(networktables/cpp)
add_subdirectory(wpilibc)
#copied from GazeboUtils.cmake
macro (APPEND_TO_CACHED_STRING _string _cacheDesc)
FOREACH (newItem ${ARGN})
SET (${_string} "${${_string}} ${newItem}" CACHE INTERNAL ${_cacheDesc} FORCE)
ENDFOREACH (newItem ${ARGN})
endmacro (APPEND_TO_CACHED_STRING)
#check for depenedencies
find_package(gazebo REQUIRED)
find_package(Boost COMPONENTS system filesystem REQUIRED)
find_package(Protobuf REQUIRED)
if (NOT PROTOBUF_FOUND)
MESSAGE ("Missing: Google Protobuf (libprotobuf-dev)")
endif()
if (NOT PROTOBUF_PROTOC_EXECUTABLE)
MESSAGE ( "Missing: Google Protobuf Compiler (protobuf-compiler)")
endif()
if (NOT PROTOBUF_PROTOC_LIBRARY)
MESSAGE ("Missing: Google Protobuf Compiler Library (libprotoc-dev)")
endif()
#on windows we produce .dlls with no prefix
if(WIN32)
#allows us to define constexpr and noexcept in macros
#since msvc 2013 doesn't support them
add_definitions(-D_ALLOW_KEYWORD_MACROS)
# defines things like M_PI
add_definitions(-D_USE_MATH_DEFINES)
# get rid of min max macros on windows
add_definitions(-DNOMINMAX)
# aww yea
add_definitions(-DWIN32_LEAN_AND_MEAN)
SET(CMAKE_FIND_LIBRARY_PREFIXES "")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
endif()
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFRC_SIMULATOR /MDd /Zi")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -DFRC_SIMULATOR -Wno-unused-parameter -pthread -fPIC -fpermissive")
endif()
include_directories("build")
add_subdirectory(simulation/gz_msgs)
add_subdirectory(wpilibc/wpilibC++Sim)
add_subdirectory(simulation/frc_gazebo_plugins)

2
cmake/.gitignore vendored
View File

@@ -1,2 +0,0 @@
*~
target/

View File

@@ -1,151 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.wpi.first.wpilib.cmake</groupId>
<artifactId>cpp-root</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>unix-properties</id>
<properties>
<cmakeGenerator>Unix Makefiles</cmakeGenerator>
</properties>
<activation>
<os>
<family>unix</family>
</os>
</activation>
</profile>
<profile>
<id>MAC-properties</id>
<properties>
<cmakeGenerator>Unix Makefiles</cmakeGenerator>
</properties>
<activation>
<os>
<family>mac</family>
</os>
</activation>
</profile>
<profile>
<id>windows-properties</id>
<properties>
<cmakeGenerator>MSYS Makefiles</cmakeGenerator>
</properties>
<activation>
<os>
<family>windows</family>
</os>
</activation>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-maven-plugin</artifactId>
<version>2.8.11-b4</version>
<executions>
<execution>
<id>cmake</id>
<phase>generate-resources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<options>
<option>-DCMAKE_TOOLCHAIN_FILE=../../../arm-toolchain.cmake</option>
<option>-DCMAKE_INSTALL_PREFIX=target-root</option>
</options>
</configuration>
</execution>
<execution>
<id>cmake2</id>
<phase>generate-resources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<target>install</target>
</configuration>
</execution>
</executions>
<configuration>
<sourcePath>..</sourcePath>
<targetPath>${project.build.directory}/cmake</targetPath>
<projectDirectory>${project.build.directory}/cmake</projectDirectory>
<generator>${cmakeGenerator}</generator>
<buildType>release</buildType>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<!-- Set time stamp and version properties. -->
<execution>
<id>set-version-info</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<target>
<tstamp>
<format property="timestamp" pattern="yyyy/MM/dd HH:mm:ss z"/>
</tstamp>
<tstamp>
<format property="version-info" pattern="yyyy.MMdd.HHmmss"/>
</tstamp>
<property name="version" value="${version-info}.${build-number}"/>
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
</execution>
<!-- Unzip the include files for cpp.zip. -->
<execution>
<id>unzip-cpp-includes</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo file="${project.build.directory}/cmake/target-root/so.properties">cpp-sos=${version-info}</echo>
<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/cmake/target-root" />
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>zip-cpp-includes</id>
<phase>compile</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.build.finalName}.zip</file>
<type>zip</type>
</artifact>
<artifact>
<file>${project.build.directory}/cmake/target-root/lib/libHALAthena.a</file>
<type>a</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

46
configure.bat Normal file
View File

@@ -0,0 +1,46 @@
:: This file is a helper for allC++Sim
::
:: Usage: cd /build && ../configure
::
:: WARNING -- this is only temporary, and only meant for debug, and only works on my computer
@set WS=C:\Users\peter\gz-ws
@set BOOST_PATH=%WS%\boost_1_56_0
@set BOOST_LIBRARY_DIR=%BOOST_PATH%\lib64-msvc-12.0
@set PROTOBUF_PATH=%WS%\protobuf-2.6.0-win64-vc12
@set OGRE_PATH=%WS%\ogre_src_v1-8-1-vc12-x64-release-debug\build\install\Debug
@set OGRE_INCLUDE_DIR=%OGRE_PATH%\include;%OGRE_PATH%\include\OGRE;%OGRE_PATH%\include\OGRE\RTShaderSystem;%OGRE_PATH%\include\OGRE\Terrain;%OGRE_PATH%\include\OGRE\Paging
@set OGRE_LIBRARY_DIR=%OGRE_PATH%\lib\Debug
set OGRE_LIB_SUFFIX=_d.lib
@set OGRE_LIBS=%OGRE_LIBRARY_DIR%\OgreMain%OGRE_LIB_SUFFIX%;%OGRE_LIBRARY_DIR%\OgreOverlay%OGRE_LIB_SUFFIX%;%OGRE_LIBRARY_DIR%\OgreRTShaderSystem%OGRE_LIB_SUFFIX%;%OGRE_LIBRARY_DIR%\OgreTerrain%OGRE_LIB_SUFFIX%;%OGRE_LIBRARY_DIR%\OgrePaging%OGRE_LIB_SUFFIX%
@set OGRE_LIBS=%OGRE_LIBRARY_DIR%\OgreMain%OGRE_LIB_SUFFIX%;%OGRE_LIBRARY_DIR%\OgreRTShaderSystem%OGRE_LIB_SUFFIX%;%OGRE_LIBRARY_DIR%\OgreTerrain%OGRE_LIB_SUFFIX%;%OGRE_LIBRARY_DIR%\OgrePaging%OGRE_LIB_SUFFIX%
@set FREEIMAGE_PATH=%WS%\FreeImage-vc12-x64-release-debug
@set FREEIMAGE_INCLUDE_DIR=%FREEIMAGE_PATH%\Source
@set TBB_PATH=%WS%\tbb43_20141023oss
@set TBB_INCLUDEDIR=%TBB_PATH%\include
@set DLFCN_WIN32_PATH=%WS%\dlfcn-win32-vc12-x64-release-debug\build\install\Debug
@set DLFCN_WIN32_INCLUDE_DIR=%DLFCN_WIN32_PATH%\include
@set TINY_XML_INCLUDE_DIR=%WS%\sdformat\src\win\tinyxml
@set GAZEBO_PATH=%WS%\gazebo\build\install\Debug\lib\cmake\gazebo
@set SDFORMAT_PATH=%WS%\sdformat\build\install\Debug\lib\cmake\sdformat
@set IGNITION-MATH_PATH=%WS%\ign-math\build\install\Debug\lib\cmake\ignition-math2
@set INCLUDE=%TINY_XML_INCLUDE_DIR%;%FREEIMAGE_INCLUDE_DIR%;%TBB_INCLUDEDIR%;%DLFCN_WIN32_INCLUDE_DIR%;%INCLUDE%
@set LIB=%LIB%
cmake -G "NMake Makefiles"^
-DCMAKE_INSTALL_PREFIX=build^
-DCMAKE_PREFIX_PATH="%GAZEBO_PATH%;%SDFORMAT_PATH%;%IGNITION-MATH_PATH%"^
-DOGRE_FOUND=1^
-DOGRE_INCLUDE_DIRS="%OGRE_INCLUDE_DIR%"^
-DOGRE_LIBRARIES="%OGRE_LIBS%"^
-DPROTOBUF_SRC_ROOT_FOLDER="%PROTOBUF_PATH%"^
-DBOOST_ROOT="%BOOST_PATH%"^
-DBOOST_LIBRARYDIR="%BOOST_LIBRARY_DIR%"^
..

View File

@@ -1,6 +1,8 @@
package edu.wpi.first.wpilib.plugins.core.installer;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -45,7 +47,38 @@ public abstract class AbstractInstaller {
*/
protected abstract InputStream getInstallResourceStream();
public void installIfNecessary() {
/**
*
* @param sourcePath the file location of the zip file EX "/resources/simuation.zip"
* @param destinationPath the file location to unzip into EX "/home/peter/wpilib/simulation/plugins"
*/
public void installIfNecessary(String sourcePath, String destinationPath){
//we're installing from this directory
InputStream sourceStream;
try {
sourceStream = new FileInputStream(sourcePath);
File destFile = new File(destinationPath);
installIfNecessary(sourceStream, destFile);
} catch (FileNotFoundException e) {
WPILibCore.logInfo("source zip file was not found: "+sourcePath);
}
}
/**
* This function will delete an old wpilib subfolder if necessary and then copy
* the resource stream to the intended directory.
*
* @throws InstallException if bad things happen ...
*/
public void installIfNecessary(){
installIfNecessary(getInstallResourceStream(), installLocation);
}
/**
* I'm thinking maybe instead of final things,
* create a UnzipJob class to extend Job and have these as parameters to the constructor*
*/
public void installIfNecessary(final InputStream sourceStream,final File destination) {
final Job installJob = new Job("Install " + getFeatureName()) {
@Override
@@ -56,14 +89,14 @@ public abstract class AbstractInstaller {
if (!isInstalled()) {
WPILibCore.logInfo("Install necessary for " + getFeatureName());
try {
install();
install(sourceStream,destination);
} catch (InstallException e) {
WPILibCore.logError("Error installing "+getFeatureName(), e);
return new Status(IStatus.ERROR, WPILibCore.PLUGIN_ID,
getErrorMessage(e));
}
}
updateInstalledVersion(version);
WPILibCore.logInfo("Installed" + getFeatureName());
@@ -98,6 +131,7 @@ public abstract class AbstractInstaller {
}
/**
*
* This function has been updated to guarantee that the wpilib folder date
* is older than the jar file being run, which ensures up to date tools.
*
@@ -108,38 +142,41 @@ public abstract class AbstractInstaller {
}
/**
* This function will delete an old wpilib subfolder if necessary and then copy
* the resource stream to the intended directory.
*
* @throws InstallException if bad things happen ...
* @TODO this function is very long and complicated. If all it does is unzip, it shouldn't be so hard.
*
* @param sourceStream input stream of zip file
* @param destination desired location for output of unzipping
* @throws InstallException
*/
protected void install() throws InstallException {
if(installLocation.exists()) {
if(!removeFileHandler(installLocation, true)) {
protected void install(InputStream sourceStream, File destination) throws InstallException {
if(destination.exists()) {
if(!removeFileHandler(destination, true)) {
MessageDialog.openError(null, "Error",
String.format("Could not update the old wpilib folder.%n"
+ "Please close any WPILib tools and restart Eclipse."));
}
//removeFileHandler(installLocation, false);
}
installLocation.mkdirs();
destination.mkdirs();
final String osName = System.getProperty("os.name");
try {
if (osName.startsWith("Mac OS X") || osName.startsWith("Linux")) { // Unix-like OSes must preserve the executable bit; call unzip
// Unix-like OSes must preserve the executable bit; call unzip
if (osName.startsWith("Mac OS X") || osName.startsWith("Linux")) {
final File tmpFile = File.createTempFile(getFeatureName()+"-", ".zip");
try {
// Copy to temporary file
try (final InputStream zip = getInstallResourceStream();
try (final InputStream zip = sourceStream;
final FileOutputStream fout = new FileOutputStream(tmpFile)) {
copyStreams(zip, fout);
}
// Call 'unzip'
final String[] cmd = {"unzip" , "-o", tmpFile.getAbsolutePath(), "-d", installLocation.getAbsolutePath()};
WPILibCore.logInfo("unzip "+tmpFile.getAbsolutePath()+" -d "+installLocation.getAbsolutePath());
final Process unzipProcess = DebugPlugin.exec(cmd, installLocation);
final String[] cmd = {"unzip", "-q", "-o", tmpFile.getAbsolutePath(), "-d", destination.getAbsolutePath()};
WPILibCore.logInfo("unzip "+tmpFile.getAbsolutePath()+" -d "+destination.getAbsolutePath());
final Process unzipProcess = DebugPlugin.exec(cmd, destination);
try (final InputStream is = unzipProcess.getInputStream()) {
copyStreams(is, System.out); // Copy output to console
}
@@ -153,11 +190,11 @@ public abstract class AbstractInstaller {
tmpFile.delete();
}
} else {
ZipInputStream zip = new ZipInputStream(getInstallResourceStream());
ZipInputStream zip = new ZipInputStream(sourceStream);
ZipEntry entry = zip.getNextEntry();
while (entry != null) {
WPILibCore.logInfo("\tZipEntry " + entry + ": " + entry.getSize());
File f = new File(installLocation, entry.getName());
File f = new File(destination, entry.getName());
if (entry.isDirectory()) {
f.mkdirs();
} else {
@@ -176,6 +213,7 @@ public abstract class AbstractInstaller {
}
}
private static void copyStreams(InputStream source, OutputStream destination) throws IOException {
byte[] buffer = new byte[1024];
int len;

View File

@@ -3,6 +3,7 @@ package edu.wpi.first.wpilib.plugins.core.launching;
import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import java.lang.System;
import java.net.URI;
import java.net.URISyntaxException;
@@ -15,7 +16,7 @@ import edu.wpi.first.wpilib.plugins.core.WPILibCore;
public class SimulationNotification {
private static final String URL = "https://wpilib.screenstepslive.com/s/4485/m/23353";
private static final String SIMULATION_UNSUPPORTED_MSG =
"Simulation is unsupported on your current setup.\n" +
"Simulation may not be support on your operating system.\n" +
"For more information see: " + URL;
public static void showUnsupported() {
@@ -32,12 +33,8 @@ public class SimulationNotification {
}
public static boolean supportsSimulation() {
String[] cmd = {"frcsim", "--version"};
try {
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
return true;
} catch (CoreException e) {
return false;
}
String os = System.getProperty("os.name");
//for now this is good enough, but we still need better handling if they have this OS but have not installed FRCSim
return (os.equals("Windows 8") || os.equals("Windows 7") || os.equals("Linux") || os.equals("Windows 8.1"));
}
}

View File

@@ -25,6 +25,7 @@
</resource>
</resources>
<plugins>
<!--copy the ant resources from src/main/resrouces/cpp-zip to target/resources/cpp-zip to cpp-zip -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>

View File

@@ -3,7 +3,13 @@
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/GearsBotCPPWin"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/GearsBotCPPWin/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="GearsBotCPPWin" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
@@ -12,7 +18,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="Debug" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.379433867" name="Cross GCC" nonInternalBuilderId="cdt.managedbuild.builder.gnu.cross" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="cdt.managedbuild.option.gnu.cross.prefix.541714056" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-frc-linux-gnueabi-" valueType="string"/>
@@ -58,10 +64,11 @@
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" moduleId="org.eclipse.cdt.core.settings" name="Simulate">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" moduleId="org.eclipse.cdt.core.settings" name="Linux Simulate">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
@@ -70,27 +77,31 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" name="Simulate" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="Linux Simulate" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" name="Linux Simulate" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.base.1184188597" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1621111203" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="cdt.managedbuild.target.gnu.platform.base.1621111203" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder buildPath="${workspace_loc:/${ProjName}}/Simulate" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.target.gnu.builder.base.840272037" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.158466008" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2105416021" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2105416021" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<option id="gnu.cpp.compiler.option.include.paths.1645322059" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/src&quot;"/>
<listOptionValue builtIn="false" value="${WPILIB}/cpp/current/sim/include"/>
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="/usr/include/gazebo-3.2"/>
<listOptionValue builtIn="false" value="/usr/include/sdformat-2.2"/>
<listOptionValue builtIn="false" value="/usr/include/gazebo-5.0"/>
<listOptionValue builtIn="false" value="/usr/include/sdformat-2.3"/>
</option>
<option id="gnu.cpp.compiler.option.optimization.level.1648211502" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.937474733" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1023092361" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"/>
<option id="gnu.cpp.compiler.option.dialect.std.1098415592" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.dialect.flags.389754588" superClass="gnu.cpp.compiler.option.dialect.flags" value="-std=c++11" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1758810658" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.2039239712" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.2100353684" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.1900634657" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.dialect.std.1352883605" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1197133064" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.66697269" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
@@ -108,7 +119,7 @@
</option>
<option id="gnu.cpp.link.option.paths.1677933356" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="/usr/lib/x86_64-linux-gnu"/>
<listOptionValue builtIn="false" value="/usr/lib/x86_64-linux-gnu/gazebo-2.2/plugins"/>
<listOptionValue builtIn="false" value="/usr/lib/x86_64-linux-gnu/gazebo-5.0/plugins"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.152327207" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@@ -124,26 +135,149 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128" moduleId="org.eclipse.cdt.core.settings" name="Windows Simulate">
<externalSettings>
<externalSetting>
<entry flags="RESOLVED" kind="includePath" name="C:\Users\peter\wpilib\cpp\current\include"/>
<entry flags="RESOLVED" kind="includePath" name="C:\Users\peter\gz-ws\gazebo_sketchy\build\install\Debug\include"/>
<entry flags="RESOLVED" kind="includePath" name="C:\Users\peter\gz-ws\sdformat\build\install\Debug\include"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="includePath" name="/GearsBotCPPWin/src"/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="exe" artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="Windows Simulate" errorParsers="org.eclipse.cdt.core.VCErrorParser" id="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128" name="Windows Simulate" parent="cdt.managedbuild.config.gnu.mingw.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="setup environment variables" prebuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.cross.base.592056279" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
<option id="cdt.managedbuild.option.gnu.cross.prefix.773876502" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
<option id="cdt.managedbuild.option.gnu.cross.path.1970286339" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1773189260" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/GearsBotCPPWIN}/Windows Simulate" errorParsers="" id="org.eclipse.cdt.build.core.internal.builder.132963544" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="" id="cdt.managedbuild.tool.gnu.cross.c.compiler.1872033968" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.172352140" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.273333971" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.default" valueType="enumerated"/>
<option id="gnu.c.compiler.option.misc.other.1387357347" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1953150292" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool command="&quot;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl&quot;" commandLinePattern="${COMMAND} ${FLAGS} /Fo${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} /wd4068 /EHsc" errorParsers="" id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.809153465" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.include.paths.599803694" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\wpilib\cpp\current\sim\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\allwpilib\wpilibc\wpilibC++Sim\msgs\build&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Program Files (x86)\Windows Kits\8.1\Include\um&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Program Files (x86)\Windows Kits\8.1\Include\shared&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\gazebo\build\install\Debug\include\gazebo-6.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\sdformat\build\install\Debug\include\sdformat-3.0&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\ign-math\build\install\Debug\include\ignition\math2&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\FreeImage-vc12-x64-release-debug\Source&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\protobuf-2.6.0-win64-vc12\src&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\dlfcn-win32-vc12-x64-release-debug\build\install\Debug\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\tbb43_20141023oss\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\sdformat\src\win\tinyxml&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\pthread-w32\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\peter\gz-ws\boost_1_56_0&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.optimization.level.1265709272" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.1058836115" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.dialect.std.2006680120" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.warnings.allwarn.2144515316" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.other.other.1677876881" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="/c /MDd" valueType="string"/>
<option id="gnu.cpp.compiler.option.other.pic.594318292" name="Position Independent Code (-fPIC)" superClass="gnu.cpp.compiler.option.other.pic" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1865235685" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_USE_MATH_DEFINES"/>
<listOptionValue builtIn="false" value="WIN32_LEAN_AND_MEAN"/>
<listOptionValue builtIn="false" value="NOMINMAX"/>
<listOptionValue builtIn="false" value="FRC_SIMULATOR"/>
</option>
<option id="gnu.cpp.compiler.option.debugging.other.183827657" name="Other debugging flags" superClass="gnu.cpp.compiler.option.debugging.other" useByScannerDiscovery="false" value="/Z7" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1150869869" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1090661906" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
<tool command="&quot;C:\Program Files (x86)\Microsoft Visual Studio 12.0\vc\bin\link&quot;" commandLinePattern="${COMMAND} /ignore:4099 /LIBPATH:&quot;C:\Users\peter\gz-ws\FreeImage-vc12-x64-release-debug\x64\Debug\DLL&quot; /LIBPATH:&quot;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\boost_1_56_0\lib64-msvc-12.0&quot; /LIBPATH:&quot;${WPILIB}\cpp\current\sim\lib&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\dlfcn-win32-vc12-x64-release-debug\build\install\Debug\lib&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\pthread-w32\lib\x64&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\ign-math\build\install\Debug\lib&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\libcurl-vc12-x64-release-debug-static-ipv6-sspi-winssl\Debug\lib&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\sdformat\build\install\Debug\lib&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\protobuf-2.6.0-win64-vc12\vsprojects\Debug&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\gazebo\build\install\Debug\lib&quot; /LIBPATH:&quot;C:\Users\peter\allwpilib\wpilibc\wpilibC++Sim\build&quot; /LIBPATH:&quot;C:\Users\peter\gz-ws\tbb43_20141023oss\lib\intel64\vc12&quot; /LIBPATH:&quot;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64&quot; /LIBPATH:&quot;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64&quot; ${FLAGS} /OUT:${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} /DEBUG WPILibSim.lib gazebo.lib gazebo_transport.lib gazebo_msgs.lib gazebo_common.lib gazebo_util.lib gazebo_client.lib gazebo_math.lib libprotobuf.lib sdformat.lib dl.lib libcurl_a_debug.lib ignition-math2.lib pthreadVC2.lib gz_msgs.lib IPHlpApi.lib /NODEFAULTLIB:libboost_system-vc120-mt-gd-1_56.lib /NODEFAULTLIB:libboost_thread-vc120-mt-gd-1_56.lib FreeImaged.lib" errorParsers="" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.680547965" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
<option id="gnu.cpp.link.option.libs.231732731" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs"/>
<option id="gnu.cpp.link.option.paths.122555745" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths"/>
<option id="gnu.cpp.link.option.shared.1816604740" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" value="false" valueType="boolean"/>
<option id="gnu.cpp.link.option.flags.761367792" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="" valueType="string"/>
<option id="gnu.cpp.link.option.other.715702568" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other"/>
<option id="gnu.cpp.link.option.userobjs.984105280" name="Other objects" superClass="gnu.cpp.link.option.userobjs"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1789925387" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
<outputType id="cdt.managedbuild.tool.gnu.cpp.linker.output.so.1893130812" outputPrefix="" superClass="cdt.managedbuild.tool.gnu.cpp.linker.output.so"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.976699519" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="" id="cdt.managedbuild.tool.gnu.cross.assembler.10555843" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.219135409" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="$project.cdt.managedbuild.target.gnu.cross.exe.13534228" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
<project id="GearsBotCPP.cdt.managedbuild.target.gnu.cross.exe.13534228" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Windows Simulate"/>
<configuration configurationName="Simulate">
<resource resourceType="PROJECT" workspacePath="/GearsBotCPP"/>
</configuration>
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/GearsBotCPP"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751;cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.;cdt.managedbuild.tool.gnu.cross.c.compiler.1261239456;cdt.managedbuild.tool.gnu.c.compiler.input.1793678673">
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.809153465;cdt.managedbuild.tool.gnu.cpp.compiler.input.1150869869">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;org.eclipse.cdt.msvc.cl.dll.debug.544581750;org.eclipse.cdt.msvc.cl.inputType.1806965547">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.msw.build.clScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;org.eclipse.cdt.msvc.cl.c.dll.debug.748290057;org.eclipse.cdt.msvc.cl.inputType.c.690275938">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.msw.build.clScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;cdt.managedbuild.tool.gnu.cross.c.compiler.1872033968;cdt.managedbuild.tool.gnu.c.compiler.input.1953150292">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;org.eclipse.cdt.msvc.cl.dll.debug.880390044;org.eclipse.cdt.msvc.cl.inputType.393977355">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.msw.build.clScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.1297766759;cdt.managedbuild.tool.gnu.cpp.compiler.input.498113544">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.785693711;cdt.managedbuild.tool.gnu.c.compiler.input.778242069">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1647706237;cdt.managedbuild.tool.gnu.cpp.compiler.input.1338339147">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751;cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1505235107;cdt.managedbuild.tool.gnu.cpp.compiler.input.1033680971">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/$project"/>
</configuration>
<configuration configurationName="Simulate">
<resource resourceType="PROJECT" workspacePath="/$project"/>
</configuration>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751;cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.;cdt.managedbuild.tool.gnu.cross.c.compiler.1261239456;cdt.managedbuild.tool.gnu.c.compiler.input.1793678673">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;org.eclipse.cdt.msvc.cl.c.dll.debug.1658947706;org.eclipse.cdt.msvc.cl.inputType.c.2076377067">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.msw.build.clScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128;cdt.managedbuild.config.gnu.mingw.exe.debug.912379410.387599128.;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.510224028;cdt.managedbuild.tool.gnu.c.compiler.input.323654435">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>

View File

@@ -5,11 +5,7 @@ build.dir=build
out.exe=Debug/${out}
# Simulation
simulation.world.file=/usr/share/frcsim/worlds/GearsBotDemo.world
sim.exe=Simulate/${out}
wpilib.sim=${wpilib}/sim
sim.tools=${wpilib.sim}/tools
sim.lib=${wpilib.sim}/lib
simulation.world.file=$world
# Use the current C++ library by default
cpp-version=current

View File

@@ -14,3 +14,9 @@ roboRIOAllowedImages=23
wpilib.ant.dir=${wpilib}/ant
jsch.jar=${wpilib.ant.dir}/jsch-0.1.50.jar
classloadertask.jar=${wpilib.ant.dir}/ant-classloadertask.jar
#simulation stuff
sim.exe=Simulate/${out}
wpilib.sim=${wpilib}/sim
sim.tools=${wpilib.sim}/tools
sim.lib=${wpilib.sim}/lib

View File

@@ -104,17 +104,15 @@
<target name="simulate">
<parallel>
<sequential>
<echo>[simulate] Running Gazebo.</echo>
<exec executable="frcsim">
<arg value="${simulation.world.file}"/>
</exec>
<!-- windows uses a batch file to run frcsim, linux uses a shell script -->
<condition property="frcsim.executable" value="frcsim.bat" else="frcsim">
<os family="windows" />
</condition>
<!-- TODO: launch gazebo once? -->
<echo>[simulate] You may now run Gazebo</echo>
</sequential>
<sequential>
<sleep seconds="5"/>
<echo>[simulate] Running DriverStation.</echo>
<java jar="${sim.tools}/SimDS.jar" fork="true">
<jvmarg value="-Djava.library.path=${sim.lib}" />
</java>
<echo>[simulate] You can now run your DriverStation!</echo>
</sequential>
<sequential>
<sleep seconds="5"/>

View File

@@ -174,17 +174,15 @@
<target name="simulate" depends="jar-for-simulation">
<parallel>
<sequential>
<echo>[simulate] Running Gazebo.</echo>
<exec executable="frcsim">
<arg value="${simulation.world.file}"/>
</exec>
<condition property="frcsim.executable" value="frcsim.bat" else="frcsim">
<os family="windows" />
</condition>
<!-- TODO: launch gazebo once? -->
<echo>[simulate] You may now run Gazebo</echo>
</sequential>
<sequential>
<sleep seconds="5"/>
<echo>[simulate] Running DriverStation.</echo>
<java jar="${wpilib.sim.tools}/SimDS.jar" fork="true">
<jvmarg value="-Djava.library.path=${wpilib.sim.lib}" />
</java>
<echo>[debug-simulate] You may now run your DriverStation.</echo>
</sequential>
<sequential>
<sleep seconds="5"/>
@@ -206,10 +204,7 @@
</sequential>
<sequential>
<sleep seconds="5"/>
<echo>[debug-simulate] Running DriverStation.</echo>
<java jar="${wpilib.sim.tools}/SimDS.jar" fork="true">
<jvmarg value="-Djava.library.path=${wpilib.sim.lib}" />
</java>
<echo>[debug-simulate] you may now run your DriverStation.</echo>
</sequential>
<sequential>
<sleep seconds="5"/>

View File

@@ -0,0 +1 @@
bin.includes = feature.xml

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="edu.wpi.first.wpilib.plugins.simulation.feature"
label="Feature"
version="1.0.0.qualifier">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<plugin
id="edu.wpi.first.wpilib.plugins.simulation"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="edu.wpi.first.wpilib.plugins.simulation.feature"
label="Robot Simulation Development"
version="0.1.0.qualifier"
provider-name="Worcester Polytechnic Institute">
<description>
FRC Robot Simulation Program Development Environment.
</description>
<copyright>
* Copyright (c) 2015 FIRST and WPI
* All rights reserved.
</copyright>
<license>
* Copyright (c) 2015 FIRST and WPI
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
* Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution. Neither the name of the FIRST nor the
* names of its contributors may be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS&apos;&apos;
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</license>
<includes
id="edu.wpi.first.wpilib.plugins.core.feature"
version="0.0.0"/>
<plugin
id="edu.wpi.first.wpilib.plugins.simulation"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>edu.wpi.first.wpilib.plugins.simulation.feature</artifactId>
<packaging>eclipse-feature</packaging>
<parent>
<groupId>edu.wpi.first.wpilib.plugins</groupId>
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
<version>0.1.0.qualifier</version>
<relativePath>..</relativePath>
</parent>
</project>

View File

@@ -0,0 +1,2 @@
#ignore libraries. They will be copied from frc_gazebo_plugins/build/plugins
*.so

View File

@@ -0,0 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WPILib_Robot_Simulation
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.simulation;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: edu.wpi.first.wpilib.plugins.simulation.WPILibSimulationPlugin
Require-Bundle: org.eclipse.core.runtime,
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
org.eclipse.jface;bundle-version="3.10.2",
org.eclipse.ui;bundle-version="3.106.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Worcester Polytechnic Institute

View File

@@ -0,0 +1,10 @@
#Notes on the simulation eclipse plugin
Should download models when installed
build with the rest of the eclipse plugins using:
//if you're in the eclipse-plugins directory
mvn package
//otherwise in the base dir
./gradlew eclipsePlugins //no colons here!

View File

@@ -0,0 +1,8 @@
source.. = src/main/java/
output.. = target/classes/
bin.includes = META-INF/,\
.,\
plugin.xml,\
resources/
src.include = src/,\
resources/

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.ui.startup">
<startup
class="edu.wpi.first.wpilib.plugins.simulation.WPILibSimulationPlugin">
</startup>
</extension>
</plugin>

View File

@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>edu.wpi.first.wpilib.plugins.simulation</artifactId>
<packaging>eclipse-plugin</packaging>
<parent>
<groupId>edu.wpi.first.wpilib.plugins</groupId>
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
<version>0.1.0.qualifier</version>
<relativePath>..</relativePath>
</parent>
<properties>
<build-number>DEVELOPMENT</build-number>
<simulation-zip>${project.build.directory}\simulation-zip</simulation-zip>
</properties>
<repositories>
<repository>
<id>WPILib Maven Repository</id>
<url>http://first.wpi.edu/FRC/roborio/maven/</url>
</repository>
</repositories>
<build>
<resources>
<resource>
<directory>.</directory>
<includes>
<include>resources/configuration.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-plugins-to-simulation-zip</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${simulation-zip}</outputDirectory>
<resources>
<resource>
<directory>../../build/simulation/frc_gazebo_plugins/</directory><!-- TODO do this with variables -->
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<!-- Set time stamp and version properties. -->
<execution>
<id>set-version-info</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<target>
<tstamp>
<format property="timestamp" pattern="yyyy/MM/dd HH:mm:ss z"/>
</tstamp>
<tstamp>
<format property="version-info" pattern="yyyy.MM.dd.HH.mm.ss"/>
</tstamp>
<property name="version" value="${version-info}.${build-number}"/>
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
</execution>
<!-- Generate zip file to unzip for the user. -->
<execution>
<id>generate-simulation-zip</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<zip destfile="${project.build.directory}/classes/resources/simulation.zip"
basedir="${simulation-zip}"
update="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<versionRange>[2.8,)</versionRange>
<goals>
<goal>copy</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<!-- Add fake dependencies to inform Maven of the correct
order it should build projects in during a multi-module build.
This list should match the list in the invocation of
maven-dependency-plugin:copy above.
It may be possible to avoid this duplication by using the
maven-assembly-plugin instead.-->
<!-- Library sources for debugging WPILib on the Athena -->
<dependency>
<groupId>edu.wpi.first.wpilib</groupId>
<artifactId>sfx</artifactId>
<type>zip</type>
<version>LATEST</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,2 @@
timestamp=${timestamp}
version=${version}

View File

@@ -0,0 +1,104 @@
package edu.wpi.first.wpilib.plugins.simulation;
/**
* @author peter mitrano <pdmitrano@wpi.edu>
*/
import java.io.File;
import java.util.Properties;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
import edu.wpi.first.wpilib.plugins.core.ant.AntPropertiesParser;
import edu.wpi.first.wpilib.plugins.simulation.installer.SimulationInstaller;
public class WPILibSimulationPlugin extends AbstractUIPlugin implements IStartup{
// The plug-in ID
public static final String PLUGIN_ID = "WPILib_Java_Robot_Development"; //$NON-NLS-1$
// The shared instance
private static WPILibSimulationPlugin plugin;
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
plugin = null;
super.stop(bundleContext);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static WPILibSimulationPlugin getDefault() {
return plugin;
}
public String getCurrentVersion() {
try {
Properties props = new AntPropertiesParser(
WPILibSimulationPlugin.class.getResourceAsStream("/resources/configuration.properties")).
getProperties();
if (props.getProperty("version").startsWith("$")) {
return "DEVELOPMENT";
} else {
return props.getProperty("version");
}
} catch (CoreException e) {
WPILibSimulationPlugin.logError("Error getting properties.", e);
return "DEVELOPMENT";
}
}
public String getSimulationDir() {
return WPILibCore.getDefault().getWPILibBaseDir()
+ File.separator + "simulation";
}
public String getPluginsDir() {
return getSimulationDir() + File.separator + "plugins";
}
public static void logInfo(String msg) {
getDefault().getLog().log(new Status(Status.INFO, PLUGIN_ID, Status.OK, msg, null));
}
private static void logError(String msg, CoreException e) {
getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e));
}
public String getJavaPath() {
return WPILibCore.getDefault().getWPILibBaseDir()
+ File.separator + "java" + File.separator + "current";
}
@Override
public void earlyStartup() {
SimulationInstaller simulationInstaller = new SimulationInstaller(getCurrentVersion());
//downloads and copies the models from collabnet and unzips to
//wpilib/simulation/models and wpilib/simulation/worlds
simulationInstaller.installModels();
//extracts and copies the gazebo plugins from simulation.zip to wpilib/simulation/plugins
simulationInstaller.installPlugins();
}
}

View File

@@ -0,0 +1,89 @@
package edu.wpi.first.wpilib.plugins.simulation.installer;
/**
* @author peter mitrano <pdmitrano@wpi.edu>
*/
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import javax.net.ssl.HttpsURLConnection;
import org.eclipse.jface.preference.IPreferenceStore;
import org.osgi.service.log.LogEntry;
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
import edu.wpi.first.wpilib.plugins.simulation.WPILibSimulationPlugin;
import edu.wpi.first.wpilib.plugins.simulation.preferences.PreferenceConstants;
public class SimulationInstaller extends AbstractInstaller {
public SimulationInstaller(String version) {
// copy gazebo plugins wpilib/simulation/plugins
super(version, WPILibSimulationPlugin.getDefault().getPreferenceStore()
.getString(PreferenceConstants.LIBRARY_INSTALLED),
WPILibSimulationPlugin.getDefault().getPluginsDir());
}
public void installModels() {
// download models
// temporarily hardcoding link, but should be smarter
String inputFilePath = WPILibSimulationPlugin.getDefault()
.getSimulationDir() + File.separator + "models.zip";
File inputFile = new File(inputFilePath);
try {
if (inputFile.exists()) {
WPILibSimulationPlugin.logInfo("models doesn't need to be downloaded again");
} else {
URL url = new URL("https://usfirst.collab.net/sf/frs/do/downloadFile/projects.wpilib/frs.simulation.frcsim_gazebo_models/frs1162?dl=1");
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
try (InputStream stream = con.getInputStream()) {
WPILibSimulationPlugin.logInfo("downloading models zip");
Files.copy(stream, Paths.get(inputFilePath));
}
}
// unzip
WPILibSimulationPlugin.logInfo("unzipping to "+ WPILibSimulationPlugin.getDefault().getSimulationDir());
super.installIfNecessary(inputFilePath, WPILibSimulationPlugin.getDefault().getSimulationDir());
} catch (MalformedURLException mue) {
WPILibSimulationPlugin
.logInfo("Malformed URL Exception when downloading models");
WPILibSimulationPlugin.logInfo(mue.getLocalizedMessage());
} catch (IOException ioe) {
WPILibSimulationPlugin
.logInfo("IO Exception when downloading models");
WPILibSimulationPlugin.logInfo(ioe.getLocalizedMessage());
}
}
public void installPlugins() {
super.installIfNecessary();
}
@Override
protected String getFeatureName() {
return "simulation";
}
@Override
protected void updateInstalledVersion(String version) {
IPreferenceStore prefs = WPILibSimulationPlugin.getDefault()
.getPreferenceStore();
prefs.setValue(PreferenceConstants.LIBRARY_INSTALLED, version);
}
@Override
protected InputStream getInstallResourceStream() {
return SimulationInstaller.class
.getResourceAsStream("/resources/simulation.zip");
}
}

View File

@@ -0,0 +1,10 @@
package edu.wpi.first.wpilib.plugins.simulation.preferences;
/**
* @author peter mitrano <pdmitrano@wpi.edu>
*
* Constant definitions for plug-in preferences
*/
public class PreferenceConstants {
public static final String LIBRARY_INSTALLED = "libraryVersion_current";
}

View File

@@ -0,0 +1,25 @@
package edu.wpi.first.wpilib.plugins.simulation.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
/**
* @author peter mitrano <pdmitrano@wpi.edu>
*
* Class used to initialize default preference values.
*/
public class PreferenceInitializer extends AbstractPreferenceInitializer {
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
IPreferenceStore store = WPILibCore.getDefault().getPreferenceStore();
if (!store.contains(PreferenceConstants.LIBRARY_INSTALLED))
store.setValue(PreferenceConstants.LIBRARY_INSTALLED, "none");
}
}

View File

@@ -6,6 +6,9 @@
<feature url="features/edu.wpi.first.wpilib.plugins.java.feature_0.1.0.qualifier.jar" id="edu.wpi.first.wpilib.plugins.java.feature" version="0.1.0.qualifier">
<category name="edu.wpi.first.wpilib.plugins"/>
</feature>
<feature url="features/edu.wpi.first.wpilib.plugins.simulation.feature_0.1.0.qualifier.jar" id="edu.wpi.first.wpilib.plugins.simulation.feature" version="0.1.0.qualifier">
<category name="edu.wpi.first.wpilib.plugins"/>
</feature>
<category-def name="edu.wpi.first.wpilib.plugins" label="WPILib Robot Development">
<description>
Core WPILib Robot Development Tools.

View File

@@ -11,6 +11,8 @@
<modules>
<module>edu.wpi.first.wpilib.plugins.core</module>
<module>edu.wpi.first.wpilib.plugins.core.feature</module>
<module>edu.wpi.first.wpilib.plugins.simulation</module>
<module>edu.wpi.first.wpilib.plugins.simulation.feature</module>
<module>edu.wpi.first.wpilib.plugins.cpp</module>
<module>edu.wpi.first.wpilib.plugins.cpp.feature</module>
<module>edu.wpi.first.wpilib.plugins.java</module>

View File

@@ -4,7 +4,11 @@
#include <iomanip>
#include <string>
#include <stdio.h>
#include <sys/time.h>
#ifdef _WIN32
#include <Windows.h>
#else
#include <sys/time.h>
#endif
inline std::string NowTime();
@@ -88,6 +92,17 @@ typedef Log FILELog;
if (level > FILELog::ReportingLevel()) ; \
else Log().Get(level)
#ifdef _WIN32
inline std::string NowTime()
{
SYSTEMTIME st;
GetLocalTime(&st);
char result[100] = {0};
sprintf(result, "%d:%d:%d.%d", st.wHour , st.wMinute , st.wSecond , st.wMilliseconds);
return result;
}
#else
inline std::string NowTime()
{
char buffer[11];
@@ -101,3 +116,4 @@ inline std::string NowTime()
sprintf(result, "%s.%03ld", buffer, (long)tv.tv_usec / 1000);
return result;
}
#endif

View File

@@ -0,0 +1,10 @@
//this file is used for hacking
#ifndef NT_BASE_H_
#define NT_BASE_H_
#if defined(_MSC_VER)
#define noexcept throw()
#endif
#endif

View File

@@ -8,23 +8,22 @@
#define _ERROR_BASE_H
#if defined WIN32
#include <semLib.h>
#define wpi_setErrnoErrorWithContext(context)
#define wpi_setErrnoError()
#define wpi_setImaqErrorWithContext(code, context)
#define wpi_setErrorWithContext(code, context)
#define wpi_setError(code)
#define wpi_setStaticErrorWithContext(object, code, context)
#define wpi_setErrnoErrorWithContext(context)
#define wpi_setErrnoError()
#define wpi_setImaqErrorWithContext(code, context)
#define wpi_setErrorWithContext(code, context)
#define wpi_setError(code)
#define wpi_setStaticErrorWithContext(object, code, context)
#define wpi_setStaticError(object, code)
#define wpi_setGlobalErrorWithContext(code, context)
#define wpi_setGlobalError(code)
#define wpi_setGlobalErrorWithContext(code, context)
#define wpi_setGlobalError(code)
#define wpi_setWPIErrorWithContext(error, context)
#define wpi_setWPIError(error)
#define wpi_setStaticWPIErrorWithContext(object, error, context)
#define wpi_setStaticWPIError(object, error)
#define wpi_setGlobalWPIErrorWithContext(error, context)
#define wpi_setGlobalWPIError(error)
#define wpi_setWPIError(error)
#define wpi_setStaticWPIErrorWithContext(object, error, context)
#define wpi_setStaticWPIError(object, error)
#define wpi_setGlobalWPIErrorWithContext(error, context)
#define wpi_setGlobalWPIError(error)
/**
* Base class for most objects.
@@ -35,7 +34,7 @@ class ErrorBase
{
//TODO: Consider initializing instance variables and cleanup in destructor
public:
};
#endif

View File

@@ -10,31 +10,6 @@
#define NT_CRITICAL_REGION(s) { NTSynchronized _sync(s);
#define NT_END_REGION }
#if defined WIN32
#include <semLib.h>
class NTReentrantSemaphore
{
public:
explicit NTReentrantSemaphore(){
m_semaphore = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE | SEM_DELETE_SAFE);
};
~NTReentrantSemaphore(){
semDelete(m_semaphore);
};
void take(){
semTake(m_semaphore, WAIT_FOREVER);
};
void give(){
semGive(m_semaphore);
};
private:
SEM_ID m_semaphore;
};
#else
#include <pthread.h>
class NTReentrantSemaphore
@@ -59,7 +34,6 @@ private:
pthread_mutexattr_t mta;
pthread_mutex_t m_semaphore;
};
#endif // WIN32
/**
* Provide easy support for critical regions.
@@ -76,18 +50,9 @@ class NTSynchronized
public:
explicit NTSynchronized(NTReentrantSemaphore&);
//TODO remove vxworks SEM_ID support
#if defined WIN32
explicit NTSynchronized(SEM_ID);
#endif
virtual ~NTSynchronized();
private:
#if defined WIN32
bool usingSem;
NTReentrantSemaphore* m_sem;
SEM_ID m_semaphore;
#else
NTReentrantSemaphore& m_semaphore;
#endif
};

View File

@@ -1,75 +0,0 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
/*----------------------------------------------------------------------------*/
#ifndef __NTTASK_H__
#define __NTTASK_H__
#if defined WIN32
#include "NTErrorBase.h"
/**
* WPI task is a wrapper for the native Task object.
* All WPILib tasks are managed by a static task manager for simplified cleanup.
**/
class NTTask : public ErrorBase
{
public:
static const UINT32 kDefaultPriority = 101;
static const INT32 kInvalidTaskID = -1;
NTTask(const char* name, FUNCPTR function, INT32 priority = kDefaultPriority, UINT32 stackSize = 20000);
virtual ~NTTask();
NTTask(const NTTask&) = delete;
NTTask& operator=(const NTTask&) = delete;
#ifdef WIN32
bool Start(void * arg0);
#else
bool Start(UINT32 arg0 = 0, UINT32 arg1 = 0, UINT32 arg2 = 0, UINT32 arg3 = 0, UINT32 arg4 = 0,
UINT32 arg5 = 0, UINT32 arg6 = 0, UINT32 arg7 = 0, UINT32 arg8 = 0, UINT32 arg9 = 0);
#endif
bool Restart();
bool Stop();
bool IsReady();
bool IsSuspended();
bool Suspend();
bool Resume();
bool Verify();
INT32 GetPriority();
bool SetPriority(INT32 priority);
const char* GetName();
INT32 GetID();
#ifdef WIN32
FUNCPTR m_function;
void * m_Arg;
#endif
private:
char* m_taskName;
#ifdef WIN32
bool StartInternal();
HANDLE m_Handle;
DWORD m_ID;
#else
FUNCPTR m_function;
INT32 m_taskID;
#endif
UINT32 m_stackSize;
INT32 m_priority;
bool HandleError(STATUS results);
};
#endif // WIN32
#endif // __TASK_H__

View File

@@ -8,6 +8,7 @@
#ifndef BADMESSAGEEXCEPTION_H_
#define BADMESSAGEEXCEPTION_H_
#include "NTBase.h"
#include <exception>
#include <string>

View File

@@ -17,11 +17,7 @@ class PeriodicNTThread;
#include "networktables2/thread/NTThreadManager.h"
#include "networktables2/thread/NTThread.h"
#if defined WIN32
#include "OSAL/Task.h"
#else
#include <pthread.h>
#endif
class DefaultThreadManager : public NTThreadManager{
public:
@@ -30,21 +26,11 @@ public:
class PeriodicNTThread : public NTThread {
private:
#if defined WIN32
const char* name;
NTTask* thread;
#else
pthread_t thread;
#endif
PeriodicRunnable* r;
bool run;
#if defined WIN32
int _taskMain();
static int taskMain(PeriodicNTThread* o);
#else//TODO make return int for pthread as well
void _taskMain();
static void* taskMain(PeriodicNTThread* o);
#endif
public:
PeriodicNTThread(PeriodicRunnable* r, const char* name);
virtual ~PeriodicNTThread();

View File

@@ -8,6 +8,7 @@
#ifndef IOEXCEPTION_H_
#define IOEXCEPTION_H_
#include "NTBase.h"
#include <exception>
/**
@@ -17,31 +18,31 @@ class IOException : public std::exception{
public:
/**
* Creates a new IOException with the given message.
*
*
* @param message The message to associate with this exception.
*/
IOException(const char* message);
/**
* Creates a new IOException with the given message and
* error value.
*
*
* @param message The message to associate with this exception.
* @param errorValue The integer code to associate with this exception.
*/
IOException(const char* message, int errorValue);
/**
* Gets the message associated with this exception.
*
*
* @return The message associated with this exception.
*/
const char* what() const noexcept;
/**
* Determines whether this exception indicates that an EOF
* was encountered.
*
*
* @return True if this exception indicates that an EOF was encountered.
* False otherwise.
*/

View File

@@ -8,6 +8,7 @@
#ifndef ILLEGALSTATEEXCEPTION_H_
#define ILLEGALSTATEEXCEPTION_H_
#include "NTBase.h"
#include <exception>
#include <string>

View File

@@ -8,10 +8,9 @@
#ifndef ITABLELISTENER_H_
#define ITABLELISTENER_H_
class ITableListener;
#include "NTBase.h"
#include "tables/ITable.h"
#include <memory>
@@ -42,7 +41,11 @@ class ITableListener {
private:
template <class T>
struct[[deprecated]] NullDeleter {
struct
#if !defined(_MSC_VER)
[[deprecated]]
#endif
NullDeleter {
void operator()(T*) const noexcept {};
};
};

View File

@@ -3,78 +3,22 @@
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
/*----------------------------------------------------------------------------*/
#include "stdafx.h"
// Previous version used semaphores.
// This version was copied from the "Athena" version of network tables.
// It uses pthread and is much simpler
#include "OSAL/Synchronized.h"
#include <stdlib.h>
//TODO see what the STATUS is suppose to return for success
STATUS semGive (SEM_ID semId)
pthread_mutexattr_t mta;
bool hasInit = false;
NTSynchronized::NTSynchronized(NTReentrantSemaphore& semaphore):m_semaphore(semaphore)
{
::LeaveCriticalSection( semId );
return 0;
}
STATUS semTake (SEM_ID semId, int timeout)
{
if (timeout==WAIT_FOREVER)
::EnterCriticalSection( semId );
else
{
BOOL result;
int TimeOut=0;
do
{
result=::TryEnterCriticalSection( semId );
if (result==0)
Sleep(10);
} while ((result==0)&&(TimeOut++<timeout));
assert(result!=0); //TODO timeout
}
return 0;
m_semaphore.take();
}
SEM_ID semMCreate (int options)
{
SEM_ID ret=new CRITICAL_SECTION;
::InitializeCriticalSection( ret );
return ret;
}
STATUS semDelete (SEM_ID semId)
{
::DeleteCriticalSection( semId );
delete semId;
return 0;
}
/**
* Synchronized class deals with critical regions.
* Declare a Synchronized object at the beginning of a block. That will take the semaphore.
* When the code exits from the block it will call the destructor which will give the semaphore.
* This ensures that no matter how the block is exited, the semaphore will always be released.
* Use the CRITICAL_REGION(SEM_ID) and END_REGION macros to make the code look cleaner (see header file)
* @param semaphore The semaphore controlling this critical region.
*/
NTSynchronized::NTSynchronized(SEM_ID semaphore)
{
usingSem = false;
m_semaphore = semaphore;
semTake(m_semaphore, WAIT_FOREVER);
}
NTSynchronized::NTSynchronized(NTReentrantSemaphore& semaphore)
{
usingSem = true;
m_sem = &semaphore;
m_sem->take();
}
/**
* This destructor unlocks the semaphore.
*/
NTSynchronized::~NTSynchronized()
{
if(usingSem)
m_sem->give();
else
semGive(m_semaphore);
m_semaphore.give();
}

View File

@@ -6,15 +6,17 @@
* Author: Mitchell Wills
*/
#include "windows.h"
#include <Windows.h>
#include <Mmsystem.h>
#include "networktables2/util/System.h"
//#include "semLib.h"
#include <stdio.h>
//#include <sysLib.h> // for sysClkRateGet
//#include <usrLib.h> // for taskDelay
//timeGetTime() uses Winmm.lib
//timeGetTime() uses Winmm.lib
#pragma comment (lib,"Winmm.lib")
#pragma comment( lib, "Ws2_32" )
void sleep_ms(unsigned long ms){
//taskDelay((INT32)((double)sysClkRateGet() * ms / 1000));
Sleep(ms);

View File

@@ -1,316 +0,0 @@
#include "stdafx.h"
#include "OSAL/Task.h"
#include "NetworkCommunication/UsageReporting.h"
#include "WPIErrors.h"
#include <string.h>
#include <Windows.h>
//const UINT32 NTTask::kDefaultPriority;
//const INT32 NTTask::kInvalidTaskID;
/**
* Create but don't launch a task.
* @param name The name of the task. "FRC_" will be prepended to the task name.
* @param function The address of the function to run as the new task.
* @param priority The priority for the task.
* @param stackSize The size of the stack for the task
*/
NTTask::NTTask(const char* name, FUNCPTR function, INT32 priority, UINT32 stackSize)
{
//m_taskID = kInvalidTaskID;
m_Handle=NULL;
m_function = function;
m_priority = priority;
m_stackSize = stackSize;
m_taskName = new char[strlen(name) + 5];
strcpy(m_taskName, "FRC_");
strcpy(m_taskName+4, name);
//TODO see if we want to debug out this... it may be interesting info
#if 0
static INT32 instances = 0;
instances++;
#endif
}
NTTask::~NTTask()
{
//if (m_taskID != kInvalidTaskID) Stop();
if (m_Handle)
Stop();
delete [] m_taskName;
m_taskName = NULL;
}
// The thread callback
DWORD thread_proc( void *p_ptr )
{ // Get the pointer to myself
NTTask *p_this = (NTTask*)p_ptr;
assert( p_this );
(*p_this->m_function)( p_this->m_Arg );
return 0;
}
//This sets the name of the thread, which can help to identify threads in win32
#define MS_VC_EXCEPTION 0x406D1388
static void set_thread_name( const char *p_thread_name, DWORD ID )
{
#pragma pack(push,8)
typedef struct tagTHREADNAME_INFO
{ DWORD dwType; // Must be 0x1000.
LPCSTR szName; // Pointer to name (in user addr space).
DWORD dwThreadID; // Thread ID (-1=caller thread).
DWORD dwFlags; // Reserved for future use, must be zero.
} THREADNAME_INFO;
#pragma pack(pop)
// Set the information
THREADNAME_INFO info = { 0x1000, p_thread_name, ID, 0 };
// Raise the exception
__try { ::RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info ); }
__except( EXCEPTION_EXECUTE_HANDLER ) {}
}
bool NTTask::StartInternal()
{
if (m_Handle)
{
assert(false); // This may be lifted... just want to see if it happens
Stop();
}
m_Handle = ::CreateThread( NULL, m_stackSize, (LPTHREAD_START_ROUTINE)thread_proc, (void*)this, NULL, &m_ID );
if (m_ID!=NULL)
set_thread_name(m_taskName,m_ID);
return m_Handle!=NULL;
}
/**
* Starts this task.
* If it is already running or unable to start, it fails and returns false.
*/
bool NTTask::Start(void *arg0)
{
m_Arg=arg0;
return StartInternal();
}
/**
* Restarts a running task.
* If the task isn't started, it starts it.
* @return false if the task is running and we are unable to kill the previous instance
*/
bool NTTask::Restart()
{
//return HandleError(taskRestart(m_taskID));
Stop();
return StartInternal();
}
/**
* Kills the running task.
* @returns true on success false if the task doesn't exist or we are unable to kill it.
*/
bool NTTask::Stop()
{
if (!m_Handle) return false;
bool ok = true;
// Wait for the thread to finish
#ifdef _DEBUG
try_again:
#endif _DEBUG
//const int TimeOut=2000;
const int TimeOut=INFINITE;
if ( ::WaitForSingleObject( m_Handle , TimeOut ) == WAIT_TIMEOUT )
{ // Signal the thread as having been terminated
//if ( m_p_error ) *m_p_error = true;
// If this gets triggered we have a bug in the code.
#ifdef _DEBUG
switch( ::MessageBoxW( NULL, L"A thread being used by the application\n"
L"has taken to long to exit and so is about\n"
L"to be terminated to avoid locking-up\n"
L"the application.\n\n"
L"Click ABORT to debug.\n"
L"Click RETRY to wait for a bit longer.\n"
L"Click IGNORE to terminate the thread.\n\n"
L"This message is NOT displayed in release mode.",
L"Thread exit has timed out.",
MB_ABORTRETRYIGNORE ) )
{ case IDRETRY: goto try_again;
case IDABORT: ::DebugBreak(); break;
case IDIGNORE: break;
}
#endif _DEBUG
// Free thread memory
CONTEXT c_ = {0};
c_.ContextFlags = CONTEXT_FULL;
::GetThreadContext( m_Handle, &c_ );
MEMORY_BASIC_INFORMATION Info_ = {0};
#ifdef _M_X64
::VirtualQuery( (PVOID) c_.Rsp, &Info_, sizeof(Info_) );
#else
::VirtualQuery( (PVOID) c_.Esp, &Info_, sizeof(Info_) );
#endif
// Terminate the thread
::TerminateThread( m_Handle, 0 );
// Free the memory
::VirtualFree( Info_.AllocationBase, 0, MEM_RELEASE );
}
//if (Verify())
//{
// ok = HandleError(taskDelete(m_taskID));
//}
//m_taskID = kInvalidTaskID;
// The thread has finished
CloseHandle( m_Handle );
m_Handle = NULL;
return ok;
}
/**
* Returns true if the task is ready to execute (i.e. not suspended, delayed, or blocked).
* @return true if ready, false if not ready.
*/
bool NTTask::IsReady()
{
//return taskIsReady(m_taskID);
return m_Handle!=NULL;
}
/**
* Returns true if the task was explicitly suspended by calling Suspend()
* @return true if suspended, false if not suspended.
*/
bool NTTask::IsSuspended()
{
//return taskIsSuspended(m_taskID);
return false;
}
/**
* Pauses a running task.
* Returns true on success, false if unable to pause or the task isn't running.
*/
bool NTTask::Suspend()
{
//return HandleError(taskSuspend(m_taskID));
assert(false);
return false;
}
/**
* Resumes a paused task.
* Returns true on success, false if unable to resume or if the task isn't running/paused.
*/
bool NTTask::Resume()
{
//return HandleError(taskResume(m_taskID));
assert(false);
return false;
}
/**
* Verifies a task still exists.
* @returns true on success.
*/
bool NTTask::Verify()
{
//return taskIdVerify(m_taskID) == OK;
return true;
}
/**
* Gets the priority of a task.
* @returns task priority or 0 if an error occured
*/
INT32 NTTask::GetPriority()
{
//if (HandleError(taskPriorityGet(m_taskID, &m_priority)))
// return m_priority;
//else
// return 0;
return m_priority;
}
/**
* This routine changes a task's priority to a specified priority.
* Priorities range from 0, the highest priority, to 255, the lowest priority.
* Default task priority is 100.
* @param priority The priority the task should run at.
* @returns true on success.
*/
bool NTTask::SetPriority(INT32 priority)
{
m_priority = priority;
//return HandleError(taskPrioritySet(m_taskID, m_priority));
return true;
}
/**
* Returns the name of the task.
* @returns Pointer to the name of the task or NULL if not allocated
*/
const char* NTTask::GetName()
{
return m_taskName;
}
/**
* Get the ID of a task
* @returns Task ID of this task. NTTask::kInvalidTaskID (-1) if the task has not been started or has already exited.
*/
INT32 NTTask::GetID()
{
//if (Verify())
// return m_taskID;
if (m_Handle)
return m_ID;
return kInvalidTaskID;
}
/**
* Handles errors generated by task related code.
*/
bool NTTask::HandleError(STATUS results)
{
if (results != ERROR) return true;
//switch(errnoGet())
//{
//case S_objLib_OBJ_ID_ERROR:
// wpi_setWPIErrorWithContext(TaskIDError, m_taskName);
// break;
//
//case S_objLib_OBJ_DELETED:
// wpi_setWPIErrorWithContext(TaskDeletedError, m_taskName);
// break;
//
//case S_taskLib_ILLEGAL_OPTIONS:
// wpi_setWPIErrorWithContext(TaskOptionsError, m_taskName);
// break;
//
//case S_memLib_NOT_ENOUGH_MEMORY:
// wpi_setWPIErrorWithContext(TaskMemoryError, m_taskName);
// break;
//
//case S_taskLib_ILLEGAL_PRIORITY:
// wpi_setWPIErrorWithContext(TaskPriorityError, m_taskName);
// break;
//default:
// printErrno(errnoGet());
// wpi_setWPIErrorWithContext(TaskError, m_taskName);
//}
return false;
}

View File

@@ -1,22 +1,24 @@
#include "stdafx.h"
/*
* FDIOStream.cpp
*
* Created on: Sep 27, 2012
*/
//make sure this comes before windows.h
#include <winsock2.h>
#include "networktables2/stream/FDIOStream.h"
#include "networktables2/util/IOException.h"
#include "networktables2/util/EOFException.h"
#include <iostream>
#include <errno.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <windows.h>
#include <winsock2.h>
#include <wininet.h>
#include <ws2tcpip.h>
#include <io.h>
FDIOStream::FDIOStream(int _fd){
fd = _fd;
@@ -24,7 +26,7 @@ FDIOStream::FDIOStream(int _fd){
u_long on = 1;
if (ioctlsocket(fd, FIONBIO, &on))
{
::close(fd);
::_close(fd);
throw IOException("Could not set socket to non-blocking mode");
}
}
@@ -38,7 +40,7 @@ int FDIOStream::read(void* ptr, int numbytes){
return 0;
char* bufferPointer = (char*)ptr;
int totalRead = 0;
while (totalRead < numbytes)
while (totalRead < numbytes)
{
int numRead=recv(fd, bufferPointer, numbytes-totalRead, 0);
if(numRead == 0){
@@ -77,7 +79,7 @@ int Send( int sockfd,char* Data, size_t sizeData )
if (!Result_)
{
char Buffer[128];
sprintf(Buffer,"Send() failed: WSA error=%d\n",WSAGetLastError());
sprintf_s(Buffer,"Send() failed: WSA error=%d\n",WSAGetLastError());
OutputDebugStringA(Buffer);
}
@@ -86,7 +88,7 @@ int Send( int sockfd,char* Data, size_t sizeData )
int FDIOStream::write(const void* ptr, int numbytes)
{
int numWrote = ::write(fd, (char*)ptr, numbytes);
int numWrote = ::_write(fd, (char*)ptr, numbytes);
if(numWrote==numbytes)
return numWrote;
@@ -106,12 +108,12 @@ int FDIOStream::write(const void* ptr, int numbytes)
throw IOException("Select returned an error on write");
if (FD_ISSET(fd, &fdSet)) {
numWrote = ::write(fd, (char*)ptr, numbytes);
numWrote = ::_write(fd, (char*)ptr, numbytes);
if(numWrote==numbytes)
return numWrote;
}
}
perror("write error: ");
fflush(stderr);
throw IOException("Could not write all bytes to fd stream");
@@ -126,7 +128,7 @@ void FDIOStream::close()
if (fd != INVALID_SOCKET)
{
char Buffer[128];
sprintf(Buffer,"closesocket %d\n",fd);
sprintf_s(Buffer,"closesocket %d\n",fd);
OutputDebugStringA(Buffer);
shutdown( fd, SD_BOTH );

View File

@@ -4,7 +4,6 @@
* Created on: Sep 27, 2012
* Author: Mitchell Wills
*/
#include "stdafx.h"
#include "networktables2/stream/SocketServerStreamProvider.h"
#include "networktables2/stream/FDIOStream.h"
@@ -12,6 +11,7 @@
#include <cstring>
#include <errno.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>

View File

@@ -4,10 +4,9 @@
* Created on: Nov 3, 2012
* Author: Mitchell Wills
*/
#include "stdafx.h"
#include <cstring>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
#include <winsock2.h>
@@ -53,7 +52,7 @@ IOStream *SocketStreamFactory::createStream(){
server = gethostbyname(host);
if (server == NULL)
if (server == NULL)
throw 1;
memset(&serv_addr, 0, sizeof(serv_addr));
@@ -75,7 +74,7 @@ IOStream *SocketStreamFactory::createStream(){
// [9/10/2013 JamesK]
{
char Buffer[128];
sprintf(Buffer,"connecting %d\n",sockfd);
sprintf_s(Buffer,"connecting %d\n",sockfd);
OutputDebugStringA(Buffer);
}
if (connect(sockfd,(struct sockaddr *) &serv_addr,sizeof(serv_addr)) == 0)
@@ -117,7 +116,7 @@ IOStream *SocketStreamFactory::createStream(){
if (ErrorMsg)
{
char Buffer[1024];
sprintf(Buffer,"ErrorMsg=%s WSA error=%d\n",ErrorMsg,WSAGetLastError());
sprintf_s(Buffer,"ErrorMsg=%s WSA error=%d\n",ErrorMsg,WSAGetLastError());
OutputDebugStringA(Buffer);
printf("ErrorMsg=%s WSA error=%d\n",ErrorMsg,WSAGetLastError());

View File

@@ -3,58 +3,44 @@
*
* Created on: Sep 21, 2012
* Author: Mitchell Wills
* Re-Created on: June 26, 2015
* Author: Peter Mitrano
*/
#include "../../../../../../../../stdafx.h"
// Previous version used semaphores.
// This version was copied from the "Athena" version of network tables.
// It uses pthread and is much simpler
#include "networktables2/thread/DefaultThreadManager.h"
#include <exception>
#include <stdio.h>
PeriodicNTThread::PeriodicNTThread(PeriodicRunnable* _r, const char* _name) :
name(_name), thread(new NTTask(name, (FUNCPTR)PeriodicNTThread::taskMain)), r(_r), run(true)
{
fprintf(stdout, "Starting task: %s\n", name);
fflush(stdout);
thread->Start(this);
PeriodicNTThread::PeriodicNTThread(PeriodicRunnable* _r, const char* name) : r(_r), run(true){
if(pthread_create(&thread, NULL, (void* (*)(void*))PeriodicNTThread::taskMain, (void*)this))
throw std::exception();
}
PeriodicNTThread::~PeriodicNTThread()
{
stop();
//TODO somehow do this async
if (thread)
{
delete thread;
thread=NULL;
}
PeriodicNTThread::~PeriodicNTThread(){
stop();
if(thread.x == pthread_self().x){
fprintf(stderr, "WARNING: thread destructor called from this thread\n");
}
pthread_join(thread, NULL);
}
int PeriodicNTThread::taskMain(PeriodicNTThread* o)
{
//static wrapper
return o->_taskMain();
}
int PeriodicNTThread::_taskMain(){
try {
while(run){
r->run();
}
} catch (...) {
fprintf(stdout, "Task exited with uncaught exception %s\n", name);
fflush(stdout);
return 1;
}
fprintf(stdout, "Task exited normally: %s\n", name);
fflush(stdout);
void* PeriodicNTThread::taskMain(PeriodicNTThread* o){//static wrapper
o->_taskMain();
return 0;
}
void PeriodicNTThread::stop()
{
run = false;
void PeriodicNTThread::_taskMain(){
while(run){
r->run();
}
}
void PeriodicNTThread::stop() {
run = false;
//pthread_cancel(thread);
}
bool PeriodicNTThread::isRunning() {
return thread->IsReady();
return pthread_kill(thread, 0) == 0;
}
NTThread* DefaultThreadManager::newBlockingPeriodicThread(PeriodicRunnable* r, const char* name) {

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gazebosim</groupId>
<artifactId>JavaGazebo</artifactId>
<packaging>jar</packaging>
<version>0.1.0-SNAPSHOT</version>
<profiles>
<profile>
<id>docline-java8-disable</id>
<activation>
<jdk>[1.8,</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.5.0</version>
</dependency>
<!-- TODO: Add unit tests -->
<!-- <dependency> -->
<!-- <groupId>junit</groupId> -->
<!-- <artifactId>junit</artifactId> -->
<!-- <version>4.11</version> -->
<!-- </dependency> -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</build>
</project>

View File

@@ -5,6 +5,7 @@ import gazebo.msgs.GzTime.Time;
import java.io.IOException;
import java.net.ConnectException;
import java.net.InetAddress;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
@@ -64,9 +65,17 @@ public class Connection {
public void serve(final ServerCallback cb) throws IOException {
ssocket = new ServerSocket(0);
host = ssocket.getInetAddress().getHostAddress(); // TODO: get globally addressable name.
host = ssocket.getInetAddress().getHostAddress();
port = ssocket.getLocalPort();
//enable user to change master uri via environment variable GAZEBO_MASTER_URI
//TODO : allow for automatic guesing of IP. Look at Connection.cc in gazebo for C++ example
String user_defined_ip = System.getenv("GAZEBO_IP");
if (user_defined_ip != null) {
host = InetAddress.getByName(user_defined_ip).getHostAddress();;
LOG.warning("Using custom host: "+host);
}
new Thread("Gazebo Server Thread") {
@Override
public void run() {

View File

@@ -52,10 +52,30 @@ public class Node implements Runnable, ServerCallback {
}
public void waitForConnection() throws IOException, InterruptedException {
//enable user to change master uri via environment variable GAZEBO_MASTER_URI
String user_defined_uri = System.getenv("GAZEBO_MASTER_URI");
String gazebo_master_uri = "localhost";
int port = 11345;
if (user_defined_uri != null) {
String[] parts = user_defined_uri.split(":");
if (parts.length != 2){
LOG.severe("invalid GAZEBO_MASTER_URI " + user_defined_uri+ ". URI must be of the form HOSTNAME:PORT");
LOG.warning("using default GAZEBO_MASTER_URI=localhost:11345");
}
else {
gazebo_master_uri = parts[0];
port = Integer.parseInt(parts[1]);
}
}
server.serve(this);
master.connectAndWait("localhost", 11345);
LOG.info("GAZEBO_MASTER_URI is host=" + gazebo_master_uri + " port="+port);
master.connectAndWait(gazebo_master_uri, port);
initializeConnection();
new Thread(this).start();
LOG.info("Serving on: "+server.host+":"+server.port);
}
@@ -66,9 +86,9 @@ public class Node implements Runnable, ServerCallback {
String type = defaultMessage.getDescriptorForType().getFullName();
Publisher<T> pub = new Publisher<T>(topic, type, server.host, server.port);
publishers.put(topic, pub);
Publish req = Publish.newBuilder().setTopic(topic).setMsgType(type)
.setHost(server.host).setPort(server.port).build();
.setHost(server.host).setPort(server.port).build();
try {
master.writePacket("advertise", req);
} catch (IOException e) {
@@ -76,7 +96,7 @@ public class Node implements Runnable, ServerCallback {
}
return pub;
}
public synchronized <T extends Message> Subscriber<T>
subscribe(String topic, T defaultMessage, SubscriberCallback<T> cb) {
topic = fixTopic(topic);
@@ -84,7 +104,7 @@ public class Node implements Runnable, ServerCallback {
if (subscriptions.containsKey(topic)) {
throw new RuntimeException("Multiple subscribers for: "+topic);
}
String type = defaultMessage.getDescriptorForType().getFullName();
Subscribe req = Subscribe.newBuilder().setTopic(topic).setMsgType(type)
.setHost(server.host).setPort(server.port).setLatching(false).build();
@@ -93,7 +113,7 @@ public class Node implements Runnable, ServerCallback {
} catch (IOException e) {
e.printStackTrace(); // FIXME: Shouldn't happen, should probably complain louder
}
Subscriber<T> s = new Subscriber<>(topic, type, cb, defaultMessage,
server.host, server.port);
subscriptions.put(topic, s);
@@ -122,7 +142,7 @@ public class Node implements Runnable, ServerCallback {
e.printStackTrace(); // FIXME: Log
}
}
private synchronized void initializeConnection() throws IOException {
Packet initData = master.read();
if (!initData.getType().equals("version_init")) {
@@ -135,12 +155,12 @@ public class Node implements Runnable, ServerCallback {
String_V ns = String_V.parseFrom(namespaceData.getSerializedData());
namespaces.addAll(ns.getDataList());
LOG.info(namespaces.toString());
Packet publisherData = master.read();
Packet publisherData = master.read();
if (publisherData.getType().equals("publishers_init")) {
Publishers pubs = Publishers.parseFrom(publisherData.getSerializedData());
for (Publish pub : pubs.getPublisherList()) {
PublisherRecord record = new RemotePublisherRecord(pub);
PublisherRecord record = new RemotePublisherRecord(pub);
publishers.put(record.getTopic(), record);
}
LOG.info(publishers.toString());
@@ -148,7 +168,7 @@ public class Node implements Runnable, ServerCallback {
LOG.severe("No publisher data received.");
}
}
public synchronized void processPacket(Packet packet) throws InvalidProtocolBufferException {
if (packet.getType().equals("publisher_add")) {
PublisherRecord pub = new RemotePublisherRecord(Publish.parseFrom(packet.getSerializedData()));
@@ -157,7 +177,7 @@ public class Node implements Runnable, ServerCallback {
LOG.info("ACK "+pub.getTopic());
return; // This is us
}
LOG.info("New Publisher: "+pub.getTopic());
LOG.fine("Publisher: "+Publish.parseFrom(packet.getSerializedData()));
publishers.put(pub.getTopic(), pub);
@@ -169,7 +189,7 @@ public class Node implements Runnable, ServerCallback {
LOG.info("Ignoring subscription request on (local) "+pub.getTopic());
return; // This is us
}
LOG.info("PUBSUB found for "+pub.getTopic());
LOG.fine("Publisher: "+Publish.parseFrom(packet.getSerializedData()));
subscriptions.get(pub.getTopic()).connect(pub);
@@ -185,6 +205,9 @@ public class Node implements Runnable, ServerCallback {
}
@Override
/**
* This is called when another node requests subscription to a topic we are publishing
*/
public void handle(Connection conn) throws IOException {
LOG.fine("Handling new connection");
Packet msg = conn.read();
@@ -192,7 +215,7 @@ public class Node implements Runnable, ServerCallback {
LOG.warning("Read null message.");
return;
}
if (msg.getType().equals("sub")) {
Subscribe sub = Subscribe.parseFrom(msg.getSerializedData());
if (!publishers.containsKey(sub.getTopic())) {
@@ -205,11 +228,12 @@ public class Node implements Runnable, ServerCallback {
PublisherRecord pub = publishers.get(sub.getTopic());
if (!pub.getMsgType().equals(sub.getMsgType())) {
LOG.severe(String.format("Message type mismatch requested=%d publishing=%s\n",
pub.getMsgType(), sub.getMsgType()));
pub.getMsgType(), sub.getMsgType()));
return;
}
LOG.info("CONN " + sub.getTopic());
//Tell the publisher that it has recieved a connection from a subscriver
pub.connect(conn);
} else {
LOG.warning("Unknown message type: " + msg.getType());

View File

@@ -65,6 +65,10 @@ public class Publisher<T extends Message> implements PublisherRecord {
}
@Override
/**
* This function is called when another topic requests a subscription to a topic I am publishing
* Called in Node.java in the handle() function
*/
public synchronized void connect(Connection conn) {
LOG.fine("Handling subscriber connection for topic: "+topic);
if (latching && lastMsg != null) {

29
simulation/README.md Normal file
View File

@@ -0,0 +1,29 @@
## Simulation Directory
Observe the following directory structure
.
|-- frc_gazebo_plugins (contains Gazebo Plugins)
| |-- clock
| |-- dc_motor
| |-- encoder
| |-- gyro
| |-- plugins
| |-- pneumatic_piston
| |-- potentiometer
| |-- rangefinder
| |-- servo
|
|-- frcsim.bat (launches gazebo with model/plugin paths on windows)
|-- frcsim.sh (launches gazebo with model/plugin paths on linux/mac)
|-- install.sh (convenient linux script to install Eclipse, Eclipse Plugins, and Gazebo)
|-- JavaGazebo (java library used by java simulation. Equivelant of the C++ gazebo_transport)
|-- SimDS (linux driverstation)
The gazbeo plugins are currently built with CMake.
Eventually they will be built with gradle.
All of this is delivered to students via the eclipse plugins
## Building
see the top level building.md

View File

@@ -1,54 +0,0 @@
# General
*.log
build/
screensteps/
trash/
# TMP
*/*/debian/files
*/*/models/
*/*/worlds
*/*/plugins/
*/*/features/
*/*/src/
*/*/devel/
*/*/.*
*/*/include/
*/*/msgs/
*/*/clock/
*/*/dc_motor/
*/*/docs/
*/*/encoder/
*/*/*.doxy
*/*/gyro/
*/*/limit_switch/
*/*/pneumatic_piston/
*/*/potentiometer/
*/*/rangefinder/
*/*/*.gradle
frcsim-gazebo-plugins/frcsim-gazebo-plugins/Makefile
# General Build Artifacts
*.dsc
*.deb
*.orig.tar.gz
*.debian.tar.gz
*.changes
*.build
*.substvars
*/*/debian/*/DEBIAN/
# Specific Build Artifacts
frcsim-gazebo-plugins/frcsim-gazebo-plugins/debian/frcsim-gazebo-plugins/
frcsim-gazebo-models/frcsim-gazebo-models/debian/frcsim-gazebo-models/
frcsim-eclipse-plugins/frcsim-eclipse-plugins/debian/frcsim-eclipse-plugins/
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/debian/frcsim-eclipse-toolchain-plugin/
frcsim/frcsim/debian/frcsim/
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/debian/frcsim-libwpilibsim-cpp/
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
# Generated Repository
repository/db/
repository/dists/

View File

@@ -1,202 +0,0 @@
codename=trusty
allwpilib=../..
package-version = 1
gazebo-plugins-version = 0.2
gazebo-plugins-package-version = $(gazebo-plugins-version)-$(package-version)
gazebo-models-version = 0.3
gazebo-models-package-version = $(gazebo-models-version)-$(package-version)
gazebo-models-orig-url = https://usfirst.collab.net/sf/frs/do/downloadFile/projects.wpilib/frs.simulation.frcsim_gazebo_models/frs1070?dl=1
eclipse-plugins-version = 0.1
eclipse-plugins-package-version = $(eclipse-plugins-version)-$(package-version)
eclipse-toolchain-version = 0.1
eclipse-toolchain-package-version = $(eclipse-toolchain-version)-$(package-version)
libwpilibsim-version = 0.1
libwpilibsim-package-version = $(libwpilibsim-version)-$(package-version)
frcsim-version = 0.1
frcsim-package-version = $(frcsim-version)-$(package-version)
# Main Targets
.PHONY: all jenkins allwpilib pull debs update-repository clean-repository clean install
all: update-repository
jenkins: update-repository
allwpilib:
cd $(allwpilib) && mvn -T 8 clean package -Dwith-eclipse-plugins -DskipTests -DskipIT
orig: orig-frcsim-gazebo-plugins orig-frcsim-gazebo-models orig-frcsim-eclipse-plugins \
orig-frcsim-libwpilibsim-cpp orig-frcsim
debs: debs-frcsim-gazebo-plugins debs-frcsim-gazebo-models debs-frcsim-eclipse-plugins \
debs-frcsim-libwpilibsim-cpp debs-frcsim
update-repository: debs clean-repository
cd repository && reprepro includedeb $(codename) ../frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb
cd repository && reprepro includedeb $(codename) ../frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_i386.deb
cd repository && reprepro includedeb $(codename) ../frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb
cd repository && reprepro includedeb $(codename) ../frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb
# cd repository && reprepro includedeb $(codename) ../frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb
cd repository && reprepro includedeb $(codename) ../frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb
cd repository && reprepro includedeb $(codename) ../frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_i386.deb
cd repository && reprepro includedeb $(codename) ../frcsim/frcsim_$(frcsim-package-version)_all.deb
echo Repository Updated
clean-repository:
cd repository && reprepro remove $(codename) frcsim-gazebo-plugins
cd repository && reprepro remove $(codename) frcsim-gazebo-models
cd repository && reprepro remove $(codename) frcsim-eclipse-plugins
# cd repository && reprepro remove $(codename) frcsim-eclipse-toolchain-plugin
cd repository && reprepro remove $(codename) frcsim-libwpilibsim-cpp
cd repository && reprepro remove $(codename) frcsim
clean:
-rm frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz
-rm frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz
-rm frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz
-rm frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz
-rm frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
-rm frcsim/frcsim_$(frcsim-version).orig.tar.gz
-rm frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb
-rm frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_i386.deb
-rm frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb
-rm frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb
-rm frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb
-rm frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb
-rm frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_i386.deb
-rm -r frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib
-rm frcsim/frcsim_$(frcsim-package-version)_all.deb
install:
sudo dpkg -i frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb \
frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb \
frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb \
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb \
frcsim/frcsim_$(frcsim-package-version)_all.deb
# orig support (for faster parallel builds)
.PHONY: orig-frcsim-gazebo-plugins orig-frcsim-gazebo-models orig-frcsim-eclipse-plugins \
orig-frcsim-eclipse-toolchain-plugin orig-frcsim-libwpilibsim-cpp orig-frcsim
.PHONY: pull-gazebo-plugins pull-eclipse-plugins pull-libwpilibsim-cpp
orig-frcsim-gazebo-models: frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz
frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz:
cd frcsim-gazebo-models && \
wget --no-check-certificate $(gazebo-models-orig-url) -O frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz && \
tar xvf frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz
orig-frcsim-gazebo-plugins: frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz
pull-gazebo-plugins:
cp -rf -t frcsim-gazebo-plugins/frcsim-gazebo-plugins/ $(allwpilib)/simulation/frc_gazebo_plugins/*
echo Increment version?
frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz: pull-gazebo-plugins
cd frcsim-gazebo-plugins/frcsim-gazebo-plugins && debuild clean
rm -f frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz
cd frcsim-gazebo-plugins && tar --exclude="./debian" -czvf \
frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz frcsim-gazebo-plugins
orig-frcsim-eclipse-plugins: frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz
pull-eclipse-plugins:
rm -rf frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
rm -rf frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
mkdir -p frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
mkdir -p frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/plugins/edu.wpi.first.wpilib.plugins.java_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/plugins/edu.wpi.first.wpilib.plugins.cpp_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/plugins/edu.wpi.first.wpilib.plugins.core_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/features/edu.wpi.first.wpilib.plugins.java.feature_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/features/edu.wpi.first.wpilib.plugins.cpp.feature_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/features/edu.wpi.first.wpilib.plugins.core.feature_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
echo Increment version?
frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz: pull-eclipse-plugins
cd frcsim-eclipse-plugins/frcsim-eclipse-plugins && debuild clean
rm -f frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz
cd frcsim-eclipse-plugins && tar --exclude="./debian" -czvf \
frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz frcsim-eclipse-plugins
orig-frcsim-eclipse-toolchain-plugin: frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz
pull-eclipse-toolchain:
rm -rf frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/plugins
rm -rf frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/features
mkdir -p frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/plugins
mkdir -p frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/features
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/plugins/edu.wpi.first.wpilib.plugins.cpp.toolchains.linux_* frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/plugins/
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/features/edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature_* frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/features/
echo Increment version?
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz: pull-eclipse-toolchain
cd frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin && debuild clean
rm -f frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz
cd frcsim-eclipse-toolchain-plugin && tar --exclude="./debian" -czvf \
frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz frcsim-eclipse-toolchain-plugin
orig-frcsim-libwpilibsim-cpp: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
pull-libwpilibsim-cpp:
mkdir -p frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib
cp -rf $(allwpilib)/hal frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib
mkdir -p frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/networktables
cp -rf $(allwpilib)/networktables/cpp frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/networktables
mkdir -p frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/wpilibc
cp -r $(allwpilib)/wpilibc/wpilibC++ frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/wpilibc/wpilibC++
cp -r $(allwpilib)/wpilibc/wpilibC++Sim frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/wpilibc/wpilibC++Sim
echo 'cmake_minimum_required(VERSION 2.8)' > frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
echo 'project(WPILibSim)' >> frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
echo 'add_subdirectory(allwpilib/wpilibc/wpilibC++Sim)' >> frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
echo Increment version?
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz: pull-libwpilibsim-cpp
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild clean
rm -f frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
cd frcsim-libwpilibsim-cpp && tar --exclude="./debian" -czvf \
frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz frcsim-libwpilibsim-cpp
orig-frcsim: frcsim/frcsim_$(frcsim-version).orig.tar.gz
frcsim/frcsim_$(frcsim-version).orig.tar.gz:
cd frcsim/frcsim && debuild clean
rm -f frcsim/frcsim_$(frcsim-version).orig.tar.gz
cd frcsim && tar --exclude="./debian" -czvf \
frcsim_$(frcsim-version).orig.tar.gz frcsim
# debs support (for faster parallel builds)
.PHONY: debs-frcsim-gazebo-plugins debs-frcsim-gazebo-models debs-frcsim-eclipse-plugins \
debs-frcsim-eclipse-toolchain-plugin debs-frcsim-libwpilibsim-cpp debs-frcsim
debs-frcsim-gazebo-plugins: frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_i386.deb
frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_i386.deb: frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb
cd frcsim-gazebo-plugins/frcsim-gazebo-plugins && make clean
cd frcsim-gazebo-plugins && sbuild --arch=i386 -A -d trusty-i386 frcsim-gazebo-plugins_$(gazebo-plugins-package-version).dsc
frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb: frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz
cd frcsim-gazebo-plugins/frcsim-gazebo-plugins && debuild --no-lintian -us -uc -aamd64
debs-frcsim-gazebo-models: frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb
frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb: frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz
cd frcsim-gazebo-models/frcsim-gazebo-models && debuild --no-lintian -us -uc
debs-frcsim-eclipse-plugins: frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb
frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb: frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz
cd frcsim-eclipse-plugins/frcsim-eclipse-plugins && debuild --no-lintian -us -uc
debs-frcsim-eclipse-toolchain-plugin: frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb: frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz
cd frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin && debuild --no-lintian -us -uc
debs-frcsim-libwpilibsim-cpp: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_i386.deb
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_i386.deb: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb
cd frcsim-libwpilibsim-cpp && sbuild --arch=i386 -A -d trusty-i386 frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version).dsc
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild --no-lintian -us -uc -aamd64
debs-frcsim: frcsim/frcsim_$(frcsim-package-version)_all.deb
frcsim/frcsim_$(frcsim-package-version)_all.deb: frcsim/frcsim_$(frcsim-version).orig.tar.gz
cd frcsim/frcsim && debuild --no-lintian -us -uc
### SBUILD
#
# For building 32-bit builds on 64-bit machines
#
# $ mk-sbuild --arch i386 --personality=linux32 trusty
# To CHANGE the golden image: sudo schroot -c source:trusty-i386 -u root
# To ENTER an image snapshot: schroot -c trusty-i386
# To BUILD within a snapshot: sbuild -A -d trusty-i386 PACKAGE*.dsc
#
# sbuild --arch=i386 -A -d trusty-i386 frcsim-gazebo-plugins_0.2-1.dsc

View File

@@ -1,20 +0,0 @@
* Setting up apt-repository
: sudo apt-get install reprepro
http://kaivanov.blogspot.com/2012/08/creating-apt-repository-with-reprepro.html
** One-Time
- Get signing key
: gpg --armor --output frcsim.key --export
** To build and add debs
: make
: rsync -r repository/ adhenning@ccc.wpi.edu:public_html/frcsim # Syncs repo
** To use
: sudo nano /etc/apt/sources.list.d/frcsim-latest.list
: deb http://users.wpi.edu/~adhenning/frcsim raring main
: deb-src http://users.wpi.edu/~adhenning/frcsim raring main
: curl -H GET users.wpi.edu/~adhenning/frcsim.key | sudo apt-key add -
: sudo apt-get update
: sudo apt-get install frcsim

View File

@@ -1,16 +0,0 @@
prefix = /usr
eclipsedir = $(prefix)/share/eclipse/dropins/frcsim
plugindir = $(eclipsedir)/plugins
featuredir = $(eclipsedir)/features
all: clean
sh ./genfeatures.sh
clean:
rm -rf build
install: all
mkdir -p $(DESTDIR)$(plugindir)
mkdir -p $(DESTDIR)$(featuredir)
install plugins/** $(DESTDIR)$(plugindir)
cp -r build/features/** $(DESTDIR)$(featuredir)

View File

@@ -1,5 +0,0 @@
frcsim-eclipse-plugins (0.1-1) trusty; urgency=low
* Initial release.
-- Alex Henning <alex@thoriumrobotics.com> Wed, 14 May 2014 21:04:27 -0400

View File

@@ -1,13 +0,0 @@
Source: frcsim-eclipse-plugins
Maintainer: Alex Henning <alex@thoriumrobotics.com>
Section: misc
Priority: optional
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9)
Package: frcsim-eclipse-plugins
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, eclipse, eclipse-jdt, eclipse-cdt, eclipse-rse, eclipse-cdt-launch-remote, g++, libwebkitgtk-1.0-0, frcsim-libwpilibsim-cpp
Description: FRC plugin for developing code for RoboRIO and WPILibSim.
This plugin allows the usage of eclipse for development of WPILib
robot code for the RoboRIO and simulation in gazebo.

View File

@@ -1,25 +0,0 @@
Copyright
Copyright (c) 2009 FIRST
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the FIRST nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,3 +0,0 @@
#!/usr/bin/make -f
%:
dh $@

View File

@@ -1,8 +0,0 @@
mkdir -p build/zips/features
mkdir -p build/features
for i in features/*.jar; do
echo $i
cp $i build/zips/$i.zip;
mkdir build/$i
unzip build/zips/$i.zip -d build/$i
done

View File

@@ -1 +0,0 @@
0.1.1

View File

@@ -1,16 +0,0 @@
prefix = /usr
frcsimdir = $(prefix)/share/frcsim
modeldir = $(frcsimdir)/models
worlddir = $(frcsimdir)/worlds
all:
echo Should download files
clean:
echo Cleaning
install: all
mkdir -p $(DESTDIR)$(modeldir)
mkdir -p $(DESTDIR)$(worlddir)
cp -r models/** $(DESTDIR)$(modeldir)
cp -r worlds/** $(DESTDIR)$(worlddir)

View File

@@ -1,17 +0,0 @@
frcsim-gazebo-models (0.3-1) trusty; urgency=medium
* Fixed GearsBot gyro
-- Alex Henning <alex@thoriumrobotics.com> Tue, 12 Aug 2014 09:32:27 -0400
frcsim-gazebo-models (0.2-1) trusty; urgency=medium
* New models using the smaller plugins
-- Alex Henning <alex@thoriumrobotics.com> Mon, 07 Jul 2014 12:52:50 -0700
frcsim-gazebo-models (0.1-1) trusty; urgency=low
* Initial release.
-- Alex Henning <alex@thoriumrobotics.com> Wed, 14 May 2014 17:13:26 -0400

View File

@@ -1,13 +0,0 @@
Source: frcsim-gazebo-models
Maintainer: Alex Henning <alex@thoriumrobotics.com>
Section: misc
Priority: optional
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9)
Package: frcsim-gazebo-models
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, frcsim-gazebo-plugins
Description: FRC models that can be used in Gazebo.
Models that can be used in Gazebo to simulate FRC-like
robots are controllable through WPILibSim (Java or C++)

View File

@@ -1,25 +0,0 @@
Copyright
Copyright (c) 2009 FIRST
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the FIRST nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,3 +0,0 @@
#!/usr/bin/make -f
%:
dh $@

View File

@@ -1,11 +0,0 @@
frcsim-gazebo-plugins (0.2-1) trusty; urgency=medium
* Split plugin into many parts.
-- Alex Henning <alex@thoriumrobotics.com> Wed, 02 Jul 2014 13:50:38 -0700
frcsim-gazebo-plugins (0.1-1) trusty; urgency=low
* Initial release
-- Alex Henning <alex@thoriumrobotics.com> Wed, 14 May 2014 16:22:26 -0400

View File

@@ -1,13 +0,0 @@
Source: frcsim-gazebo-plugins
Maintainer: Alex Henning <alex@thoriumrobotics.com>
Section: misc
Priority: optional
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9), gazebo3, libgazebo-dev, libavcodec-dev, libavformat-dev, libswscale-dev
Package: frcsim-gazebo-plugins
Architecture: i386 amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, gazebo3, libgazebo-dev, libavcodec-dev, libswscale-dev
Description: FRC plugin for controlling robots in the gazebo plugin.
This plugin allows robots in gazebo to communicate with WPILib
programs and enables the control of the robots.

View File

@@ -1,25 +0,0 @@
Copyright
Copyright (c) 2009 FIRST
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the FIRST nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,6 +0,0 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_strip:
strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/frcsim-gazebo-plugins/usr/lib/frcsim/plugins/libgz_potentiometer.so

View File

@@ -1,19 +0,0 @@
prefix = /usr
lib.dir = $(prefix)/lib
build.dir = build
allwpilib = ../..
all:
mkdir -p $(build.dir)
cd build && cmake .. && make
# cp -r $(allwpilib)/wpilibc/wpilibC++ build
# cd ${build.dir} && ALLWPILIB=$(allwpilib) cmake .. && make
clean:
rm -rf $(build.dir)
install: all
mkdir -p $(DESTDIR)$(lib.dir)
install build/allwpilib/wpilibc/wpilibC++Sim/libWPILibSim.so $(DESTDIR)$(lib.dir)
# install $(build.dir)/libWPILibSim.so $(DESTDIR)$(lib.dir)
# install $(build.dir)/build/wpilibC++/libWPILib.a $(DESTDIR)$(lib.dir)

View File

@@ -1,5 +0,0 @@
frcsim-libwpilibsim-cpp (0.1-1) trusty; urgency=low
* Initial release.
-- Alex Henning <alex@thoriumrobotics.com> Wed, 06 June 2014 21:04:27 -0400

View File

@@ -1,13 +0,0 @@
Source: frcsim-libwpilibsim-cpp
Maintainer: Alex Henning <alex@thoriumrobotics.com>
Section: misc
Priority: optional
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9)
Package: frcsim-libwpilibsim-cpp
Architecture: i386 amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, libboost-system-dev, libprotobuf-dev
Description: Installs `libWPILibSim.so`.
Install platform specific libWPILibSim library necessary to run C++
frcsim programs.

View File

@@ -1,25 +0,0 @@
Copyright
Copyright (c) 2009 FIRST
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the FIRST nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,13 +0,0 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_OPTIONS
export DESTDIR=$$(pwd)/debian/frcsim-libwpilibsim-cpp
%:
dh $@
override_dh_strip:

View File

@@ -1,97 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQGiBEsnpscRBACyclffkMVkXXdtY2qTT2+B6HN4hBoUxBwZBULyHFuSP9lsB7wK
16Hl5ZTu+oy+GegzzFRrHWxBLN9i67T0plNkqDJhWUrmXR7xvX+dFc+Qrl+uPR0i
CY1NMnWwnFh01YtYb9NAlb3bLn8RLBH8Zo60i7wfwdW9Wi1mgzmUT/UI9wCg7y6R
VmF4RjNWJ2WRdL/jVeAB8H0D/0xfePoYWrSGzOp7+Vl+xYo5TdSrzohUUnly6xla
UIKwlBCG/jpQqKH17803GpkFyh5FxG1Db7VWsciDv7flcBLPtn75gU2fPHXL+gnv
r1eJ+ugQwCl4/8d4iJ5TMXmHQOW2Pd0U47OmbZYNNgtA+lXhF8n8+6w3GRhqubLF
/9b/A/4wH37bv1shLhdLpP+9WYHc8z9+jmStVUFdAGoD/n6vOpBX+GQYaEY5Y8RS
Wf0DFhMF6CFYNZ2ngDyvPt53M2jU7hrxXIfs/b5bLMqG2et9M/avdEWGUKTsC7wu
0zeGtD07r9EA3WDIhxN9QEGZAq5Q3NSbedMHIVE4Ynq7VNCdsrQ0SFBMSVAgKEhQ
IExpbnV4IEltYWdpbmcgYW5kIFByaW50aW5nKSA8aHBsaXBAaHAuY29tPohgBBMR
AgAgBQJLJ6bHAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQc9dwzaWQR7n4
dQCghZgIpxuTC+GhiQIO0dK9wTlbMmoAoOB252fEOvf73v8Ya8qmN1GlmYiXiJwE
EAECAAYFAk7UORAACgkQnsV5kCcUcIjUuAP8D2rK0KZyA0uHyap2BkF5U4wm6qQ3
p27K0hh50dZMIMSt3FH0TpW994jaoqBKqrHBk3U+/ZT4tD43hmaqc+XmnYNrNMRO
KBwkjEzKeKaOBXd1I5Tid0I2u1L6bl5IlQzujbWsn/5YbWypLlZhf3Hxg8uuHYu9
kiQLYM4jqIi0YgSJARwEEAECAAYFAk3NP24ACgkQd7E6jROY7coc8Af8DYe87G2u
OSSPGkebecci11oTX9mudvDCQkuTFBcGPlMnPl6bn5QcMjBxuAm2TO0mYlR0QcPU
vQ+tNypw4AZGfsgnvG1EsxSfTgiR6tD2KdIZD8GJw/GudmtUgF3sZkw1txLkk57u
YufHc9u56oMvntAaU7nisosE1rdqON9fLf+tqvMcrX2+8tDHobfimltC+J+F5dyx
Cnef+zB9/+dzAAjiunicNZ35zv9tKBh83kECPUpScpHjrXxAqdSHrNlnjGZdmiFB
0luSbPCIF8sYyLYb5W+Sw1t7WsZ1XRgq67gTV8Vw2o9jw10a/vclwFHeVEtius6g
Cj0CwkJ1uRuiLokCHAQQAQgABgUCUyRUlQAKCRAiOiyqVhRgQO6aEACMI+JH0ZVW
WxbaV5aNC+64kMIXRdOZEoRFoTW2i0B0yoLLjQbHnnt+wxTa18PXVYG8KZPzcLiD
TsZrt75cA+6xE1iu9HpTdJD08aiJE7EKV4tVZGpg65SkpU3HQ8X4YfGaT7jgutyK
66AUBYDXhxO0sx/sSsth0k3veUIaSwBncmP/S+/rguWhiU2d8MOtNtnCcTe9q7+y
n2KyRrhPlLVpJDAKeHTaULiUyLFCjHLHm84o6hiaoR3C/d/d+kC5g/ntPwXGP8vV
7W/Y3A8ZjhNjgVen3w1EgR/aCjHCHo3sry9Cs7IVb7kLdWhomSnwmYYLdbIXJbXe
IQRMMcYYt1gsia8s1tyK8rAGHCTCWebG6Y1sbNolG2peaTNrC9YnPwweT0TwcPzV
Pyj5+aZAwnnMQDajbxLmzmgjyybF+OkqFvDHEycYiM1v6TwAuw+Ols7/faK6XBIU
9O/YWwhLOULpM2P7Z7hn9u/xGfdM6O0xZyPiiQKlaBH7r8utvNM2BpsDIvbVYCuJ
YOyt4r1jhqf/EAkck2mEg7b55lEpJPjO6JQG3+OUuJHBpWtZFGKFBBP+vKvDURs7
cqk40m3laINIFyoUo0DaWdITdXD9rj90jNpYrVZKTqL9TsVuo2VcCBdYq1q8cNLy
GwRfhRlEfrL8wHHm5BF1bJ8lK3oWrU9yqLkCDQRLJ6bHEAgAhDv8Ifl/QKaJONb5
/qm8uWC70rlzXLm9YlUpbAcr/tvCkG271wzT4Sz/cHTvQ5s3yBsGq49Li7Z9IfVF
k5xKV0mdGyiZwmHOxmaVL3DcoyLkrOvYStqy3d/DEm9YaAWiAi42REVIXvmRsJce
87wCIIY/rLNbncKXOj3HTzWopqfnJPf/nkqYqwWbFkQxMmGfK9E84dLwjGRtwCWb
5uN/YLM3uSJrwLfsRZbmEQhzAJF2mIplwIqR3R7naruQdfyjad5EXOvKQ8P5MxUi
eGxHUlv90LuYCcW+MvVw0zIqchbdWGaz+LGCTRDAIyJZZzB6kLCuHn3TWPyUpPds
BI5jfwAECwf+Nl+UUqw0HPZP9kXYG0VED1wFxWEckgzLeF32kDQGIlNp0NbYcSbi
8xS56fFbpszA+LZrJgTZmnFRUwDCclma7punj3b8nM0gRtHvuLentmAhnQPIX8SW
DRwhBNIujSOxQrtjjw6oFyrMlYqpe73IUAAINzeCCwZXKDvOiTgm7oI/mI6fJiNr
c8NqNxhGS4Bzw/rexAhZngekMqR9Nglxk7EzUOqrffc6/Orq1fE2t/UNAOqVVfNX
5F2hiINXi1+ywhOYOJVfQ/xuil2FmI7txAc/7XmUcqxNwayjOzBKlVHIAcIyLMAT
w3yRVvh+gezGvUbE9HnyYHq7nO9dmenM7YhJBBgRAgAJBQJLJ6bHAhsMAAoJEHPX
cM2lkEe5pLMAnA/kDShHCzfV5loZcyX8M41tzSYDAJ4jUTgQV69+3QpJmsE3GoCk
sIYlMZkCDQRTdNZlARAAoxFGU8l2Ab8byV4UOZE1uVR+euj2oMcTcnspO7cALEEs
xxNWYOoSmQLZtpv5eDAZp1EW9SPAuWkZ0RMj+mhiHxTqU1EYTCUzVYo+3qjfVzds
6SVw566fM4E0X2n29ABOOBWQ9Y5RJivB5s1yTaPNptUBeitbJOc8oDfa9raqkvm0
1/MFLlmMNwEbsBgvgZnjbhNTJIVta/fHc2mGvSL/p1m8XZmIM+xh3XY7wo7aqhx8
v9QuAWr7SgzwKmHH7JyT76qBo07DnM6bIvQHV+grgFAeU9qATawFob7qqqmDDttu
ajzd8/k+x07MswR30qNj0ufahuq5ttjuhVHGptwhjYmZVuJWrxsEWCWT/WkZp6AL
76094revWr3KRzuEbw2LJWLOEo4ePQpj4gBmNl3dPi9Hs936si7QIr/AJWyhgpi+
Kc4Dz8qA6elJ1T0gdaPPppK8n+ErNoBVJn0D5m1iUS3u7aSoyaTtlTjDeZgZYXAh
AX4uVNJl/4CwgPBBlpwJ+KpCcaQfA5P8Zgmdmp8rZfjfHmMWs4+CVgyEHUPD3NEY
0wlbwBNUW+ruqkaB/k8HkXfJF5hCAjUjmHeYXjeUfNr3qzmmivzXe/9PwJ2ldBRc
LTSMt7RuBGuE0wyFoTNQgbnmIySIWI+t+huu/7fGIp2hb53OMukk20plkLKXyyUA
EQEAAbQnQWxleCBIZW5uaW5nIDxhbGV4QHRob3JpdW1yb2JvdGljcy5jb20+iQI4
BBMBAgAiBQJTdNZlAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDFiL18
E/NeP2mTD/4w8iqmfxlEGlFA0MpcmYk3TKaUUR7iBNdxEIS/3ed35G8tlttrZoTm
AqDsyZGTzDgbcwYa9Brrz+SRx3JSCa0mkhnMuXkwjVRR+31UsYlK3sVEUW8OAMtZ
QMVTfoGke1SX7QrTUIIBQmWeARiIoarAuWfCeVVHMng2ytIDbrFBtaKNTRjz4i47
an0Yh0V0GvZE/3lv2ZVdJyVR+bxTZp2ECPWQyY8838w7iqvGJTm0akBt43IcaseI
vlPDuhpzNYaK1yHeQ1yahMV8EYSBImUfJdhN5HGvNzM+NNpSGugqD7XB5edQEVKv
kCyd+QXEddmozzh3Ga2sIzK+Yj84WHFzBX9riAkwpY2GyEmAEShw2lAK4KZGhYFS
iUfeADy2rn7bpXIYp29fQA2xqGUQWgXi6Eii4eOOyFMJ6LxIeMtwMRhZ7tJmgD9y
6PnaczyiLyIk/zE32KkgSsKUvrlIYE+gFayleYPFmgl7UtmvnFcqLZUZsB3FfjyN
DdKT3g2qMSjsGh7B5jd5HbH+kEJV87opNyMtcnCZ1kcsA2p8a1FDpw847NDwg/o1
q9JCEh7oA4lqUR5S/MhRkfUhGLlqXoi+FCgYJcG/jBejr04CKTI7dx6ndJisUuBU
PU9pdJz6KF8YM2AiCGvvFWecuWsaF+frEpYspsxS+O7tzr+3zMxJobkCDQRTdNZl
ARAA1j8K1g58SdeQpXY0NUJSMEGXE5Ct5cIsxTa+y/+7c4M832nU5NKmeBIH6RDu
nmtGHH7Sb9qQgCxgeFv+67DDquo8F5Ej9pSY0mTEh5s3buKm6KZ/4am3J9wIa6mZ
2SC4A4kk27YzVaTbX5pA3mXYzVlN5c9YnqFX0NgFbtIMd3dMyLqPcZab3SWMwLw/
e7rGZx3W3VuGAi+JiwNNTo9Bw7GhEgo/GmXct5Ja7mCz+WYZs5nRZs28NSvTgg51
2FfbgMmGn56m9/dmkB9Tw7gmxCoIYmYHP4MPJcERHWqRfjEHNlVmnOUgPenYxrX1
kY9ckf6QujmuFKIDxElDIusq1e7c46iBsfxuaV4C7O1exxg3k5zKiX4CcSly3cwq
RgpdYvghFr5zwNkSF+hTHmS0IxT0TNf7W8VCw4kOd7JtNp+tUK86EGdPfiv741lE
Z+n+6ZT1p1NXWkmdBgyagnpMsZvRmIdCCRJe2L7XYUZiofhe5hsk4g4I9b9drLuq
qEqQTbVI3lHDbCGBnAlPdtM24Ex1dhzkhxy940J8lWUo9c7JHxHoOscgw5m+OjHu
oaIDlqByWLzaCgauu8O4nkhPoBEUP2cT2UrXfiq0eX8ruJunBNPk9Md1ThvhA37k
LD7vRWziSJnN5NiuH0QVVE8/CnVB9pKPM+aSgx2XoW26f5kAEQEAAYkCHwQYAQIA
CQUCU3TWZQIbDAAKCRDFiL18E/NeP2dTD/48LSf37o78JfbR0myAeHP1PcURzySq
Yl8C87k8au5CQ8L4vep+1u6p8DSrstBs3DrdP/FIv60mZkW4ZMC46b90aJ5UrFBu
cF9EzObISrPK5LsbHK+4U8aS5x4fyPtimOX7xEbIEiN/FBNkRpzRrLBzczFrkTvS
TA5Kq/254Bmlw0JwUtmP2jcg9Yw3azSx6k/lDj2E6Oj0z+lBYZune7xr2HsUutbD
FBfsPgjGqxJkUZNP5nl0KQrd46CWetCsTTyRiVKLNUHKrmCqOVG6W2YfXuJ4ShLZ
v+hJIxveSP1kyEOO0UrlZJQZv4eDAI+nK8aoARqso9+uWZsclsGkUPTmzU9ZjTZm
x7Jt2slEgWw3Mchqig12gBC6wdTBeF8gR1id+bHgP0qpyjF2E+Ze/ULEQuJGM6nC
KtXcplh3eKyywkCtZ/8x2xDf/jtVtvgbE7i/A54oGc3gLJBmI2K7NujtREMWhLZp
LvuKYiiopx66VbzJL9YyEeTwvFClj2vM2iK2WS7MGfN3w/imZVvTb6/EtbB/4fO7
YkQrGND+afvIlCNNc3+MhJ+eCDFy4cp7cAZDlo62mLDEVDGLbfw8qM+2xeykZC4k
zw+otJrT+FR5O9y55RmX7mSWiyRC83mvL8fYEX2XUkkIH3IWxqM5OkZAi1EPqpo7
XIx1Fz1wKp+hXQ==
=rBdy
-----END PGP PUBLIC KEY BLOCK-----

View File

@@ -1,12 +0,0 @@
prefix = /usr
bindir = $(prefix)/bin
all:
echo Should download files
clean:
echo Cleaning
install: all
mkdir -p $(DESTDIR)$(bindir)
install frcsim $(DESTDIR)$(bindir)/frcsim

View File

@@ -1,5 +0,0 @@
frcsim (0.1-1) trusty; urgency=low
* Initial release.
-- Alex Henning <alex@thoriumrobotics.com> Wed, 14 May 2014 21:04:27 -0400

View File

@@ -1 +0,0 @@
9

View File

@@ -1,15 +0,0 @@
Source: frcsim
Maintainer: Alex Henning <alex@thoriumrobotics.com>
Section: misc
Priority: optional
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9)
Package: frcsim
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, frcsim-gazebo-plugins, frcsim-gazebo-models, frcsim-eclipse-plugins
Description: Installs everything necessary for FRC simulation with Gazebo.
Package that installs everything necessary for FRC Simulation, including
the gazebo plugin, gazebo models, eclipse-plugins and a wrapper script
around Gazebo. This enables support for development of FRC robots with
simulation.

View File

@@ -1,25 +0,0 @@
Copyright
Copyright (c) 2009 FIRST
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the FIRST nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,3 +0,0 @@
#!/usr/bin/make -f
%:
dh $@

View File

@@ -1 +0,0 @@
3.0 (quilt)

View File

@@ -1,5 +0,0 @@
#!/bin/bash
export GAZEBO_PLUGIN_PATH="${GAZEBO_PLUGIN_PATH}:/usr/lib/frcsim/plugins"
export GAZEBO_MODEL_PATH="${GAZEBO_MODEL_PATH}:/usr/share/frcsim/models"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/frcsim/plugins"
gazebo $@

View File

@@ -1,153 +0,0 @@
#!/bin/bash
function check-environment {
# Ensure root access
if [ "$(id -u)" != "0" ]; then
echo "*** This script must be run as root!" 1>&2
echo "*** Make sure that you followed the instructions properly." 1>&2
install-fail
fi
# Make sure that we're on Ubuntu.
if [ "$(lsb_release -is)" != "Ubuntu" ]; then
if [ "$(lsb_release -is)" = "" ]; then
echo "*** Distributions other than Ubuntu (such as yours, probably) are not supported." 1>&2
else
echo "*** Distributions other than Ubuntu (such as $(lsb_release -is)) are not supported." 1>&2
fi
echo "*** This means that if the install fails, don't blame us." 1>&2
echo "*** Continue anyway? (y/n)" 1>&2
read CONT
if [ "$CONT" != "y" -a "$CONT" != "Y" ]; then
install-fail
fi
fi
# Make sure that we have /etc/apt/sources.list.d available.
if [ ! -e /etc/apt/sources.list.d ]; then
echo "*** Cannot find /etc/apt/sources.list.d - is apt installed?"
install-fail
fi
# Make sure that apt-key is installed.
if ! which apt-key >/dev/null; then
echo "*** You don't appear to have apt-key installed." 1>&2
echo "*** Please install apt and run the script again." 1>&2
install-fail
fi
# Make sure that apt-get is installed.
if ! which apt-get >/dev/null; then
echo "*** You don't appear to have apt-get installed." 1>&2
echo "*** Please install apt and run the script again." 1>&2
install-fail
fi
# Make sure that we have internet access.
if ! ping 8.8.8.8 -c 1 >/dev/null; then
echo "*** You don't appear to be able to access the internet! (Can't ping 8.8.8.8)" 1>&2
install-fail
fi
# Make sure that wget is installed.
if ! which wget >/dev/null; then
echo "*** You don't appear to have wget installed." 1>&2
echo "*** Install? (y/n)" 1>&2
read CONT
if [ "$CONT" != "y" -a "$CONT" != "Y" ]; then
install-fail
fi
apt-get install wget
fi
}
function install-fail {
python -c "raw_input(\"Installation Failed (Hit enter to exit) \")" 1>&2
exit 1
}
function remove-frcsim {
check-environment
echo "*** Remove Gazebo package entry too? (y/n)" 1>&2
read CONT
if [ "$CONT" == "y" -o "$CONT" == "Y" ]; then
rm -f /etc/apt/sources.list.d/gazebo-latest.list
fi
rm -f /etc/apt/sources.list.d/frcsim-latest.list
# TODO: Does not currently remove keys. Should it?
apt-get update
apt-get remove --auto-remove frcsim
}
function install-frcsim {
check-environment
# Add Gazebo Repository and Key
if ! echo "deb http://packages.osrfoundation.org/gazebo/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-latest.list
then
echo "*** Cannot add Gazebo repository!" 1>&2
install-fail
fi
if ! (wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -)
then
echo "*** Cannot add Gazebo repository key!" 1>&2
if ! ping packages.osrfoundation.org -c 1 >/dev/null; then
echo "*** The package host for Gazebo appears to be down. Try again later." 1>&2
fi
install-fail
fi
# Add FRCSim Repository and Key
if ! echo "deb http://first.wpi.edu/FRC/roborio/release/linux `lsb_release -cs` main" > /etc/apt/sources.list.d/frcsim-latest.list
then
echo "*** Cannot add FRCSim repository!" 1>&2
install-fail
fi
if ! (wget first.wpi.edu/FRC/roborio/wpilib.gpg.key -O - | apt-key add -)
then
echo "*** Cannot add FRCSim repository key!" 1>&2
if ! ping first.wpi.edu -c 1 >/dev/null; then
echo "*** The package host for FRCSim appears to be down. Try again later." 1>&2
fi
install-fail
fi
# Update and install frcsim and its dependencies
if ! apt-get update
then
echo "*** Could not resynchronize package index files." 1>&2
echo "*** Are you running another update or install?" 1>&2
install-fail
fi
if ! apt-get install -y frcsim
then
echo "*** Could not install frcsim packages. See above output for details." 1>&2
echo "*** Are you running another update or install?" 1>&2
install-fail
fi
# Done
python -c "raw_input(\"Installation Finished (Hit enter to exit) \")" 1>&2
}
if [ "$1" == "ROOT" ]
then
install-frcsim
elif [ "$1" == "INSTALLER" ]
then
SUDO_ASKPASS=/usr/bin/ssh-askpass sudo bash -c "$0 ROOT"
elif [ "$1" == "REMOVE-ROOT" ]
then
remove-frcsim
elif [ "$1" == "REMOVE" ]
then
SUDO_ASKPASS=/usr/bin/ssh-askpass sudo bash -c "$0 REMOVE-ROOT"
else
gnome-terminal --window --hide-menubar --title "FRCSim Installer" -e "$0 INSTALLER"
fi

View File

@@ -1,12 +0,0 @@
Origin: users.wpi.edu
Label: FRCSim
Codename: trusty
Architectures: i386 amd64 source
Components: main
Description: Repository for simulating FRC robots using WPILibSim and the Gazebo simualtor.
SignWith: yes
DebOverride: override.trusty
DscOverride: override.trusty
DebIndices: Packages Release . .gz
UDebIndices: Packages . .gz
DscIndices: Sources Release . .gz

View File

@@ -1,3 +0,0 @@
verbose
ask-passphrase
basedir .

Some files were not shown because too many files have changed in this diff Show More