Skip to main content

Soft-robotics control environment package for OpenAI Gym

Project description

Soft-Robot Control Environment (gym-softrobot)

The environment is designed to leverage wide-range of 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 highly-deformable slender structure. We intend this package to be easy-to-install and fully compatible to OpenAI Gym and other available RL algorithms.

The package is under development, in Alpha phase. Detail roadmap for Q2-2022 will be available.

Installation

pip install gym-softrobot

To test the installation, we provide few debugging scripts. The environment can be tested using the following command.

python -m gym_softrobot.debug.make     # Make environment and run 10 steps
python -m gym_softrobot.debug.registry # Print gym-softrobot environment

Requirements:

  • Python 3.8+
  • OpenAI Gym 0.21.0
  • PyElastica 0.2+
  • Matplotlib (optional for display rendering and plotting)
  • POVray (optional for 3D rendering)

Rendering

We support two different backends for the rendering: POVray and Matplotlib. The default is set to use POVray, but the configuration can be switched by adding following lines.

from gym_softrobot.config import RendererType
gym_softrobot.RENDERER_CONFIG = RendererType.MATPLOTLIB  # Default: POVRAY

POVray

To make a good-looking 3D videos and figures, we use POVray python wrapper Vapory. POVray is not a requirement to run the environment, but it is necessary to use env.render() function as typical gym environment.

If you would like to test POVray with gym-softrobot, use

python -m gym_softrobot.debug.render  # Render 10 frames using vapory

Matplotlib

We provide secondary rendering tool using Matplotlib for a quick debugging and sanity checking.

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 with our environment, you are welcome to reach out to us.

Citation

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}},
}

Environment Documentation

The description of each environment is available in documentation.

Contribution

We are currently developing the package internally. We plan to deploy the package to open-development in Q2-2022.

Author

GitHub Contributors Image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gym-softrobot-0.1.2.tar.gz (72.4 kB view details)

Uploaded Source

Built Distribution

gym_softrobot-0.1.2-py2.py3-none-any.whl (111.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file gym-softrobot-0.1.2.tar.gz.

File metadata

  • Download URL: gym-softrobot-0.1.2.tar.gz
  • Upload date:
  • Size: 72.4 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

Hashes for gym-softrobot-0.1.2.tar.gz
Algorithm Hash digest
SHA256 adfbedf3d6662fc8e48c00eac522532a8986e57f984ef2825735b83d88b50ebb
MD5 5c67b886e32a7ddc9899887866d67cea
BLAKE2b-256 2c2d908fc802dca180e6634ff5f8c5a97267fd02c15dea69f1e2dadb07014754

See more details on using hashes here.

File details

Details for the file gym_softrobot-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: gym_softrobot-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 111.9 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

Hashes for gym_softrobot-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4c3c88804a3b87f0d7244b62cd044605c42354a5d168b74e72475533fe5f2b7d
MD5 1eddb34b4ce8f18627ef08a4d22c8e71
BLAKE2b-256 1b91396a8201b0c392816c13fb45ce238efb1a7fafbe127be60794249b04c0cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page