Giter VIP home page Giter VIP logo

robel's Introduction

ROBEL: Robotics Benchmarks for Learning

ROBEL is an open-source platform of cost-effective robots and associated reinforcement learning environments for benchmarking reinforcement learning in the real world. It provides Gym-compliant environments that easily run in both simulation (for rapid prototyping) and on real hardware. ROBEL robots are robust and scalable - they have facilitated over 14000 hours (as of Aug'19) of real-world training with various learning-based methods. Benchmarks using several learning-based methods are provided for ease of comparison and extensibility. Refer to ROBEL's webpage for full details.

Robot Platforms

ROBEL robots: D’Kitty (left) and D’Claw (middle and right)

ROBEL introduces two robots that are modular, extensible, easy to build, and are lower cost compared to many existing robotics research platforms:

  1. D'Claw is a nine degree of freedom manipulation platform capable of performing dexterous manipulation.
  2. D'Kitty is a twelve degree of freedom quadruped capable of agile locomotion.

Features

  1. Gym Compliant -- ROBEL environments are fully Gym-compliant and can be used with any reinforcement learning library that interfaces with Gym environments.
  2. Simulated backends -- ROBEL also includes simulated equivalents of the introduced benchmarks to facilitate prototyping and debugging needs. Simulation backend is provided by MuJoCo.
  3. Hardware interface -- ROBEL is built using Dynamixel motors and communicates with the hardware device through the DynamixelSDK.
  4. External tracking support -- For D'Kitty environments, external tracking is supported through OpenVR tracking.
  5. Open-source design -- The hardware design and build instructions are fully open-sourced and are available for anyone to build their own robots.

Getting started

1. Hardware assembly

Please refer to the Hardware Guide for getting started with the ROBEL hardware platforms.

2. Software installation

2.1 MuJoCo

Download MuJoCo Pro 2.00 from the MuJoCo website. You should extract this to ~/.mujoco/mujoco200. Ensure your MuJoCo license key is placed at ~/.mujoco/mjkey.txt.

Add the following line to your ~/.bashrc (or equivalent) in order for mujoco_py to install properly:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.mujoco/mujoco200/bin

Run source ~/.bashrc afterwards.

2.2 ROBEL

ROBEL requires Python 3.5 or higher. You can install ROBEL by running:

pip install robel

We recommend doing this in a virtualenv or a Conda environment to avoid interfering with system dependencies or existing packages.

Alternatively, you can install directly from the repository by running:

git clone --recurse-submodules https://github.com/google-research/robel.git
pip install -e robel/

To run on hardware, additionally install the DynamixelSDK Python API:

pip install git+https://github.com/ROBOTIS-GIT/DynamixelSDK.git#subdirectory=python

2.3 Example Usage

import robel
import gym

# Create a simulation environment for the D'Claw turn task.
env = gym.make('DClawTurnFixed-v0')

# Create a hardware environment for the D'Claw turn task.
# `device_path` refers to the device port of the Dynamixel USB device.
# e.g. '/dev/ttyUSB0' for Linux, '/dev/tty.usbserial-*' for Mac OS.
env = gym.make('DClawTurnFixed-v0', device_path='/dev/ttyUSB0')

# Reset the environent and perform a random action.
env.reset()
env.step(env.action_space.sample())

Not specifying the device_path i.e. env = gym.make('DClawTurnFixed-v0') creates the simulated equivalent of the above hardware environment. The simulated and hardware environments have the same interface.

To interactively render a simulation environment, run:

python -m robel.scripts.rollout -e DClawTurnFixed-v0 --render
# Also try this with other tasks such as DKittyWalkFixed-v0

Benchmark Tasks

D'Claw

Task Description
Pose Match a set of joint positions.
Turn Turn an object to a specified angle.
Screw Continuously rotate an object.

D'Kitty

Task Description
Stand Stand upright.
Orient Align heading with a target.
Walk Walk to a target location.

Contributing

We designed ROBEL to be an easily extensible platform for new robots, tasks, and benchmarks. See CONTRIBUTING.md for a guide on how to contribute.

Citation

@misc{ahn2019robel,
    title={ROBEL: Robotics Benchmarks for Learning with Low-Cost Robots},
    author={Michael Ahn and Henry Zhu and Kristian Hartikainen and Hugo Ponte and Abhishek Gupta and Sergey Levine and Vikash Kumar},
    year={2019},
    eprint={1909.11639},
    archivePrefix={arXiv},
    primaryClass={cs.RO}
}

Disclaimer

This is not an official Google product.

robel's People

Contributors

michael-ahn 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  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

robel's Issues

Exception: Failed to load XML file

After following the README and installing robel, running the example script, I got this error:

erwincoumans-macbookpro2:robel erwincoumans$ source ~/.bash_profile
erwincoumans-macbookpro2:robel erwincoumans$ python3 -m robel.scripts.rollout -e DClawTurnFixed-v0 --render
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/erwincoumans/develop/robel/robel/scripts/rollout.py", line 254, in <module>
    rollout_script()
  File "/Users/erwincoumans/develop/robel/robel/scripts/rollout.py", line 198, in rollout_script
    env = gym.make(env_id)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/gym/envs/registration.py", line 156, in make
    return registry.make(id, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/gym/envs/registration.py", line 101, in make
    env = spec.make(**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/gym/envs/registration.py", line 73, in make
    env = cls(**_kwargs)
  File "/Users/erwincoumans/develop/robel/robel/utils/configurable.py", line 102, in __init__
    base_init(self, *args, **kwargs)
  File "/Users/erwincoumans/develop/robel/robel/dclaw/turn.py", line 71, in __init__
    **kwargs)
  File "/Users/erwincoumans/develop/robel/robel/dclaw/base_env.py", line 174, in __init__
    super().__init__(*args, **kwargs)
  File "/Users/erwincoumans/develop/robel/robel/dclaw/base_env.py", line 75, in __init__
    super().__init__(*args, **kwargs)
  File "/Users/erwincoumans/develop/robel/robel/robot_env.py", line 103, in __init__
    sim_model, backend=sim_backend, frame_skip=frame_skip)
  File "/Users/erwincoumans/develop/robel/robel/simulation/sim_scene.py", line 49, in create
    return mjpy_sim_scene.MjPySimScene(*args, **kwargs)
  File "/Users/erwincoumans/develop/robel/robel/simulation/sim_scene.py", line 72, in __init__
    self.sim = self._load_simulation(model_handle)
  File "/Users/erwincoumans/develop/robel/robel/simulation/mjpy_sim_scene.py", line 58, in _load_simulation
    model = mujoco_py.load_model_from_path(model_handle)
  File "mujoco_py/cymj.pyx", line 175, in mujoco_py.cymj.load_model_from_path
Exception: Failed to load XML file: /Users/erwincoumans/develop/robel/robel/dclaw/assets/dclaw3xh_valve3_v0.xml. mj_loadXML error: b"XML Error: Include error: 'XML parse error at line 0, column 0:\nFailed to open file\n'\nElement 'include', line 19, column 3\n"

URDF files for D'Kitty and D'Claw?

Hello guys,

Thanks for the cool benchmarks. Is there any way that you can provide a URDF file for D'Kitty and D'Claw? I would like to use those nice robots in a different simulator/setup..

Thanks in advance!

Tracking using openvr

I am trying to setup DKitty tracking using one htc vive base station 2.0 and tracker 2.0.
openvr version is 1.12.501

I am getting a error in robel/components/tracking/virtual_reality/device.py", line 64, 'str' object has no attribute 'decode'
It seems that from some version openvr.getStringTrackedDeviceProperty function started returning string instead of bytes so removing decode('utf-8') solves this issue.
After this I am able to call the tracker from python code.

Unfortunately, I am getting None as tracked position. I was following this post on setting tracking without an HMD. The steamvr says "The base station is not currently tracking.any devices. Make sure it is in view of your headset.". I would appreciate if you could share the details on how tracking from the paper was done.

Screenshot from 2020-07-02 12-57-25

D'Claw Examples/Documentation

Hi,

Using your assembly and software installation documentation, I was able to get my D'Claw robot and work-space properly configured. I'm a bit at a loss though as to how to perform the three benchmark tasks. I ran the code specified at https://github.com/google-research/robel#23-example-usage and observed the robot motors jerk once. I then put the 'env.step(env.action_space.sample()) part in an infinite loop so that the robot would keep moving, but I don't fully understand what 'DClawTurnFixed-v0' means and how it differs from its two counterparts ('DClawTurnRandom-v0' and 'DClawTurnRandomDynamics-v0'). I assume there are pre-trained models that can be run for each of the three benchmark tasks (pose, screw, turn)? How do I go about running them so that I can visually see the robot doing each task?

Thanks,
Solomon

about InitError_Init_VRClientDLLNotFound

when I'm trying DKitty hardware, there is such a problem:
(base) tonyhao@tonyhao-fit:~/tonyRLws1$ python trys/tryRobel2.py Traceback (most recent call last): File "trys/tryRobel2.py", line 7, in <module> env = gym.make('DKittyWalkFixed-v0',device_path='/dev/ttyUSB0', File "/home/tonyhao/anaconda3/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make return registry.make(id, **kwargs) File "/home/tonyhao/anaconda3/lib/python3.8/site-packages/gym/envs/registration.py", line 90, in make env = spec.make(**kwargs) File "/home/tonyhao/anaconda3/lib/python3.8/site-packages/gym/envs/registration.py", line 60, in make env = cls(**_kwargs) File "/home/tonyhao/tonyRLws1/robel/robel/utils/configurable.py", line 102, in __init__ base_init(self, *args, **kwargs) File "/home/tonyhao/tonyRLws1/robel/robel/dkitty/walk.py", line 86, in __init__ super().__init__( File "/home/tonyhao/tonyRLws1/robel/robel/dkitty/base_env.py", line 252, in __init__ super().__init__(*args, **kwargs) File "/home/tonyhao/tonyRLws1/robel/robel/dkitty/base_env.py", line 112, in __init__ self.tracker = self._add_component(tracker_builder) File "/home/tonyhao/tonyRLws1/robel/robel/robot_env.py", line 549, in _add_component component = component_builder.build( File "/home/tonyhao/tonyRLws1/robel/robel/components/tracking/builder.py", line 54, in build return VrTrackerComponent( File "/home/tonyhao/tonyRLws1/robel/robel/components/tracking/vr_tracker.py", line 48, in __init__ self._VR_CLIENT = VrClient() File "/home/tonyhao/tonyRLws1/robel/robel/components/tracking/virtual_reality/client.py", line 45, in __init__ self._vr_system = openvr.init(openvr.VRApplication_Other) File "/home/tonyhao/.local/lib/python3.8/site-packages/openvr/__init__.py", line 7170, in init initInternal2(applicationType, pStartupInfo) File "/home/tonyhao/.local/lib/python3.8/site-packages/openvr/__init__.py", line 7302, in initInternal2 openvr.error_code.InitError.check_error_value(error.value) File "/home/tonyhao/.local/lib/python3.8/site-packages/openvr/error_code/__init__.py", line 23, in check_error_value raise error_class(error_value, message) openvr.error_code.InitError_Init_VRClientDLLNotFound
I have installed steam and steamvr on system ubuntu20.04. this is the code i ran:
`import numpy as np
import gym
from gym.spaces import Discrete, Box
import mujoco_py
import robel

env = gym.make('DKittyWalkFixed-v0',device_path='/dev/ttyUSB0',
torso_tracker_id='LHR-9510D433', use_dict_obs=True)
#env = gym.make('DKittyWalkFixed-v0')
act = [-1,-1,-1,1,-1,-1,1,1,1,-1,1,1]

while True:
print("doing new episode")
obs = env.reset()
done = False
while not done:
obs , ret , done , _ = env.step(act)
print(obs)
`
how to solve this problem?

About connection to a real D'kitty robot

Hello guys,

Thanks for this project. We got a D'kitty robot but we don't know how to connect to it. We find some files about dynamixel, and do you have an example code for it? Just like how to use gym API to activate with our dog.

Thanks in advance!

How to load the 4-prong valve?

Is there some easy way to load the 4-prong valve simulation? I see the assets for it are there and there are experiments for it in the paper, but no associated environment?

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.