Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perrin-isir/gym-cassie-run
gym RL environment in which a mujoco simulation of Agility Robotics' Cassie robot is rewarded for walking/running forward as fast as possible
https://github.com/perrin-isir/gym-cassie-run
Last synced: 2 months ago
JSON representation
gym RL environment in which a mujoco simulation of Agility Robotics' Cassie robot is rewarded for walking/running forward as fast as possible
- Host: GitHub
- URL: https://github.com/perrin-isir/gym-cassie-run
- Owner: perrin-isir
- License: other
- Created: 2022-09-29T14:12:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-17T11:44:56.000Z (about 1 year ago)
- Last Synced: 2024-08-02T00:22:33.455Z (5 months ago)
- Language: Python
- Homepage:
- Size: 33.9 MB
- Stars: 28
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-legged-locomotion-learning - [**gym-cassie-run** - isir/gym-cassie-run.svg?logo=github) (Code / Quadrupeds)
README
# gym-cassie-run
RL environment (with OpenAI Gym interface) in which a mujoco simulation of Agility Robotics' Cassie robot is rewarded for walking/running forward as fast as possible.The Cassie model is the one available in DeepMind's [mujoco_menagerie](https://github.com/deepmind/mujoco_menagerie), and the gym environment is inspired from
[HalfCheetah-v4](https://github.com/openai/gym/blob/master/gym/envs/mujoco/half_cheetah_v4.py). In addition to the basic reward for forward motion, hand-designed reward signals
encourage walking rather than jumping, keeping feet horizontal and not too far apart, and avoiding lateral movements.The following episode has been obtained after training a [TQC](https://arxiv.org/abs/2005.04269) agent for 17M timesteps, using the [xpag](https://github.com/perrin-isir/xpag) RL platform (at real speed, 100 timesteps = 1 second, cf. top left corner of the gif):
![](episode.gif)
The episode can also be viewed with the [view_episode.ipynb](https://github.com/perrin-isir/gym-cassie-run/blob/main/demo_trajectory/view_episode.ipynb) notebook in the [demo_trajectory/](https://github.com/perrin-isir/gym-cassie-run/blob/main/demo_trajectory/) folder. The trajectory is saved in the [demo_trajectory/episode/](https://github.com/perrin-isir/gym-cassie-run/blob/main/demo_trajectory/episode/) folder.
## Installation
Option 1: pip
pip install git+https://github.com/perrin-isir/gym-cassie-run
Option 2: conda
git clone https://github.com/perrin-isir/gym-cassie-run.git
cd gym-cassie-runChoose a conda environmnent name, for instance `cassierunenv`.
The following command creates the `cassierunenv` environment with the requirements listed in [environment.yaml](environment.yaml):conda env create --name cassierunenv --file environment.yaml
If you prefer to update an existing environment (`existing_env`):
conda env update --name existing_env --file environment.yml
To activate the `cassierunenv` environment:
conda activate cassierunenv
Finally, to install the *gym-cassie-run* library in the activated virtual environment:
pip install -e .
Once the installation is complete, you can import the environment in python with:
```import gym_cassie_run```
This directly registers the environment *CassieRun-v0* in gym.