Commit Graph

79 Commits

Author SHA1 Message Date
Peter Johnson
f84018af5f Move entirety of llvm namespace to wpi namespace.
During shared library loading, a different libLLVM can be pulled in, causing
llvm symbols from dependent libraries to resolve to that library instead of
this one. This has been seen in the wild with the Mesa OpenGL implementation
in JavaFX applications (see wpilibsuite/shuffleboard#361).

This is clearly a very breaking change. For some level of backwards
compatibility, a namespace alias from llvm to wpi is performed in the "llvm"
headers.  Unfortunately, forward declarations of llvm classes will still break,
but compilers seem to generate clear error messages in those cases
("namespace alias 'llvm' not allowed here, assuming 'wpi'").

This change also moves all the wpiutil headers to a single "wpi" subdirectory
from the previously split "llvm", "support", "tcpsockets", and "udpsockets".
Shim headers will be added for backwards compatibility in a later commit.
2018-04-30 10:22:54 -07:00
Thad House
7f88cf768d New 2018 and later build setup (#1001) 2018-04-29 13:29:07 -07:00
Tyler Veness
0ef9803363 Update copyright year to 2018 (#864)
Also fix a few files with incorrect line endings.
2018-01-02 11:20:21 -06:00
PJ Reiniger
55b6764d50 Fix bugs in simulation libraries (#853)
Some thing got broken in the past couple of weeks with updates to the
HAL.
2017-12-31 14:37:14 -06:00
Jaci R
8d1dee16be Add DriverStation NetworkTables HAL Extension (#829) 2017-12-29 21:55:31 -06:00
Jaci R
76b182600a Add Low Fidelity NetworkTables simulation extension (#823) 2017-12-29 21:54:18 -06:00
Thad House
8106fbdbea Removes custom CONFIG_ATHENA compiler directive (#796)
In roborio GCC 5.5, __FRC_ROBORIO__ has been added directly to the
compiler. So we can instead use that to detect if we are build for the
roborio, and in a much more reliable way.
2017-12-08 21:40:11 -08:00
Thad House
9090a82ef5 Fixes halsim sources and headers zips (#804) 2017-12-02 22:30:54 -08:00
PJ Reiniger
303c259b89 Simulate ADX* family of accelerometers and gyros (#688) 2017-11-18 12:31:51 -08:00
Thad House
c885251367 Fixes HALSim_Print build to be the standardized pattern (#721)
Now publishes in zips, and with proper artifacts.

The code files just moved, and no changes.
2017-11-10 19:26:33 -08:00
Thad House
ce4c9edd1f Fixes halsim_print to not try and build when the 'onlyAthena' flag has been set (#685)
Building a non-athena library in athena only is not possible.
2017-10-25 10:52:35 -07:00
Jeremy White
be77f9cb26 Pull request for the Extensions interface only (#655)
* Modify halsim to be able to load extension libraries if they are available.

It will read the list of libraries to try from the HALSIM_EXTENSIONS
environment variable.  Multiple libraries can be given if separated
by ';' (Windows) or ':' (Unix).

The library must have an 'HALSIM_InitExtension' method that returns >= 0 on success.

The library is expected to use the interface expressed by
  hal/src/src/main/native/include/MockData

* Add a simple halsim library that just prints robot values.

This makes a good test bed for cross platform purposes,
and provides the ultimate in light weight simulators.

This initial version only prints PWM values.
2017-10-18 00:27:55 -07:00
Thad House
e1195e8b9d Update to 2018_v4 image and new build system. (#598)
* Revert "Force OpenCV to 3.1.0 (#602)"

This reverts commit 50ed55e8e2.

* Removes Simulation

* Removes old build system

* Removes old gtest

* Adds new gmock and gtest

* Updates to new ni-libraries

* removes MyRobot (to be replaced)

* moves files to new location

* Adds new sim backend and new test executables

* updates .styleguide and .gitignore

* Changes cpp WPILibVersion to a function

MSVC throws an AV with the old version.

* Disables USBCamera on all systems except for linux

* 2018 NI Libraries

* New build system
2017-08-18 21:35:53 -07:00
Aaron Pinto
5fd996876b Fixed a typo (#547) 2017-06-04 00:34:11 -04:00
Austin Shalit
ed1a94531a Update license headers to 2017 (#434) 2017-01-01 00:05:57 -08:00
Tyler Veness
ba8761e39e "using" directives are no longer used in global namespaces (#219) 2016-11-01 23:09:51 -07:00
Fred Silberberg
e5e1a1a4d1 Moved version generation to the WPILib versioning plugin. (#277)
* Moved version generation to the WPILib versioning plugin. This also moves ntcore and wpilib to the latest available version.

* Fixed description string.

* Gave full path for ignored files.
2016-10-20 23:54:04 -07:00
Tyler Veness
5dfae8d6bd Fixed include order (#245)
See wpilibsuite/styleguide (#11).
2016-09-25 16:50:13 -07:00
Tyler Veness
05626cfafe Fixed cpplint.py warnings (#215)
* Fixed cpplint.py [build/include_order] and [build/include_what_you_use] warnings
* Fixed cpplint.py [readability/casting] warnings
* Updated .styleguide format
* Fixed cpplint.py [build/header_guard] warnings
2016-09-05 13:55:31 -07:00
Fred Silberberg
3df257cdbb Set duplicate strategy for all jars and zips to prevent duplicates from occurring (#191) 2016-08-12 13:45:58 -07:00
Tyler Veness
0cb288ffba Fixes warnings thrown by cpplint.py (#154)
* Fixed cpplint.py [runtime/int] warnings

* Fixed cpplint.py [readability/casting] warnings

* Fixed cpplint.py [readability/namespace] warnings

* Fixed cpplint.py [readability/braces] warnings

* Fixed cpplint.py [whitespace/braces] warnings

* Fixed cpplint.py [runtime/explicit] warnings

* Fixed cpplint.py [runtime/printf] warnings

* Fixed cpplint.py [readability/inheritance] warnings

* Fixed cpplint.py [whitespace/tab] warnings

* Fixed cpplint.py [build/storage_class] warnings

* Fixed cpplint.py [readability/multiline_comment] warnings

* Fixed cpplint.py [whitespace/semicolon] warnings

* Fixed cpplint.py [readability/check] warnings

* Fixed cpplint.py [runtime/arrays] warnings

* Ran format.py
2016-07-10 17:47:44 -07:00
Tyler Veness
aafca4ed7f Reduced duplication between formatting scripts with Task base class (#80)
Also added scripts for EOF newline management and for removing trailing whitespace. configure.bat was rewritten to use CRLF line endings. Documentation for the existing scripts was also improved.
2016-07-10 08:33:27 -07:00
Fredric Silberberg
2f36d508c4 Gradle 2.14 (#118)
Updates the gradle version to 2.14. In doing so, some model elements have changed. Additionally, some redundant elements have been removed from the gradle scripts.
2016-07-02 16:32:14 -07:00
Tyler Veness
2f7eff7091 Removed @author from comments (#88)
Keeping @author lines in the comments serves no functional purpose.
2016-05-29 09:24:04 -07:00
Tyler Veness
8566878af4 Fixed C++ simulation build with Boost 1.60 (#49) 2016-05-25 22:41:58 -07:00
Tyler Veness
62812faf62 Clean up include guards and EOF newlines (#65)
* Replaced include guards with #pragma once

* All source files now have exactly one newline appended

Some files had either two newlines at the end or none (which isn't POSIX compliant). This patch fixes that.
2016-05-25 22:40:15 -07:00
Tyler Veness
e6f6d24780 Removed empty default constructors and destructors from Gazebo plugins (#63) 2016-05-25 20:26:01 -07:00
Peter Mitrano
e3eae023da Cleanup of gazebo plugins (#46)
* Upgraded plugins for gazebo 7
* Fixed documentation on sensors
2016-05-24 20:27:24 -07:00
Tyler Veness
e14e45da76 Add format script which invokes clang-format on the C++ source code (#41)
On Windows machines, clang-format.exe must be in the PATH environment variable.
2016-05-20 17:30:37 -07:00
Peter_Mitrano
75a07fc3e4 fix sim_ds launch script
It seems the tilde character doesn't always resolve to the home
directory

Change-Id: I69ecbab266901b271a16ce81b60a8bf7873f8a20
2016-01-08 01:31:01 -05:00
Peter_Mitrano
4dec393c2d Fixed sim_ds script library path
Change-Id: I12fe435ea397cbcaf5da5b214c36ef5f76eb88cb
2016-01-06 00:14:11 -05:00
Peter_Mitrano
2d43048807 Fixing install script... again
apparently `ln -sf` does not overwrite existing symlinks
so we use `rm -f` first, then use `ls -s`

Change-Id: I033839e50b942cc3508004c84837e9090f1b4f5c
2016-01-05 16:45:22 -05:00
Tyler Veness
3cd1253977 artf2612: Update license in source files.
Years update, references to WIND_BASE were removed, and WPILib license was
moved to the root directory of the project.

If there was already a comment block, a year range through 2016 was created
using the first year in the comment. If there was no comment block, a block
with just the year 2016 was added.

Comments were not added to files from external sources (NI, CTRE).

Change-Id: Iff4f098ab908b90b8d929902dea903de2f596acc
2016-01-05 00:35:05 -08:00
Peter_Mitrano
70bc630f1f Fixing the frcsim installer script
URL for simulation zip changed as of gerrit 1264
script argument name changed from INSTALLER to INSTALL
fixed jar and logo paths for sim_ds

to use the script, it's now simply:
./frcsim-installer.sh INSTALL

You can optionally supply a promotion status from which to install, such as
./frcsim-installer.sh INSTALL beta
./frcsim-installer.sh INSTALL development

Also added some information to the README

Also allow any type of file install-resources since it may contain
libraries and jars

Change-Id: Ie876a05c88d3d48b8592f1800959988ae66edd04
2016-01-03 02:05:22 -05:00
Tyler Veness
5cee85f921 Fixed some typos in the comments of MotorEncoderFixture.java, a method name in CANMotorEncoderFixture.java, and the README files
Change-Id: I87d982068f3e7cdcce6e5b06c34a7ef326f5eae0
2016-01-01 16:19:53 -08:00
Peter_Mitrano
acc7fbbf01 finishing up FRCSim installer
adds build of gz_msgs on end-user computer
This means we don't need to provide different zips for different
versions of ubuntu.
The problem was that gazebo on 14.04 comes with protobuf 2.5 but gazebo on 15.10 comes with 2.6
added a few other fixes to the install script as well

also fix dependency between simluation publishing and libwpilibcsim
building

Change-Id: I57d5a26ed7795bc61a25402e2986c6023d1d78ac
2015-12-29 13:48:59 -05:00
Peter_Mitrano
17b363f3b4 working on install process for FRCSim 2016
To publish the simulation zip, run ./gradlew publish -PmakeSim

Targeting Ubuntu 14.04 and 15.10 for now, with 14.04 being the
currently best supported.
Two scripts have been drafted for installing, for 14.04 and 15.10
It currently publishes to ~/releases/maven/development/simulation

There is a known bug that gz_msgs for 15.10 must be built using
protobuf 2.6, which is not the default on 14.04.

Change-Id: I6cccd601671553d30fd05bbbc79c2b7dc1efbf1d
2015-12-28 16:42:24 -05:00
Peter_Mitrano
2c04cf135b Improved READMEs
fixed a few incorrect statements
added structure and organization to main README to help people find
stuff when they're first starting

Change-Id: I6148f2e9bc63cbeaf5f2e40566bf9d274ed36aaa
2015-12-25 21:16:00 -05:00
Peter_Mitrano
d69803804f Repaired simulation build on linux
Reverted to old driverstation and joystick code because we're not ready
for windows drive station yet

updated paths to reflect new wpilib organization
fixed name of gazebo topic (if you want /gazebo/frc/time use ~/time)
included network tables in wpilibJavaSim
Added ds script, and improved frcsim script
always start gazebo with verbose

Change-Id: I3c54b7000019a5985079a88200896a8069e69b86
2015-12-19 14:42:43 -05:00
Peter_Mitrano
0d062fba3a Add Cmake wrappers and unzip desktop ntcore builds
the task allcsim will build everything
requires ntcore desktop to be built
also fixed Driverstation to match non-sim C++ API

Conflicts:
	wpilibc/simulation/CMakeLists.txt

Change-Id: Id38141a5b48ed7fe064c7e6c8d2f618481b7e298
2015-12-18 22:29:57 -05:00
Peter Johnson
03ce0a1b92 Remove temporary batch file.
Change-Id: If696f5833907fab9c9406a8bfb72167edc74fbec
2015-11-25 20:37:24 -08:00
Fredric Silberberg
6d854afb0e WPILib Reorganization
This is a major restructuring of the WPILib repository to simply build
procedures and remove the remnants of Maven from everything except the
eclipse plugins. Gradle files have been largely simplified or rewritten,
taking advantage of splitting up parts of the build into separate build
files for ease of reading.

The eclipse plugins are now in a separate project, as is ntcore. All
dependencies are resolved via Maven dependencies, with the
Jenkins-maintained WPILib repo. Project structures have also been
simplified: we no longer have separate subprojects inside wpilibc and
wpilibj. Where possible, these changes hav been done with git renames,
to make sure we still have full history for all repositories. Other
unrelated subprojects have also been broken out: OutlineViewer is now a
separate project.

Change-Id: Ib4e2a6e1a2f66427a14f16612b0e0d69ed661878
2015-11-21 18:26:49 -05:00
peter mitrano
4514e4489a refactored HAL library
builds two libraries, Athena  and Desktop.
Simulation should use Desktop, Robots should use Athena

Also:
 - copied Driverstation and Joystick from Devices into Sim
 - Descreased dependency of pthreads in JNI.
 - removed Simulation ifdef from non simulation
 - added missing decprecated attribute for msvc
 - removed usage reporting from sim
 - removed unused pom.xml and constexpr

Change-Id: If8eb540f9434dce17c77a245fda6985713e80b2d
2015-08-20 11:22:42 -04:00
peter mitrano
29d029fa61 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
2015-08-18 10:39:25 -04:00
Fredric Silberberg
1e4e0bacde Gradle Build
This adds gradle support for building wpilibj and wpilibc. At this
point, both of these libraries should be fully ready to go.

Gradle should give us a number of improvements, including less
dependencies for getting building up and running, and MUCH faster build
times. I'm noticing significantly faster build times already compared to
Maven, with neither system building the plugins. The changes here should
be pretty straight forward. The basic command for gradle is './gradlew'.
This is the gradle wrapper, and it will find and download the correct
gradle executable for your system. There is no need to install anything
yourself. To see every task available, run './gradlew tasks'. The
important tasks for us are listed under the WPILib header when the tasks
command is run. To generate unit test binaries, the
fRCUserProgramExecutable command will create the C++ tester, and the
wpilibjIntegrationTestJar command will create the Java tester. The Jenkins
deploy scripts have been modified to know the difference between maven
generated and gradle generated jars with an environment variable. Creating
the eclipse plugins still requires Maven, but gradle will handle calling
it correctly and generating the proper dependencies for it. Create the
plugins by calling ./gradlew eclipsePlugins.

Jenkins can now be modified to support the new build system. Unit tests
are run with ./gradlew test. Generating the integration tests uses the
above two commands, and then process proceeds exactly as it did before.
For publishing documentation, a new task has been created, ./gradlew
publishDocs, which handles putting the documentation where Jenkins expects
for publishing.

Change-Id: I9a260d391984f98ef9170993efe933e4026161dc
2015-05-20 16:22:17 -04:00
Dustin Spicuzza
d7a9794080 Simulator makefiles: Set file extension based on platform 2014-11-17 21:36:29 -08:00
Dustin Spicuzza
6234fe06f5 Fix CMakeLists.txt to not be platform specific
- Additionally, use the boost macro to properly find its library
2014-11-17 21:36:29 -08:00
Alex Henning
54951c888f Removed remains of the old toolchain method.
Change-Id: Ib885730acdbb27707ce2caadadc3f9ce86fdd0ca
2014-11-12 15:27:29 -05:00
Alex Henning
3b53f84c8f Fixes for 0 based joysticks and joystick axes in simulation.
Change-Id: I67608450d0818b38f6d5b5c709190433f2dc5cf5
2014-11-06 19:00:02 -05:00
Alex Henning
fa8d7b843c Fixed building of the frcsim-libwpilibsim-cpp deb.
There is still a bug where the examples have been updated to use 0 based
joysticks, but the simulation libraries have not been updated. I'll fix
that as a separate commit focused on fixing the joystick APIs.

Change-Id: I3b358e67b7fa18b30d1fd2b53098659cfefdfd76
2014-10-26 20:43:50 -04:00