Giter VIP home page Giter VIP logo

robocraft's Introduction

RoboCraft: Learning to See, Simulate, and Shape Elasto-Plastic Object with Graph Networks

Important

  1. Please check out our new paper if interested: RoboCook: Long-Horizon Elasto-Plastic Object Manipulation with Diverse Tools
  2. Please see the dev branch for an improved version of the RoboCraft codebase, especially if you're interested in real-world experiments!

Citation

If you use the codebase in your research, please cite:

@article{shi2022robocraft,
  title={RoboCraft: Learning to See, Simulate, and Shape Elasto-Plastic Objects with Graph Networks},
  author={Shi, Haochen and Xu, Huazhe and Huang, Zhiao and Li, Yunzhu and Wu, Jiajun},
  journal={arXiv preprint arXiv:2205.02909},
  year={2022}
}

Overview

This is the codebase of RoboCraft in the simulator.

Project Page | Paper

Prerequisites

  • Linux or macOS (Tested on Ubuntu 20.04)
  • Python 3
  • CPU or NVIDIA GPU + CUDA CuDNN
  • Conda

Getting Started

Setup

# clone the repo
git clone https://github.com/hshi74/RoboCraft.git
cd RoboCraft

# create the conda environment
conda env create -f robocraft.yml
conda activate robocraft

# install requirements for the simulator
cd simulator
pip install -e .

Generate Data

  • Run all the blocks in simulator/plb/algorithms/test_tasks.ipynb. Note that it is easier to use ipython notebook when dealing with Taichi env for fast materialization.
  • You can control the number of videos to generate by changing the variable n_vid. The default is 5 for the purpose of debugging. We used 50 in the paper.

Sample Particles

  • cd simulator/plb/algorithms
  • Go to line 598 in sample_data.py and replace the string with the output folder name you just generated in simulator/dataset
  • Run python sample_data.py. Note that this step may take a while.

Build the dataset for GNN

  • You will need to remove the old dataset if you want to update the dataset
cd ../../../robocraft
bash scripts/utils/move_data.sh ngrip_fixed sample_ngrip_fixed_[timestamp of the folder you just generated]

Train Dynamics Model

bash scripts/dynamics/train.sh

Planning with the Learned Model

  • Go to line 6 in robocraft/scripts/control/control.sh and change the model path to the path to the checkpoint you just trained.
  • bash scripts/control/control.sh

Code structure

  • The simulator folder contains the simulation environment we used for data collection and particle sampling.
  • The robocraft folder contains the code for learning the GNN and planning.

robocraft's People

Contributors

hshi74 avatar xuhuazhe 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.