Skip to content

Commit 3d2f43c

Browse files
committed
first commit
0 parents  commit 3d2f43c

File tree

2,092 files changed

+4881033
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,092 files changed

+4881033
-0
lines changed

.gitignore

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
.vscode/
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
pip-wheel-metadata/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
.python-version
88+
89+
# pipenv
90+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
92+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
93+
# install all needed dependencies.
94+
#Pipfile.lock
95+
96+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
97+
__pypackages__/
98+
99+
# Celery stuff
100+
celerybeat-schedule
101+
celerybeat.pid
102+
103+
# SageMath parsed files
104+
*.sage.py
105+
106+
# Environments
107+
.env
108+
.venv
109+
venv/
110+
ENV/
111+
env.bak/
112+
venv.bak/
113+
114+
# Spyder project settings
115+
.spyderproject
116+
.spyproject
117+
118+
# Rope project settings
119+
.ropeproject
120+
121+
# mkdocs documentation
122+
/site
123+
124+
# mypy
125+
.mypy_cache/
126+
.dmypy.json
127+
dmypy.json
128+
129+
# Pyre type checker
130+
.pyre/

.pre-commit-config.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
minimum_pre_commit_version: 2.20.0
2+
default_stages: [commit, push]
3+
exclude: "^$"
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.4.0
7+
hooks:
8+
- id: check-case-conflict
9+
- id: check-executables-have-shebangs
10+
- id: check-merge-conflict
11+
- id: check-shebang-scripts-are-executable
12+
- id: check-symlinks
13+
- id: check-yaml
14+
- id: debug-statements
15+
- id: destroyed-symlinks
16+
- id: end-of-file-fixer
17+
files: \.(py|sh|rst|yml|yaml)$
18+
- id: mixed-line-ending
19+
- id: trailing-whitespace
20+
files: \.(py|sh|rst|yml|yaml)$
21+
- repo: https://github.com/psf/black
22+
rev: 23.7.0
23+
hooks:
24+
- id: black
25+
- repo: https://github.com/PyCQA/flake8
26+
rev: 6.0.0
27+
hooks:
28+
- id: flake8
29+
args:
30+
- --config=setup.cfg
31+
- --ignore=E203,E266,E501,W503,F403,F401,B905
32+
additional_dependencies:
33+
[
34+
"flake8-blind-except",
35+
"flake8-docstrings",
36+
"flake8-bugbear",
37+
"flake8-comprehensions",
38+
"flake8-docstrings",
39+
"flake8-implicit-str-concat",
40+
"pydocstyle>=5.0.0",
41+
]
42+
exclude: ^scalingup/(prompts|policy/prompts|task_generator/prompts)/|build/|scripts/|scalingup/algo/robomimic_nets|scalingup/algo/tsdf
43+
- repo: https://github.com/pre-commit/mirrors-mypy
44+
rev: "v1.4.1"
45+
hooks:
46+
- id: mypy
47+
args:
48+
- --check-untyped-defs
49+
additional_dependencies:
50+
- "pydantic"
51+
exclude: ^scalingup/(prompts)/|tests/|build
52+
- repo: https://github.com/codespell-project/codespell
53+
rev: v2.2.5
54+
hooks:
55+
- id: codespell
56+
args:
57+
- -L caler
58+
- --write
59+
exclude: scripts/visualizations/rollout|presentation/js|presentation/plugin|presentation/package-lock.json|.svg|presentation/index.html|scalingup/algo/tsdf.py

