https://github.com/google-research/ravens

Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet. Transporter Nets, CoRL 2020.

https://github.com/google-research/ravens

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary

Keywords

artificial-intelligence computer-vision deep-learning imitation-learning manipulation openai-gym pick-and-place pybullet rearrangement reinforcement-learning robotics tensorflow transporter-nets vision
Last synced: 4 months ago · JSON representation

Repository

Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet. Transporter Nets, CoRL 2020.

Basic Info
Statistics
  • Stars: 608
  • Watchers: 15
  • Forks: 103
  • Open Issues: 15
  • Releases: 0
Topics
artificial-intelligence computer-vision deep-learning imitation-learning manipulation openai-gym pick-and-place pybullet rearrangement reinforcement-learning robotics tensorflow transporter-nets vision
Created about 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Ravens - Transporter Networks

Ravens is a collection of simulated tasks in PyBullet for learning vision-based robotic manipulation, with emphasis on pick and place. It features a Gym-like API with 10 tabletop rearrangement tasks, each with (i) a scripted oracle that provides expert demonstrations (for imitation learning), and (ii) reward functions that provide partial credit (for reinforcement learning).


(a) block-insertion: pick up the L-shaped red block and place it into the L-shaped fixture.
(b) place-red-in-green: pick up the red blocks and place them into the green bowls amidst other objects.
(c) towers-of-hanoi: sequentially move disks from one tower to another—only smaller disks can be on top of larger ones.
(d) align-box-corner: pick up the randomly sized box and align one of its corners to the L-shaped marker on the tabletop.
(e) stack-block-pyramid: sequentially stack 6 blocks into a pyramid of 3-2-1 with rainbow colored ordering.
(f) palletizing-boxes: pick up homogeneous fixed-sized boxes and stack them in transposed layers on the pallet.
(g) assembling-kits: pick up different objects and arrange them on a board marked with corresponding silhouettes.
(h) packing-boxes: pick up randomly sized boxes and place them tightly into a container.
(i) manipulating-rope: rearrange a deformable rope such that it connects the two endpoints of a 3-sided square.
(j) sweeping-piles: push piles of small objects into a target goal zone marked on the tabletop.

Some tasks require generalizing to unseen objects (d,g,h), or multi-step sequencing with closed-loop feedback (c,e,f,h,i,j).

Team: this repository is developed and maintained by Andy Zeng, Pete Florence, Daniel Seita, Jonathan Tompson, and Ayzaan Wahid. This is the reference repository for the paper:

Transporter Networks: Rearranging the Visual World for Robotic Manipulation

Project Website  •  PDF  •  Conference on Robot Learning (CoRL) 2020

Andy Zeng, Pete Florence, Jonathan Tompson, Stefan Welker, Jonathan Chien, Maria Attarian, Travis Armstrong,
Ivan Krasin, Dan Duong, Vikas Sindhwani, Johnny Lee

Abstract. Robotic manipulation can be formulated as inducing a sequence of spatial displacements: where the space being moved can encompass an object, part of an object, or end effector. In this work, we propose the Transporter Network, a simple model architecture that rearranges deep features to infer spatial displacements from visual input—which can parameterize robot actions. It makes no assumptions of objectness (e.g. canonical poses, models, or keypoints), it exploits spatial symmetries, and is orders of magnitude more sample efficient than our benchmarked alternatives in learning vision-based manipulation tasks: from stacking a pyramid of blocks, to assembling kits with unseen objects; from manipulating deformable ropes, to pushing piles of small objects with closed-loop feedback. Our method can represent complex multi-modal policy distributions and generalizes to multi-step sequential tasks, as well as 6DoF pick-and-place. Experiments on 10 simulated tasks show that it learns faster and generalizes better than a variety of end-to-end baselines, including policies that use ground-truth object poses. We validate our methods with hardware in the real world.

Installation

Step 1. Recommended: install Miniconda with Python 3.7.

shell curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -b -u echo $'\nexport PATH=~/miniconda3/bin:"${PATH}"\n' >> ~/.profile # Add Conda to PATH. source ~/.profile conda init

Step 2. Create and activate Conda environment, then install GCC and Python packages.

shell cd ~/ravens conda create --name ravens python=3.7 -y conda activate ravens sudo apt-get update sudo apt-get -y install gcc libgl1-mesa-dev pip install -r requirements.txt python setup.py install --user

Step 3. Recommended: install GPU acceleration with NVIDIA CUDA 10.1 and cuDNN 7.6.5 for Tensorflow. shell ./oss_scripts/install_cuda.sh # For Ubuntu 16.04 and 18.04. conda install cudatoolkit==10.1.243 -y conda install cudnn==7.6.5 -y

Alternative: Pure pip

As an example for Ubuntu 18.04:

shell ./oss_scipts/install_cuda.sh # For Ubuntu 16.04 and 18.04. sudo apt install gcc libgl1-mesa-dev python3.8-venv python3.8 -m venv ./venv source ./venv/bin/activate pip install -U pip pip install scikit-build pip install -r ./requirements.txt export PYTHONPATH=${PWD}

Getting Started

Step 1. Generate training and testing data (saved locally). Note: remove --disp for headless mode.

shell python ravens/demos.py --assets_root=./ravens/environments/assets/ --disp=True --task=block-insertion --mode=train --n=10 python ravens/demos.py --assets_root=./ravens/environments/assets/ --disp=True --task=block-insertion --mode=test --n=100

