8000 GitHub - TTXDY/gym-chrono: Custom OpenAI Gym environments based on PyChrono
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TTXDY/gym-chrono

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

⚠️ These environment are compatible with the develop version of ChronoAPI: Checkout develop branch if you build from sources or use develop label if you install with Anaconda

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/projectchrono/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

About

Custom OpenAI Gym environments based on PyChrono

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • POV-Ray SDL 98.8%
  • Python 1.2%
0