Gymnasium environments for soft-robot control, powered by PyElastica. The package includes bio-inspired soft-slender-robot simulations.
gym-softrobot requires Python 3.12 or newer.
pip install gym-softrobotimport gymnasium as gym
import gym_softrobot # Registers the environments.
env = gym.make("SoftPendulum-v0")
observation, info = env.reset(seed=42)
terminated = truncated = False
while not (terminated or truncated):
action = env.action_space.sample()
observation, reward, terminated, truncated, info = env.step(action)
env.close()List the registered environments:
python -m gym_softrobot.debug.registrySee the documentation for environment IDs, API conventions, and rendering notes.
uv sync --all-groups
uv run pre-commit install@misc{gym_softrobot,
author = {Chia-Hsien Shih and Seung Hyun Kim and Mattia Gazzola},
title = {Soft Robotics Environment for Gymnasium},
year = {2026},
publisher = {GitHub},
howpublished = {\url{https://github.com/skim0119/gym-softrobot}}
}