Coder Social home page Coder Social logo

pwrdc / transdecenvironment Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 439.57 MB

Unity model of TRANSDEC facility for RoboSub 2019

C# 2.43% ShaderLab 0.42% HLSL 0.09% Objective-C++ 0.01% ASP 0.03% PHP 0.02% CSS 0.48% JavaScript 0.29% HTML 96.23%
reinforcement-learning simulation unity3d ml-agents robosub

transdecenvironment's Introduction

TransdecEnvironment

image

TransdecEnvironment is a Unity3D project prepared for RoboSub competition by PWr Diving Crew (KN Robocik) at Wrocław University of Science and Technology.

The simulation environment was originally prepared for Robosub 2018 Competition. It is built on TRANSDEC facility model from SimBox repository.

The project is maintained by PWr Diving Crew software team members (Unity3D section).

KN Robocik website

Should any issues be noticed, please submit a New issue on Github.

Installation

Unity

TransdecEnvironment requires latest stable version of Unity development platform and is platform-independent. For Windows and Mac OS X versions visit their site: https://unity3d.com/get-unity/download.

Python

For instructions on Python API configuration please go to PyTransdec repository.

The environment

Once installed, clone TransdecEnvironment GitHub repository by executing this command:

git clone https://github.com/PiotrJZielinski/TransdecEnvironment

To use the environment launch the Unity Editor and open the project.

image

In the project, make sure that Scripting Runtime Version is set to .Net 4.x Equivalent: image

Having done all of the above steps, double-click RoboSub2018 scene in Assets/Scenes directory to open the default TransdecEnvironment scene.

image

Optional Paid Assets

image

Aura 2 is a paid asset used in the project for more realistic lightning. We can't post it in this repository as it would be against the license.

If you're not a member of PWr Diving Crew and you want to use it you need to buy Aura 2 on the Unity Asset Store.

After you have an account with Aura 2 bought, go back to Unity and select Window/Asset Store in the menu. Then search for Aura 2 package and import it into the project.

If you don't have it you can still run the simulation, although there will be some warnings about missing scripts in the console.

You'll also have to comment out #define HAVE_AURA_2 in Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Advanced.shader.

Usage

TransdecEnvironment configuration is held by Academy object:

image

Click it to show its properties in the Inspector:

image

Essential Academy parameters:

  • Training Configuration - visual observations' settings used when training mode is selected in Python API

  • Inference Configuration - visual observations' settings used when training mode is not selected in Python API

    • Width - camera image width
    • Height - camera image height (both affect performance)
    • Quality Level - image compression setting (1 - lowest quality, 5 - highest quality)
    • Time Scale - indicates how many frames are dropped during communication (ie. how "fast" the environment behave)
    • Target Frame Rate - how many frames per secodn should the environment return (-1 for maximum available)
  • Reset Parameters - parameters that can be set using Python API on environment reset (better not to modify unless you know what you are doing)

    • CollectData - set environment in data collection mode (0 - standard mode, 1 - data collection mode)
    • EnableNoise - only used when CollectData == 1; enable random positioning of other objects (so that they create "noise")
    • Positive - only used when CollectData == 1; collect positive examples (0 - negative examples, target invisible, 1 - positive examples, target visible)
    • AgentMaxSteps - how many steps the agent can take before resetting the environment (defaults to 0 - indefinite steps)
  • Controller Settings:

    • Control - agent steering method (Player for keyboard steering, Python for Python API controller); if Control == Player use keyboard for steering:
      • W - S: longitudinal movement (front-backward)
      • A - D: lateral movement (left-right)
      • R - F: vertical movement (upward-downward)
      • Q - E: yaw rotation (turn left-turn right)
    • Learning Brain, Player Brain - ML-Agents Brain objects (correctly set by default)
  • Start position settings - starting position drawing settings:

    • Random Quarter - randomly select one of 4 TRANSDEC quarters (if false default quarter is chosen)
    • Random Position - randomly move all objects on reset (if false objects stay in their default position)
    • Random Orientation - enable random rotation of the agent (at an angle of 90° or 180° to the gate)
  • Data collection settings - used when resetParameters["CollectData"] == 1

    • Mode - target whose images are collected
    • Gate Target Object, Path Target Object, ... - target objects from the environment
  • Debug settings (you shouldn't reallly touch them)

    • Force Data Collection - execute data collection regardless of controller mode
    • Force Noise - execute noised data collection
    • Force Negative Examples - execute negative examples data collection

Debug Controls

  • B to pause the simulation in editor and display debug screen
  • V to toggle debug screen on and off

Updating

In order to update TransdecEnvironment you need to reset your changes by executing:

git stash

You can then pull latest changes from master branch by executing:

git pull

In case you want to reapply changes you can execute

git stash pop

but this is not guaranteed to be working. If you do not need your changes execute

git stash drop

Please do not push your changes to master branch. If you find your changes useful please create another branch and create a Pull Request

transdecenvironment's People

Contributors

dominikwasiolka avatar korczak avatar malgorzatagar avatar piotlinski avatar piotrszleg avatar pwrdc avatar skylade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

piotlinski

transdecenvironment's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.