To run with shared memory, open a separate terminal window and run python3 -m pybullet_utils.runServer. Then add --shared_memory flag to the command above.

Step 2. Train a model e.g., Transporter Networks model. Model checkpoints are saved to the checkpoints directory. Optional: you may exit training prematurely after 1000 iterations to skip to the next step.

shell python ravens/train.py --task=block-insertion --agent=transporter --n_demos=10

Step 3. Evaluate a Transporter Networks agent using the model trained for 1000 iterations. Results are saved locally into .pkl files.

shell python ravens/test.py --assets_root=./ravens/environments/assets/ --disp=True --task=block-insertion --agent=transporter --n_demos=10 --n_steps=1000

Step 4. Plot and print results.

shell python ravens/plot.py --disp=True --task=block-insertion --agent=transporter --n_demos=10

Optional. Track training and validation losses with Tensorboard.

shell python -m tensorboard.main --logdir=logs # Open the browser to where it tells you to.

Datasets and Pre-Trained Models

Download our generated train and test datasets and pre-trained models.

shell wget https://storage.googleapis.com/ravens-assets/checkpoints.zip wget https://storage.googleapis.com/ravens-assets/block-insertion.zip wget https://storage.googleapis.com/ravens-assets/place-red-in-green.zip wget https://storage.googleapis.com/ravens-assets/towers-of-hanoi.zip wget https://storage.googleapis.com/ravens-assets/align-box-corner.zip wget https://storage.googleapis.com/ravens-assets/stack-block-pyramid.zip wget https://storage.googleapis.com/ravens-assets/palletizing-boxes.zip wget https://storage.googleapis.com/ravens-assets/assembling-kits.zip wget https://storage.googleapis.com/ravens-assets/packing-boxes.zip wget https://storage.googleapis.com/ravens-assets/manipulating-rope.zip wget https://storage.googleapis.com/ravens-assets/sweeping-piles.zip

The MDP formulation for each task uses transitions with the following structure:

Observations: raw RGB-D images and camera parameters (pose and intrinsics).

Actions: a primitive function (to be called by the robot) and parameters.

Rewards: total sum of rewards for a successful episode should be =1.

Info: 6D poses, sizes, and colors of objects.

Owner

  • Name: Google Research
  • Login: google-research
  • Kind: organization
  • Location: Earth

GitHub Events

Total
  • Watch event: 50
  • Fork event: 10
Last Year
  • Watch event: 50
  • Fork event: 10

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 28
  • Total Committers: 7
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.643
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ayzaan Wahid a****n@g****m 10
Kevin k****a@g****m 9
Eric Cousineau e****u@t****l 4
Ravens Team r****m@g****m 2
Andy Zeng a****g@g****m 1
Maria Attarian j****n@g****m 1
Shih-Wei Guo t****o@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 21
  • Total pull requests: 13
  • Average time to close issues: 19 days
  • Average time to close pull requests: about 2 months
  • Total issue authors: 17
  • Total pull request authors: 5
  • Average comments per issue: 1.24
  • Average comments per pull request: 0.85
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Advaya24 (3)
  • Hollen0318 (2)
  • anjugopinath (2)
  • yuchen-ji (1)
  • MeetGandhiMagna (1)
  • siddk (1)
  • MandiZhao (1)
  • sarthakdas (1)
  • ZhouYFeng (1)
  • DanielTakeshi (1)
  • Codie-land (1)
  • leeivan1007 (1)
  • anmolsrivastava97 (1)
  • MohitShridhar (1)
  • ri-ceres (1)
Pull Request Authors
  • kevinzakka (5)
  • dependabot[bot] (4)
  • EricCousineau-TRI (3)
  • ayzaan (1)
  • tony2guo (1)
Top Labels
Issue Labels
Pull Request Labels
cla: yes (8) dependencies (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 50 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 1
  • Total maintainers: 1
pypi.org: ravens

Ravens is a collection of simulated tasks in PyBullet for learning vision-based robotic manipulation.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 50 Last month
  • Docker Downloads: 0
Rankings
Stargazers count: 2.9%
Docker downloads count: 4.3%
Forks count: 4.9%
Dependent packages count: 10.1%
Average: 12.9%
Dependent repos count: 21.6%
Downloads: 33.7%
Maintainers (1)
Last synced: 5 months ago

Dependencies

requirements.txt pypi
  • absl-py >=0.7.0
  • gym ==0.17.3
  • matplotlib >=3.1.1
  • meshcat >=0.0.18
  • numpy ==1.18.5
  • opencv-python >=4.1.2.30
  • pybullet >=3.0.4
  • scikit-image >=0.17.2
  • scipy ==1.4.1
  • tensorflow ==2.3.0
  • tensorflow-addons ==0.11.2
  • tensorflow_hub ==0.9.0
  • transforms3d ==0.3.1
setup.py pypi
  • absl-py >=0.7.0
  • gym >=0.17.3
  • matplotlib >=3.1.1
  • meshcat >=0.0.18
  • numpy >=1.18.5
  • opencv-python >=4.1.2.30
  • pybullet >=3.0.4
  • scikit-image >=0.17.2
  • scipy >=1.4.1
  • tensorflow >=2.3.0
  • tensorflow-addons >=0.11.2
  • tensorflow_hub >=0.9.0
  • transforms3d >=0.3.1