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

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.0.4.tar.gz (59.3 kB view details)

Uploaded Source

Built Distribution

gym_softrobot-0.0.4-py2.py3-none-any.whl (66.7 kB view details)

Uploaded Python 2 Python 3

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

Hashes for gym-softrobot-0.0.4.tar.gz
Algorithm Hash digest
SHA256 235a23aa91c149e17781d4c9db87b375a3248e00af2fa3ef303d089b1edbff8e
MD5 656de95085596591993db4d1299dd33b
BLAKE2b-256 eaa5ef7058b64900235aa2a54c4db038e76ab0bf09ab9ca3b1dd144d15d2d385

See more details on using hashes here.

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

Hashes for gym_softrobot-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a018feb504ff060fd1f31644d3e9a0e6dddd528a8923af861b7d1ce98656599e
MD5 0258bd1533f2af420052e42ee3f6a2bc
BLAKE2b-256 6eb3af291a8db776f3ffba3d8b059638e376bc4bdf5c58cc48cc29e899288c11

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