GithubHelp home page GithubHelp logo

stanfordvl / robovat Goto Github PK

View Code? Open in Web Editor NEW
67.0 17.0 16.0 2.13 MB

RoboVat: A unified toolkit for simulated and real-world robotic task environments.

License: MIT License

Python 100.00%
robotics deep-learning deep-reinforcement-learning physics-simulation

robovat's Introduction

RoboVat

About
Installation
Examples
Citation

About

RoboVat is a tookit for fast development of robotic task environments in simulation and the real world. It provides unified APIs for robot control and perception to bridge the reality gap. Its name is derived from brain in a vat.

Currently, RoboVat supports Sawyer robot via Intera SDK. The simulatied environments run with PyBullet. The codebase is under active development and more environments will be included in the future.

Installation

  1. Create a virtual environment (recommended)

    Create a new virtual environment in the root directory or anywhere else:

    virtualenv --system-site-packages -p python .venv

    Activate the virtual environment every time before you use the package:

    source .venv/bin/activate

    And exit the virtual environment when you are done:

    deactivate
  2. Install the package

    Using pip to install the package:

    pip install robovat

    The package can also be installed by running:

    python setup.py install
  3. Download assets

    Download and unzip the assets folder from Box or the FTP link below to the root directory:

    wget ftp://cs.stanford.edu/cs/cvgl/robovat/assets.zip
    wget ftp://cs.stanford.edu/cs/cvgl/robovat/configs.zip
    unzip assets.zip
    unzip configs.zip

    If the assets folder is not in the root directory, remember to specify the argument --assets PATH_TO_ASSETS when executing the example scripts.

Examples

Command Line Interface

A command line interface (CLI) is provided for debugging purposes. We recommend running the CLI to test the simulation environment after installation and data downloading:

python tools/sawyer_cli.py --mode sim

Detailed usage of the CLI are explained in the source code of tools/sawyer_cli.py. The simulated and real-world Sawyer robot can be test using these instructions below in the terminal:

  • Visualize the camera images: v
  • Mouse click and reach: c
  • Reset the robot: r
  • Close and open the gripper: g and o

Planar Pushing

Execute a planar pushing tasks with a heuristic policy:

python tools/run_env.py --env PushEnv --policy HeuristicPushPolicy --debug 1

To execute semantic pushing tasks, we can add bindings to the configurations:

python tools/run_env.py --env PushEnv --policy HeuristicPushPolicy --env_config configs/envs/push_env.yaml --policy_config configs/policies/heuristic_push_policy.yaml --config_bindings "{'TASK_NAME':'crossing','LAYOUT_ID':0}" --debug 1

To execute the tasks with pretrained CAVIN planner, please see this codebase.

Process Objects for Simulation

Many simulators load bodies in the URDF format. Given an OBJ file, the corresponding URDF file can be generated by running:

python tools/convert_obj_to_urdf.py --input PATH_TO_OBJ --output OUTPUT_DIR

To simulate concave bodies, the OBJ file needs to be processed by convex decomposition. The URDF file of a concave body can be generated using V-HACD for convex decomposition by running:

python tools/convert_obj_to_urdf.py --input PATH_TO_OBJ --output OUTPUT_DIR --decompose 1

Citation

If you find this code useful for your research, please cite:

@article{fang2019cavin, 
    title={Dynamics Learning with Cascaded Variational Inference for Multi-Step Manipulation},
    author={Kuan Fang and Yuke Zhu and Animesh Garg and Silvio Savarese and Li Fei-Fei}, 
    journal={Conference on Robot Learning (CoRL)}, 
    year={2019} 
}

robovat's People

Contributors

dependabot[bot] avatar kuanfang avatar leobxpan avatar piraka9011 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robovat's Issues

Has anyone successfully run the demo in macOS?

Hi, I download the code and install with pip. When running the demo python tools/sawyer_cli.py --mode sim, I meet the following error:
If I enter v or c:

python[21276:85838] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fb8e5a126c0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fb8e5a126c0'

Then terminating with uncaught exception of type NSException.

It seems this NSInvalidArgumentException is related to macOS interfaces... Has anyone successfully run the demo in macOS? Did you meet the same problem? Or the code is only runnable in Linux?

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.