Git Product home page Git Product logo

boey-li / softgym Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xingyu-lin/softgym

0.0 0.0 0.0 65.87 MB

SoftGym is a set of benchmark environments for deformable object manipulation.

License: BSD 3-Clause "New" or "Revised" License

Shell 0.01% C++ 75.30% Python 5.44% C 9.88% Objective-C 0.19% Cuda 0.14% Makefile 3.19% HTML 3.44% CMake 0.05% Batchfile 0.01% HLSL 2.34% Dockerfile 0.02%

softgym's Introduction

SoftGym

SoftGym is a set of benchmark environments for deformable object manipulation including tasks involving fluid, cloth and rope. It is built on top of the Nvidia FleX simulator and has standard Gym API for interaction with RL agents. A number of RL algorithms benchmarked on SoftGym can be found in SoftAgent

Latest updates

  • [12/06/2021] Support depth rendering. Example:python examples/random_env.py --test_depth 1 to visualize the depth image.

Using Docker

If you are using Ubuntu 16.04 LTS and CUDA 9.2, you can follow the steps in the next section on this page for compilation. For other versions of Ubuntu or CUDA, we provide the pre-built Docker image and Dockerfile for running SoftGym. Please refer to our Docker page.

Instructions for Installation

  1. This codebase is tested with Ubuntu 16.04 LTS, CUDA 9.2 and Nvidia driver version 440.64. Other versions might work but are not guaranteed, especially with a different driver version. Please use our docker for other versions.

The following command will install some necessary dependencies.

sudo apt-get install build-essential libgl1-mesa-dev freeglut3-dev libglfw3 libgles2-mesa-dev
  1. Create conda environment Create a conda environment and activate it: conda env create -f environment.yml

  2. Compile PyFleX: Go to the root folder of softgym and run . ./prepare_1.0.sh. After that, compile PyFleX with CMake & Pybind11 by running . ./compile_1.0.sh Please see the example test scripts and the bottom of bindings/pyflex.cpp for available APIs.

SoftGym Environments

Image Name Description
Gif DropCloth Lay a piece of cloth in the air flat on the floor
Gif FoldCloth Fold a piece of flattened cloth in half
Gif SpreadCloth Spread a crumpled cloth on the floor
Gif PourWater Pour a cup of water into a target cup
Gif TransportWater Move a cup of water to a target position as fast as possible without spilling out the water
Gif StraightenRope Straighten a rope starting from a random configuration
Gif PourWaterAmount This task is similar to PourWater but requires a specific amount of water poured into the target cup. The required water level is indicated by a red line.
Gif FoldCrumpledCloth This task is similar to FoldCloth but the cloth is initially crumpled
Gif DropFoldCloth This task has the same initial state as DropCloth but requires the agent to fold the cloth instead of just laying it on the ground
Gif RopeConfiguration This task is similar to StraightenCloth but the agent needs to manipulate the rope into a specific configuration from different starting locations.

To have a quick view of different tasks listed in the paper (with random actions), run the following commands: For SoftGym-Medium:

  • TransportWater: python examples/random_env.py --env_name PassWater
  • PourWater: python examples/random_env.py --env_name PourWater
  • StraightenRope: python examples/random_env.py --env_name RopeFlatten
  • SpreadCloth: python examples/random_env.py --env_name ClothFlatten
  • FoldCloth: python examples/random_env.py --env_name ClothFold
  • DropCloth: python examples/random_env.py --env_name ClothDrop

For SoftGym-Hard:

  • PourWaterAmount: python examples/random_env.py --env_name PourWaterAmount
  • FoldCrumpledCloth: python examples/random_env.py --env_name ClothFoldCrumpled
  • DropFoldCloth: python examples/random_env.py --env_name ClothFoldDrop
  • RopeConfiguration: First download the rope configuration file using this link then run python examples/random_env.py --env_name RopeConfiguration

Turn on the --headless option if you are running on a cluster machine that does not have a display environment. Otherwise you will get segmentation issues. Please refer to softgym/registered_env.py for the default parameters and source code files for each of these environments.

Cite

If you find this codebase useful in your research, please consider citing:

@inproceedings{corl2020softgym,
 title={SoftGym: Benchmarking Deep Reinforcement Learning for Deformable Object Manipulation},
 author={Lin, Xingyu and Wang, Yufei and Olkin, Jake and Held, David},
 booktitle={Conference on Robot Learning},
 year={2020}
}

References

softgym's People

Contributors

xingyu-lin avatar yufeiwang63 avatar davheld avatar gtegner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.