Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add SCRIMMAGE support to GAMS #84

Merged
merged 91 commits into from
Apr 3, 2020
Merged

Add SCRIMMAGE support to GAMS #84

merged 91 commits into from
Apr 3, 2020

Conversation

UltronDestroyer
Copy link
Collaborator

@UltronDestroyer UltronDestroyer commented Mar 31, 2020

Add SCRIMMAGE support to GAMS:

  • Provides two platforms to use. Quadcopter and Fixed Wing.
  • Scaling of up to 1000 agents reliably
  • Spell algorithm and Follow algorithm demos
  • Base build fixes which won't pull a new gams repo on a base build prereqs call if the existing repo name is 'gams'. This is because when a developer wants to build their code in the GAMS repo they want to build the code in the branch they are working on, and not the default gams/master which is pulled by git clone
  • SCRIMMAGE feature toggling
  • Wiki page here https://github.com/TheDash/gams/wiki/Using-SCRIMMAGE-with-GAMS which can be copy pasted once this is merged in to the GAMS wiki. This wiki has only been tested by myself, so I am sure there are things that may go wrong. If there are any issues, I will be easily contactable.

…running bug where switching environments will cause the dependencies to be installed in different locations
… fact that gams was already cloned and installed on a PC. Now, if the present working directory name is gams, it will not do so
@jredmondson
Copy link
Owner

@UltronDestroyer
Copy link
Collaborator Author

Fixes are in.. builds are building!

@jredmondson jredmondson merged commit 7b3ab52 into windows_fixes Apr 3, 2020
jredmondson added a commit that referenced this pull request Apr 7, 2020
* * Making changes to the build scripts for Windows fixes and also
upgrading to 0.7.0 of capnp

* * Beginning to attempt to bring GAMS back into Windows compilability
* Added capnp feature, similar to the one added to MADARA
* Fixed warnings about conversions in several places
* Updated base_build.bat script to be slightly better for windows
building but still requires forcing installation of capnp or other
tools. I may have to give up on .bat scripting and just use perl or
something else here to properly set variables and dictate installation
flow.

* * Fixed template issues in VS 2017
* Fixed some external linking issues involving usage of GAMS_EXPORT
* Fixed OSC linking on Windows
* Only current issue that needs looking into is a set of C4244 warnings involving xutility

* * Forcing using c++ 14 to allow for capnp features

* * Synchronizing recent changes to GAMS windows_fixes. There still appears to be a linking error in clang for gams_controller involving MADARA linking

* * Updated capnp to be a feature so we can disable/enable the compilation on Linux and Windows

* * Updated CI tests to do a capnp optional with clang and g++

* * Updated GAMS CI to only call test_types if capnp is enabled

* * Separating capnp_files format in MPC from the feature of including it

* * Integrated capnp feature into the base_build.sh feature enabling process for building

* * Fixing some issues with the passthrough of capnp feature in the CI

* * Updating CI to include capnp in Android builds, since Java support currently has capnp baked in with no feature enabling

* * Fixed shadow warning in Epsilon.h
* Updated base_build.sh to use latest Eigen and clang 6.0

* * Updating GAMS build scripts to also build capnproto-java, though I'm not entirely sure it's necessary at this point to support the Java and capnp build anymore

* * Updated Multicontroller to no longer fail when resizing after a
default constructor call

* * Added patch file for capnpc-java
* Updated base_build.sh to respect the CC and CXX that is passed to the script as environment variables
* Updated travis.yml to force clang-5.0++

* * Updated Multicontroller to initialize variables in a resize by default. This allows for the creation of appropriate self_ variables within platforms without needing to call init_variables after an init_platform call

* * Fixed capnp types issues in GAMS
* Updated .travis.yml to include types checks on test_any test

* * Attempting to fix issues in Travis CI

* * Updated using_boost for latest boost versions with VS 2017 (required by UE)

* * Added explicit clang-suffix options for base_build.sh
  * Can invoke specific installation and compilation with clang-5, clang-6, clang-8, and clang-9

* * Fixing issue in last commit with special clang instructions to base_build.sh

* * Added support for the clang-SUFFIX build options to also affect all prereqs and not just MADARA and GAMS

