Skip to content

Code for "DittoGym: Learning to Control Soft Shape-Shifting Robots" by Suning Huang, Boyuan Chen, Huazhe Xu, and Vincent Sitzmann.

Notifications You must be signed in to change notification settings

suninghuang19/dittogym

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DittoGym

Suning Huang1, Boyuan Chen2, Huazhe Xu1, Vincent Sitzmann2
1Tsinghua 2MIT

M

This repo is the official environment implementation of DittoGym: Learning to Control Soft Shape-Shifting Robots. We set up a comprehensive benchmark including 8 different tasks for facilitating the research on novel highly reconfigurable robot. You can also check the implementation of the policy CFP in here.

If you find this work helpful to your research, please cite us as:

  @misc{huang2024dittogym,
    title={DittoGym: Learning to Control Soft Shape-Shifting Robots}, 
    author={Suning Huang and Boyuan Chen and Huazhe Xu and Vincent Sitzmann},
    year={2024},
    eprint={2401.13231},
    archivePrefix={arXiv},
    primaryClass={cs.RO}
}

For questions about code, please create an issue on github. For questions about paper, please reach me at hsn19@mails.tsinghua.edu.cn


To create environment, simply run the following command:

pip install git+https://github.com/suninghuang19/dittogym.git

You can run the following command to check if successfully installed:

python test_env.py

If you want to set up a gym environment, just run:

import gym
import taichi as ti
import dittogym

ti.init(arch=ti.gpu)
# init coarse env
env = gym.make("shapematch-coarse-v0")
# init fine env
env = gym.make("shapematch-fine-v0")

Benchmark Introduction

Videos can be found at here.

  • SHAPE MATCH: The robot is initialized as a circle in a zero-gravity environment. It has to alter its shape to mirror predefined geometric or alphabetical form. The score is calculated on the basis of the congruence between the robot's current shape and the target shape.
  • RUN: The robot is initialized on a plain and the task requires a robot to move forward to the greatest possible distance within a stipulated period. The score is governed by the distance traversed and the speed maintained.
  • KICK: The robot is initialized as a circle and is designed to kick a square target to the maximum possible distance. Ground friction prevents simple pushing, therefore the robot is required to use a flipping and rolling technique.
  • DIG: The robot is initially in the shape of a circle placed on the top of a soil-filled container, aiming to reach a target located at the bottom-right corner.
  • GROW: The robot is initialized as a square on the ground and is required to extend its superior segment to reach a target represented by a purple dot. Multiple obstacles hinder the direct route to the target. The reward function measures the distance between the target point and the robot.
  • OBSTACLE: The robot, in the shape of a square, faces an obstacle in its path while the task is to move forward. The score is based solely on how far the obstacle is bypassed.
  • CATCH: The circular robot, placed outside a cube, is tasked with manipulating a small square target within the cube to a specific point. The score is computed considering the distance between the robot and the cube, as well as the cube and the final point.
  • SLOT: The circular robot, initially outside a box with only a narrow slot to get inside, must squeeze its body through the slot and manipulate a cap target on top of the box. The reward function measures the distance between the robot and the cap, and whether the cap was successfully removed from the box.

DittoGym ENV Parameters:

Env Name Observation Resolution Coarse Action Resolution (env-coarse-v0) Fine Action Resolution (env-fine-v0) Upsample Action Signal to Fit Final Action Field
shapematch (64, 64, 3) (32, 32, 2) (64, 64, 2) (64, 64, 2)
run (64, 64, 3) (8, 8, 2) (16, 16, 2) (64, 64, 2)
kick (64, 64, 3) (8, 8, 2) (16, 16, 2) (64, 64, 2)
dig (64, 64, 3) (8, 8, 2) (16, 16, 2) (32, 32, 2)
grow (64, 64, 3) (8, 8, 2) (16, 16, 2) (64, 64, 2)
obstacle (64, 64, 3) (8, 8, 2) (16, 16, 2) (64, 64, 2)
catch (64, 64, 3) (8, 8, 2) (16, 16, 2) (64, 64, 2)
slot (64, 64, 3) (8, 8, 2) (16, 16, 2) (64, 64, 2)

About

Code for "DittoGym: Learning to Control Soft Shape-Shifting Robots" by Suning Huang, Boyuan Chen, Huazhe Xu, and Vincent Sitzmann.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages