Giter Club home page Giter Club logo

vcd's Introduction

Learning Visible Connectivity Dynamics for Cloth Smoothing

Xingyu Lin*, Yufei Wang*, Zixuan Huang, David Held, CoRL 2021. * indicates equal contribution (order by dice rolling).

Website / ArXiv

Table of Contents


Simulation

Setup

This repository is a subset of SoftAgent cleaned up for VCD. Environment setup for VCD is similar to that of softagent.

  1. Install SoftGym. Then, copy softgym as a submodule in this directory by running cp -r [path to softgym] ./. Use the updated softgym on the vcd branch by cd softgym && git checkout vcd
  2. You should have a conda environment named softgym. Install additional packages required by VCD, by conda env update --file environment.yml
  3. Generate initial environment configurations and cache them, by running python VCD/generate_cached_initial_state.py.
  4. Run ./compile_1.0.sh && . ./prepare_1.0.sh to compile PyFleX and prepare other paths.

Train VCD

  • Generate the dataset for training by running

    python VCD/main.py --gen_data=1 --dataf=./data/vcd
    

    Please refer to main.py for argument options.

  • Train the dynamics model by running

    python VCD/main.py --gen_data=0 --dataf=./data/vcd_dyn
    
  • Train the EdgeGNN model by running

    python VCD/main_train_edge.py --gen_data=0 --dataf=./data/vcd_edge
    

Planning with VCD

python VCD/main_plan.py --edge_model_path={path_to_trained_edge_model}\
                        --partial_dyn_path={path_to_trained_dynamics_model}

An example for loading the model trained for 120 epochs:

python VCD/main_plan.py --edge_model_path ./data/vcd_edge/vsbl_edge_120.pth\
                        --partial_dyn_path ./data/vcd_dyn/vsbl_dyn_120.pth

Graph Imitation Learning

  1. Train dynamics using the full mesh
python VCD/main.py --gen_data=0 --dataf=./data/vcd --train_mode=full
  1. Train dynamics using partial point cloud and imitate the teacher model
python VCD/main.py --gen_data=0 --dataf=./data/vcd --train_mode=graph_imit --full_dyn_path={path_to_teacher_model}

Pretrained Model

Please refer to this page for downloading the pretrained models.

Demo

  • Dynamics rollout
  • Planning on square cloth

Cite

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

@inproceedings{lin2022learning,
  title={Learning visible connectivity dynamics for cloth smoothing},
  author={Lin, Xingyu and Wang, Yufei and Huang, Zixuan and Held, David},
  booktitle={Conference on Robot Learning},
  pages={256--266},
  year={2022},
  organization={PMLR}
}

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

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.