Soft-robotics control environment package for OpenAI Gym
Project description
The environment is designed to leverage reinforcement learning methods into soft-robotics control. Our inspiration is from slender-body living creatures, such as octopus or snake. The code is based on PyElastica, an open-source physics simulation for slender structure. We intend this package to be easy-to-install and fully compatible to OpenAI Gym.
The package is under development, in Pre-Alpha phase. We are planning to complete the initial set of environment by the end of January 2022.
Requirements:
- Python 3.8+
- OpenAI Gym 0.21.0
- PyElastica 0.2+
- Matplotlib (optional for display rendering and plotting)
Please use this bibtex to cite in your publications:
@misc{gym_softrobot,
author = {Chia-Hsien Shih, Seung Hyun Kim, Mattia Gazzola},
title = {Soft Robotics Environment for OpenAI Gym},
year = {2022},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/skim0119/gym-softrobot}},
}
Installation
pip install gym-softrobot
To test the installation, you can run couple steps of the environment as the following.
import gym
import gym_softrobot
env = gym.make('OctoFlat-v0', policy_mode='centralized')
# env is created, now we can use it:
for episode in range(2):
observation = env.reset()
for step in range(50):
action = env.action_space.sample()
observation, reward, done, info = env.step(action)
print(f"{episode=:2} |{step=:2}, {reward=}, {done=}")
if done:
break
Reinforcement Learning Example
We tested the environment using Stable Baselines3 for centralized control. More advanced algorithms are still under development.
If you have your own algorithm that you would like to test out, you are welcome to reach out to us.
Environment Design
Included Environments
Octopus[Multi-arm control]
OctoFlat-v0
[Pre-Alpha]OctoReach-v0
[Working in Process]OctoSwim-v0
[Working in Process]OctoHunt-v0
[Working in Process]
Snake
- 'ContinuumSnake-v0' [Pre-Alpha]
Simple Control
Contribution
We are currently developing the package internally.
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gym-softrobot-0.0.4.tar.gz
.
File metadata
- Download URL: gym-softrobot-0.0.4.tar.gz
- Upload date:
- Size: 59.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 235a23aa91c149e17781d4c9db87b375a3248e00af2fa3ef303d089b1edbff8e |
|
MD5 | 656de95085596591993db4d1299dd33b |
|
BLAKE2b-256 | eaa5ef7058b64900235aa2a54c4db038e76ab0bf09ab9ca3b1dd144d15d2d385 |
File details
Details for the file gym_softrobot-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: gym_softrobot-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 66.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a018feb504ff060fd1f31644d3e9a0e6dddd528a8923af861b7d1ce98656599e |
|
MD5 | 0258bd1533f2af420052e42ee3f6a2bc |
|
BLAKE2b-256 | 6eb3af291a8db776f3ffba3d8b059638e376bc4bdf5c58cc48cc29e899288c11 |