Giter VIP home page Giter VIP logo

gym-chrono's Introduction

Status: Under Active Development (New Environments and features will be added)

gym-chrono

Gym Chrono is a set of continuous state and action spaces DRL environmentbased on the open-source physics engine Project Chrono. In order to run these environment you need to install PyChrono. Being part of Project Chrono, PyChrono is free and open-source. Moreover, it provides an Anaconda installer. Currently, these tasks are supported:

chrono_pendulum-v0

Reverse pendulum, the goal is to balance a pole on a cart. 1 action (force along the z axis) and 4 observations (position and speed of cart and pole).

chrono_ant-v0

A 4-legged walker, the goal is learning to walk straight as fast as possible. 8 actions (motor torques) and 30 observations (GOG height, COG speed, COG orientation in Euler Angles, COG rotational speed, joints rotation, joints speed, feet contact).

chrono_hexapod-v0

A 6-legged walker, the goal is learning to walk straight as fast as possible. Heach legs counts 3 actuated joints. 18 actions (motor torques) and 53 observations (GOG height, COG speed, COG orientation in Euler Angles, COG rotational speed, joints rotation, joints speed, feet contact).

This is a model of a real hexapod robot, the PhantomX Hexapod Mark II. Motors dara are available here. Credit to Hendricks for the CAD drawings.

ChronoRacer3Reach-v0

A 6-DOF robotic arm (Comau Racer-3), the goal is minimizing the distance between the center of the gripper and the center of the red target box. CAD files and part of the techical data are freely available from the Comau website here . 6 actions (motor torques) and 18 observations (joints rotation, joints speed, end-effector position, target position).

Installation

If you want to install Gym and Chrono in a virtual environment (Conda or VirtualEnv), don't forget to activate the environment first. To install Chrono follow these instructions. Install Gym. Obviously, OpenAI Gym is a prerequisite for gym-chrono.

pip install gym

Then, install the PyChrono extension for Gym:

git clone https://github.com/Benatti1991/gym-chrono
cd gym-chrono
pip install -e .

Example

Training the ant environment using the PPOalgorithm in OpenAI Baselines

python -m baselines.run --alg=ppo2 --env=gym_chrono.envs:chrono_ant-v0 --network=mlp --num_timesteps=2e7 --ent_coef=0.1 --num_hidden=32 --num_layers=3 --value_network=copy

gym-chrono's People

Contributors

benatti1991 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.