* * Fixed issues with clang installation when you haven't set CLANG_SUFFIX or any of the FORCE_CC/CXX options in your bashrc. It should automatically do things now for clang-8 or clang-9

* * Updated base_build.bat to echo a .gams\env.bat that should set variables from command line

* * Added a set environment option to the base_build.bat script (setenv)

* * Updated base_build.bat for both VS2017 and VS2019 to be more seamless in installation process

* * Removing capnp from python and protecting some code with ifdefs for CAPNP

* * Fixed allow_failures issues in Travis CI
* Updated Travis CI config with updated jobs/exclude keywords

* * Removing clang-5 explicit call in Ubuntu Travis CI

* * Reverting change to force cc/c++ compiler clang-5 in ubuntu

* * Removed OSX clang zmq as zmq is no longer building on Mac

* * Adding zmq android build back to allow_failures

* * Added height differentiation and movement to FormationSync

* * Updated FormationSync to use Pose from_container to be more portable

* * Adding brew install for llvm 5, 6, 8 and 9

* * [skip ci]
* Adding Mac build instructions for clang into it's own section

* [skip ci]
* Updating Mac build

* * Updated mac/base_build.sh to attempt to reference the local directory
  instead of the GAMS_ROOT environment variable (which may not be set
  yet)

* * Fixed clang-8, clang-9, etc. support for Mac builds. This is needed to
  help with supporting Unreal Engine on Mac and future build features

* * Changed resize in Multicontroller to allow for only setting swarm.size
  instead of requiring all variables to be initialized in swarm vars
* Added refresh_vars to Multicontroller
* Reduced memory footprint for large swarms substantially in
  Multicontroller

* * Added installation option for opencv on Windows

* * Added opencv installation option for Linux

* * Updated gpc.pl to generate a project that is compilable on Windows

* * Added cmake support for base gams library and gams_controller

* * Windows script is now stable. Installs MADARA and GAMS with cmake
* Updated Cmake to install Boost and MADARA through find_package
* Added configuration and cmake system for GAMS

* * Fixed a scalability issue in gams_controller. The multicontroller was
  creating swarm variables, when it should just init_vars with the id to
  start with for populating self_ variables

* * Updated Windows installation to set PATH appropriately
* Updated MADARA and GAMS installation so linkage

* * Removed warnings in compilation with Cmake and stricter settings on Linux
* Updated CMakeLists.txt to build on Linux

* * Removed versioning from dlls in CMake process

* * Added gams_version
* Fixed incompatibilities between Cmake Windows, Linux, Mac

* * Added feature option for osc since UnrealGAMS is not primary simulator

* * Updated test_utility to properly feature-enable OSC

* * Add default feature of 0 for OSC

* * Adjusting osc feature-enable in base_build.sh for linux/mac

* * Reverted changes to Follow concerning the ReferenceFrame retrieval

* * Implemented initial hive controller

* * Added HiveController sanity checks
* Added test for HiveController
* Added default installs for tests and programs in cmake

* * Updated get_kb and refresh_vars to work with offsets in Hivecontroller

* * Fixed bugs in HiveController
* Added exists function to PlatformFactoryRepository to check if an
  alias is already assigned for a platform factory
* Added more debugging to test_hivecontroller when errors occur

* * Fixed clang warnings in cmake builds

* * Reduced codeowners to 1 user