README.md

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<h1> Scaling Up and Distilling Down: Language-Guided Robot Skill Acquisition</h1>
2+
<div style="text-align: center;">
3+
4+
[Huy Ha](https://www.cs.columbia.edu/~huy/)$^1$, [Pete Florence](https://www.peteflorence.com/)$^2$, [Shuran Song](https://shurans.github.io/)$^1$
5+
6+
$^1$ Columbia University, $^2$ Google DeepMind
7+
8+
[Project Page](https://www.cs.columbia.edu/~huy/scalingup) | [Arxiv](https://arxiv.org/abs/2307.14535) | [Video](https://www.cs.columbia.edu/~huy/scalingup/static/videos/scalingup.mp4)
9+
10+
<div style="margin:50px; text-align: justify;">
11+
<img style="width:100%;" src="docs/assets/teaser.gif">
12+
13+
Scaling Up and Distilling Down is a framework for language-guided skill learning.
14+
Give it a task description, and it will automatically generate rich, diverse robot trajectories, complete with success label and dense language labels.
15+
16+
<b>The best part?</b> It uses no expert demonstrations, manual
17+
reward supervision, and no manual language annotation.
18+
19+
</div>
20+
</div>
21+
22+
<br>
23+
24+
This repository contains code for language-guided data generation and language-conditioned diffusion policy training for [Scaling Up And Distilling Down](https://www.cs.columbia.edu/~huy/scalingup).
25+
It has been tested on Ubuntu 18.04, 20.04 and 22.04, NVIDIA GTX 1080, NVIDIA RTX A6000, NVIDIA GeForce RTX 3080, and NVIDIA GeForce RTX 3090.
26+
27+
If you find this codebase useful, consider citing:
28+
29+
```bibtex
30+
@inproceedings{ha2023scalingup,
31+
title={Scaling Up and Distilling Down: Language-Guided Robot Skill Acquisition},
32+
author={Huy Ha and Pete Florence and Shuran Song},
33+
year={2023},
34+
eprint={2307.14535},
35+
archivePrefix={arXiv},
36+
primaryClass={cs.RO}
37+
}
38+
```
39+
40+
If you have any questions, please contact [me](https://www.cs.columbia.edu/~huy/) at `huy [at] cs [dot] columbia [dot] edu`.
41+
42+
**Table of Contents**
43+
44+
- ⚙️[Setup](docs/setup.md)
45+
- 🚶[Codebase Walkthrough](docs/walkthrough.md)
46+
- [💡 Core Concepts](docs/walkthrough.md#-core-concepts)
47+
- [🪺 Nested Trajectories using Hierachical Actions and Policies](docs/walkthrough.md#-nested-trajectories-using-hierachical-actions-and-policies)
48+
- [🌳 Exploration Task Tree](docs/walkthrough.md#exploration-task-tree)
49+
- [🌈 Seeded Variation](docs/walkthrough.md#🌈-seeded-variation)
50+
- [🎛️ Control](docs/walkthrough.md#control)
51+
- [🏃‍♂️ Motion Planning](docs/walkthrough.md#️-motion-planning)
52+
- [🗣️ Language Model Queries](docs/walkthrough.md#language-model-queries)
53+
- [💿 Cache](docs/walkthrough.md#-cache)
54+
- [🔗 Linking LLM Modules Together](docs/walkthrough.md#-linking-llm-modules-together)
55+
- [🪙 Coin flips](docs/walkthrough.md#-coin-flips)
56+
- 🔬 [Reproducing](docs/reproduce.md)
57+
- 📊 [Evaluation](docs/reproduce.md#evaluation)
58+
- 🗄️ [Data Generation](docs/reproduce.md#data-generation-for-training)
59+
- 🧠 [Training](docs/reproduce.md#training)
60+
- 🔭 [Extending](docs/extend.md)
61+
- [I want to add more](docs/extend.md#i-want-to-add-more)
62+
- 🤖 [Robots](docs/extend.md#robots-)
63+
- 🪑 [Assets](docs/extend.md#assets-)
64+
- 📜 [Tools \& Scripts](docs/extend.md#tools--scripts-)
65+
- 🌏 [Environments \& Tasks](docs/extend.md#environments--tasks-)
66+
- [New Simulators](docs/extend.md#new-simulators)
67+
- [New Tasks](docs/extend.md#new-tasks)
68+
- 🦙 [Language Models](docs/extend.md#language-models-)
69+
- 🖼️ [Figure Utilities](docs/extend.md#figure-utilities-️)
70+
- [Efficiency Plot](docs/extend.md#efficiency-plot)
71+
- [Visualizing Language-conditioned Outputs](docs/extend.md#visualizing-language-conditioned-outputs)
72+
-[Development Tips](docs/extend.md#development-tips-)
73+
- 🐉 [Hydra](docs/extend.md#hydra-)
74+
- 📷 [Headless Rendering](docs/extend.md#headless-rendering-)
75+
- 🖧 [Multi-processing](docs/extend.md#multi-processing-)
76+
- 👩‍👦‍👶 [Typing](docs/extend.md#typing-)
77+
- ⏱️ [Profiling](docs/extend.md#profiling-️)
78+
- 💽 [Data Format](docs/extend.md#data-format-)
79+
- 💾 [RAM Usage](docs/extend.md#ram-usage-)
80+
- 💀 [Known Issues](docs/extend.md#known-issues-)
81+
-[Training Tips](docs/extend.md#training-tips-)
82+
- [Mixed-Precision](docs/extend.md#mixed-precision)
83+
- 📽️ [Visualizations](docs/visualization.md)
84+
85+
# Acknowledgements
86+
87+
88+
We would like to thank Cheng Chi, Zeyi Liu, Samir Yitzhak Gadre, Mengda Xu, Zhenjia Xu, Mandi Zhao and Dominik Bauer for their helpful feedback and fruitful discussions.
89+
90+
91+
This work was supported in part by Google Research Award, NSF Award #2143601, and #2132519.
92+
We would like to thank Google for the UR5 robot hardware.
93+
The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of the sponsors.
94+
95+
## Code
96+
97+
- [Diffusion Policy](https://diffusion-policy.cs.columbia.edu/): The policy was built on top of their [Colab](https://colab.research.google.com/drive/18GIHeOQ5DyjMN8iIRZL2EKZ0745NLIpg?usp=sharing), and our real-world evaluation code was modified from [theirs](https://github.com/columbia-ai-robotics/diffusion_policy#-demo-training-and-eval-on-a-real-robot)
98+
- [Mujoco Menagerie](https://github.com/deepmind/mujoco_menagerie): UR5 and RealSense models were modified from their models.
99+
- [Mujoco Scanned Objects](https://github.com/kevinzakka/mujoco_scanned_objects): Big shout out to [Kevin Zakka](https://kzakka.com/) for all his amazing open-source work, go give him a few stars ⭐
100+
- [3D UNet Implementation](https://github.com/wolny/pytorch-3dunet/) modified from [Adrian Wolny](https://adrianwolny.com/)'s implementation.
101+
102+
103+
## Coming Soon
104+
105+
- **Data + Checkpoint Downloads**: For now, you can still run data generation and training!

docs/assets/blender_geonode.png

168 KB
Loading

docs/assets/blender_shader.png

101 KB
Loading

docs/assets/blender_spreadsheet.png

111 KB
Loading
1.35 MB
Loading

docs/assets/drawer-scalingup.gif

4.54 MB
Loading
28.3 KB
Loading

docs/assets/mailbox.gif

6.85 MB
Loading

docs/assets/open_loop_grasp_block.gif

411 KB
Loading
62.1 KB
Loading
20.2 KB
Loading
48.7 KB
Loading
Loading

docs/assets/teaser.gif

11.8 MB
Loading

0 commit comments

Comments
 (0)