Giter VIP home page Giter VIP logo

skillhub's Introduction

Multi-Task Hierarchical Imitation Learning of Robot Skills

Code for running the SkillHub server, generating annotated demonstrations, learning hierarchical controllers, and rolloing learned controllers on an HSR robot.

Installation

In addition to the dependencies in requirements.txt, the HSREnv depends on pyyolo. Please follow these instructions to install pyyolo, and then change the paths in vision.py to your installation path.

Running SkillHub

To run the SkillHub server:

python skillhub/server.py

To run the server in debug mode, set the DEBUG flag to True in server.py.

Providing demonstrations

To rollout a demonstration of the SetTable task:

python rollout.py --domain dishes --task SetTable --data data --teacher

Available tasks are: ClearTable and SetTable in the dishes domain; and Pyramid<n> (pyramid of height n) in the pyramid domain. Annotated demonstrations will be saved in the path provided to --data.

To implement new domains, inherit from Env (or its subclass HSREnv) -- see PyramidEnv for example. To implement new tasks, inherit from Agent (or its subclass HierarchicalAgent) -- see PyramidAgent for example.

Human teleoperation is performed by actions starting with Record_, which pause the script to allow human control and record it. Before training, the recorded demonstrations must be fixed to format the recorded control as robot control. To fix all demonstrations in a path:

python -c "import fix; fix.fix_record('data/dishes/SetTable_fix', 'data/dishes/SetTable_rec')"

Training hierarchical controller

To train controllers for the ClearTable and SetTable tasks:

python train.py --domain dishes --tasks ClearTable SetTable --data data

All controllers but the last will be trained independently from all their available data. The last controller (SetTable in this case) will be trained with detailed mode selection with the data of past tasks and with new demonstrations added one by one. The results of training will be saved in results/dishes/ClearTable.SetTable.

Use --runs <n> to repeat training for n independent trials. Use --independent to train the last controller only independently of the other tasks. Use --full-batch to train the last controller from all available data, rather than stopping when enough demonstrations were given to successfully train and validate the controller.

Evaluating a trained controller

To rollout a trained controller:

python rollout.py --domain dishes --task SetTable --model model --data eval

Data from the evaluation experiment will be saved in the path provided to --data.

skillhub's People

Contributors

royf avatar

Stargazers

Bryon Tjanaka avatar

Watchers

James Cloos avatar  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.