* Add SCRIMMAGE support to GAMS (#84)

* Added updated base build script which includes scrimmage

* Change from SCRIMMAGE_ROOT to SCRIMMAGE_GIT_ROOT because of collisions in SCRIMMAGE setup.sh

* Copy pasta file for linking

* Added cleanenv option which resets the environment. Fixes a longtime running bug where switching environments will cause the dependencies to be installed in different locations

* Add scrimmage feature

* Added building and linking files for scrimmage

* Small fix

* Starting work for integrating the build of a SCRIMMAGE plugin

* Fixing long standing bug where GAMS re-clones itself disregarding the fact that gams was already cloned and installed on a PC. Now, if the present working directory name is gams, it will not do so

* Upd

* Fix cleanenv

* Fix circular dependency

* Fix plugin path setting to happen after GAMS_ROOT is set

* Add plugin stubs to test if plugin is loading

* Added xml files and fixed using_scrimmage for include paths

* Small bug fixes to build process. Trying to debug missing headers for plugin linking

* Fix ordering in base build

* Numerous changes and SCRIMMAGE_ROOT fixes

* Added fix for endif in GAMSAutonomy

* Fixed build files, temporarily forcing use of c++14 so it compiles.

* Added updated gams.pc

* Added updated base build script which includes scrimmage

* Change from SCRIMMAGE_ROOT to SCRIMMAGE_GIT_ROOT because of collisions in SCRIMMAGE setup.sh

* Merge capnp and scrimmage changes in basebuild

* Added building and linking files for scrimmage

* Small fix

* Starting work for integrating the build of a SCRIMMAGE plugin

* Fix circular dependency

* Fix plugin path setting to happen after GAMS_ROOT is set

* Small bug fixes to build process. Trying to debug missing headers for plugin linking

* Fix ordering in base build

* Numerous changes and SCRIMMAGE_ROOT fixes

* Add path to GAMSAutonomy.xml to scrimmage plugin path

* Add changes so that the plugin loads in. Though missing some variables, but loads in SCRIMMAGE

* Add default variables for car controller plugin?

* Add empty functions, still need to modify controller

* Lots of updates, added in scrimmage, still bugs for linking but mostly works

* Divided plugin and the full gams integration, compiles

* Fix 2 bugs with segfaults in gams_controller

* gams controller can now run a scrimmage instance and control its loops, as well as spawn in agents. more to come

* Fix missing env vars, works after a cleanenv now

* Runs and works tested with 1 agent now.

* Runs with 200 agents

* Change default world to just be a quadrotor base so we can control it with GAMS easy

* Some changes to scrimmage code

* Lots of changes, it runs now, just need to figure out how to get a madara file properly setting a KB through a gams controller

* Update

* Added temporary placement of scrimmage.mf

* Compiles and runs for now. No segfaults. But more coding to do as next position is not set

* Now moves

* Remove accidentally added scrimmage dir, now inside .gitignore

* Hooked up GAMSAutonomy plugin, now we're talking!

* Now moves exactly towards the positions given by GAMS

* Small changes

* Update

* Cleaning up of the GAMS repo with extra files/removal of non essential changes

* Add demo shell scripts

* Revert default world back to working model

* Spawning multiple agents programmatically now

* Now spawns at runtime, pending bugfix on scrimmage side

* Updated with most recent demo code

* Fixed off by 1 bug, agents move accordingly

* Fix multiple frame bugs and touch up some debug lines

* Add orientation function but there's a double orientation set bug atm

* Orientation setup needs to be rethough due to the way the scrimmage sim handles setting orientation

* Added run threaded support for super efficient running

* Update

* Add fixes to the pathing for mission path and plugin path for SCRIMMAGE inside base build

* Add change to prevent GAMS from being pulled from jredmondson master, super annoying when trying to develop

* Fix scrimmage mission path bug

* Add arg to print statement in Multicontroller

* Fix cleanenv params for paths

* Added singleton pattern and support for options for run_simcontrol_threaded and non threaded via KB/CLI scripts

* Added run threaded option as static var

* Fix exception in Follow bug after missed revert causing same bug again

* Update

* Add multiple types and passing of world file via madara mf/kb

* Add fixed wing support to GAMS scrimmage

* Add some function descriptions:

* Added log detailed statements

* Add demo scripts

* set SCRIMMAGE in base_build.sh

* Revert adding double line, already there.

* add $SCRIMMAGE support to testing

* Add #ifdef to SCRIMMAGEBasePlatform.cpp

* Add in #ifdef to SCRIMMAGEBasePlatform.h

* Remove simcontrol pointer in Multicontroller.h

* Remove simcontrol object use from Multicontroller.cpp

* Add auto yes option to PPA for SCRIMMAGE

* * Updated to version 1.3.0
* Adding notes to changes to discuss with Devon about Scrimmage support
* Made sure to add the GAMS_SCRIMMAGE ifdefs in files where appropriate
  to prevent compilation in cmake and any other build system
* Added debug warnings for hive not being set in HiveController

Co-authored-by: TheDash <noobaca2@gmail.com>
@jredmondson jredmondson deleted the scrimmage branch December 25, 2023 06:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants