[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Latest commit

 

History

History
101 lines (83 loc) · 5.23 KB

README.md

File metadata and controls

101 lines (83 loc) · 5.23 KB

RoboHive uses git submodules to resolve dependencies. Please follow steps exactly as below to install correctly.

  1. We recommend installaition within a conda environement. If you don't have one yet, create one using

    conda create -n robohive python=3.8
    conda activate robohive
    
  2. Robohive can be installed directly from the PyPi. Additional flags can be supplied to use additional features

    # only mujoco as available sim_backend
    pip install robohive
    # mujoco_py+mujoco as available sim_backend
    pip install robohive[mujoco_py]
    # mujoco_py+mujoco+visual encoders
    pip install robohive[mujoco_py, encoder]

    RoboHive will throw informative errors if any of these packages are invoked but not installed

    # Initialize robohive (one time)
    robohive_init
  3. For editable installation, clone this repo (on a tag) with pre-populated submodule dependencies as -

    git clone --branch <tag_name/branch_name> --recursive https://github.com/vikashplus/robohive.git
    

    Note: RoboHive agressively uses git-submodules. Therefore, it is important to use the exact command above for installation. Basic understanding of how to work with submodules is expected.

    # only mujoco as available sim_backend
    $ pip install -e robohive
    # mujoco_py+mujoco as available sim_backend
    $ pip install -e robohive[mujoco_py]
    # mujoco_py+mujoco+visual encoder
    pip install -e robohive[mujoco_py, encoder]
    # with a0 binding for realworld robot
    $ pip install -e robohive[a0]

    RoboHive will throw informative errors if any of these packages are invoked but not installed

    # Initialize robohive (one time)
    robohive_init
  4. To use R3M, RRL, VC as visual encoders.

    • For PyPI installation: Encoders can't be directly installated from PyPi as these encoders don't have PyPi packages. (we are working with the authors for a fix). To use the encoders, simply try using the encoders and follow the instructions on the console
    • For editable installation Open setup.py, uncomment the r3m and vc_models dependency under encoder and then run
       # all visual encoders
       pip install robohive[encoder]
    
  5. You can visualize the environments with random controls using the below command

    $ python robohive/utils/examine_env.py -e FrankaReachRandom-v0
    

Installation FAQs

The package relies on mujoco-py which might be the trickiest part of the installation. See known issues below and also instructions from the mujoco-py page if you are stuck with mujoco-py installation.

Linux

  • Install osmesa related dependencies:
$ sudo apt-get install libgl1-mesa-dev libgl1-mesa-glx libglew-dev libosmesa6-dev build-essential libglfw3
  • Visualization in linux: If the linux system has a GPU, then mujoco-py does not automatically preload the correct drivers. We added an alias MJPL in bashrc (see instructions) which stands for mujoco pre-load. When runing any python script that requires rendering, prepend the execution with MJPL.

    • Update bashrc by adding the following lines and source it
      alias MJPL='LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so:/usr/lib/nvidia-384/libGL.so'
      
    • Use this preload when launching your scripts
      $ MJPL python script.py
      
  • If there are issues with install of pytorch, please follow instructions from the pytorch website to install it properly based on the specific version of CUDA (or CPU-only) you have.

  • If you encounter a patchelf error in mujoco_py install, you can fix this with the following command when inside the anaconda env: conda install -c anaconda patchelf. See this page for additional info.

Mac OS

  • If there are issues with install of pytorch, please follow instructions from the pytorch website to install it properly.

  • If you encounter a patchelf error in mujoco_py install, you can fix this with the following command when inside the anaconda env: conda install -c anaconda patchelf. See this page for additional info.

  • GCC error in Mac OS: If you get a GCC error from mujoco-py, you can get the correct version mujoco-py expects with brew install gcc --without-multilib. This may require uninstalling other versions of GCC that may have been previously installed with brew remove gcc@6 for example. You can see which brew packages were already installed with brew list.

Known Issues

  • Errors related to osmesa during installation. This is a mujoco-py build error and would likely go away if the following command is used before creating the conda environment. If the problem still persists, please contact the developers of mujoco-py
$ sudo apt-get install libgl1-mesa-dev libgl1-mesa-glx libglew-dev libosmesa6-dev