GithubHelp home page GithubHelp logo

00mjk / deeploco Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xbpeng/deeploco

0.0 0.0 0.0 74.75 MB

License: GNU Lesser General Public License v3.0

C++ 91.88% Cuda 0.10% Shell 0.18% Lua 3.79% C 0.10% GLSL 0.31% Objective-C 3.64%

deeploco's Introduction

Intro

This project is designed to learn good navigation skills for simulated characters

Setup

This section covers some of the steps to setup and compile the code. The software depends on many libraries that need to be carefully prepared and placed for the building and linking to work properly.

Linux (Ubuntu 16.04)

Install system dependencies

Run the deb_deps.sh script to install the system dependencies required to build the project.

OpenGL >= 3.3

Ensure that your machine is capable of running OpenGL version 3.3 or greater.

You can verify the version of OpenGL your machine currently has installed via the following command:

glxinfo | grep "OpenGL version"

If glxinfo is not installed on your system, install the mesa-utils package.

OpenGL should come as part of the drivers for your graphics hardware (whether part of the motherboard or dedicated graphics card). If you are missing a compatible version of OpenGL, consider updating your graphics drivers; if you have a GPU, ensure that the system is actually using it.

Download premake4

Download premake4 from here. Extract the premake4 binary into a directory of your choosing (preferably not your local Downloads directory).

Add premake to your PATH variable in .bashrc:

# Add premake to path
export PATH=[PREMAKE_DIR]:$PATH

...where [PREMAKE_DIR] should be the directory containing the premake4 binary.

Build Instructions

  1. Download the most recent compressed external file from the newest release.

  2. Extract it and move into the DeepLoco directory. The top directory of the DeepLoco repository should now contain a directory called external, in addition to all the other directories that were there before.

  3. Build the source code for caffe that came in the external directory.

    cd external/caffe
    make clean
    make
    cd ../../
    
  4. Copy the newly-compiled caffe lib directory from external/caffe/build/lib to the top directory of DeepLoco.

    cp -r external/caffe/build/lib .
    
  5. Copy other prebuilt libraries from the external folder

    cp external/caffe/build/lib/libcaffe.* lib/
    cp external/Bullet/bin/*.so lib/
    cp external/jsoncpp/build/debug/src/lib_json/*.so* lib/
    
  6. Generate makefiles using premake4.

    premake4 clean
    premake4 gmake
    
  7. Build all the targets!

    cd gmake
    make config=debug64
    

    Note: you can speed up the build by appending the -j8 flag to this last make command, where 8 here is the number of concurrent build threads that make will launch. Choose a number that makes sense based on the hardware resources you have available to you.

Note: There are some issues with the installation on Ubuntu 14.04. Some of the libraries have changed their location and name (see BVLC/caffe#2347 for a solution).

Windows

This setup has been tested on Windows 7 and 10 with visual studio 2013.

  1. Download the library.zip file that contains almost all of the relevant pre compiled external libraries and source code.
  2. Unpack this library in the same directory the project is located in. For example, DeepLoco/../.
  3. You might need to install opengl/glu/GL headers. We have been using freeglut for this project. glew might already be included in library.zip.
  4. You will need to copy some dll files from dynamic_lib.zip to the directory the project is compiled to. For example, optimizer/x64/Debug/. These files are needed by the framework during runtime.
  5. Might need to create a folder in DeepLoco called "output", This is where temprary and current policies will be dumped.

Running The System

After the system has been build there are two executable files that server different purposes. The DeepLoco program is for visually simulating the a controller and DeepLoco_Optimize is for optimizing the parameters of some controller.

Examples:
To simulate a controller/character
./DeepLoco -arg_file= args/test_args.txt To simulate a controller/character with a specific policy
./DeepLoco_Optimizer -arg_file= args/opt_int_poli_hopper_eval.txt -policy_model= output/intermediate/trainer_int_model_0000160000.h5
To Train a controller
./DeepLoco_Optimizer -arg_file= args/opt_args_train.txt
./DeepLoco_Optimizer -arg_file= args/opt_args_train_hopper.txt
To Optimize a controllers parameters
./DeepLoco_Optimizer -arg_file= args/opt_args_jump.txt

Key Bindings

Most of these are toggles

  • c fixed camera mode
  • y draw COM path and contact locations
  • q draw "filmstrip" like rendering
  • f draw torques
  • h draw Actor value functions?
  • shift + '>' step one frame
  • p toggle draw value function
  • ',' and '.' change render speed, decrease and increase.
  • "spacebar" to pause simulation
  • r restart the scenario
  • l reload the simulation (reparses the arg file)
  • g draw state features

Contents of external dependencies folders

These lists are provided for reference only. Normally, if you follow the instructions above, you shouldn't need to know about any of this.

Linux

Windows

deeploco's People

Contributors

neo-x avatar xbpeng avatar

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.