GithubHelp home page GithubHelp logo

rayckey / motion_imitation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erwincoumans/motion_imitation

1.0 1.0 1.0 3.75 MB

Code accompanying the paper "Learning Agile Robotic Locomotion Skills by Imitating Animals"

License: Apache License 2.0

Python 99.38% MATLAB 0.62%

motion_imitation's Introduction

Hierarchical Locomotion and Path Planning

This repository contains code for training and evaluating hierarchical policies fo The code borrows the environment and robot constructions and is adapted from the code provided alongside the paper:

"Learning Agile Robotic Locomotion Skills by Imitating Animals",

by Xue Bin Peng et al. It provides a Gym environment for training a simulated quadruped robot to imitate various reference motions, and example training code for learning the policies.

Project page: https://xbpeng.github.io/projects/Robotic_Imitation/index.html

Getting Started

Install dependencies:

  • Install requirements: pip3 install -r requirements.txt

Training Models

To train a policy using a single thread, run the following command:

python3 motion_imitation/rltest.py --mode train --motion_file motion_imitation/data/motions/dog_pace.txt --visualize

  • --mode can be either train, or test, path,sweep for evaluation and generation of log files for plotting.
  • --motion_file specifies the reference motion that the robot uses for pose initialization. motion_imitation/data/motions/ contains different reference motion clips. Here we are not using the full motion, but only take frames for initialization if set.
  • --visualize enables visualization, and rendering can be disabled by removing the flag.

For parallel training with Ray, run:

ray start --head --redis-port=6379 --num-cpus=X where X is the number of CPU's available

  • --n_directions number of directions to test to obtain reward gradient
  • --deltas_used number of best directions to update after each iteration
  • --n_workers number of parallel workers for ARS learning
  • --rollout_length number of steps per rollout (episode)
  • --currsteps 0 to turn off curriculum lengthening or curriculum length
  • --actionlim limit of motor angle corrections [0,1]
  • --saveniters save weights and log data every n iterations

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.