Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 3.08 KB

installation.md

File metadata and controls

57 lines (48 loc) · 3.08 KB

Installation

robosuite officially supports Mac OS X and Linux on Python 3. It can be run with an on-screen display for visualization or in a headless mode for model training, with or without a GPU.

The base installation requires the MuJoCo physics engine (with mujoco-py, refer to link for troubleshooting the installation and further instructions) and numpy. To avoid interfering with system packages, it is recommended to install it under a virtual environment by first running virtualenv -p python3 . && source bin/activate.

For Linux, you will need to install some packages to build mujoco-py (sourced from here, with a couple missing packages added). If using apt, the required installation command is:

$ sudo apt install curl git libgl1-mesa-dev libgl1-mesa-glx libglew-dev \
         libosmesa6-dev software-properties-common net-tools unzip vim \
         virtualenv wget xpra xserver-xorg-dev libglfw3-dev patchelf

Note that for older versions of Ubuntu (e.g., 14.04) there's no libglfw3 package, in which case you need to export LD_LIBRARY_PATH=$HOME/.mujoco/mujoco210/bin before proceeding to the next step.

For macOS, compiling mujoco-py requires specific versions of GCC. We have verified that the following compiling procedure works on macOS Big Sur:

$ brew install gcc@7 # make sure homebrew is installed
$ git clone https://github.com/ARISE-Initiative/robosuite.git
$ conda create -n robosuite python=3.7 # make sure Anaconda is installed
$ conda activate robosuite
$ cd robosuite # go to the robosuite root folder
$ pip install -e .
$ CC=gcc-7 python -c "import robosuite"  # this will trigger mujoco_py to compile

Install from pip

  1. After setting up mujoco, robosuite can be installed with
$ pip install robosuite
  1. Test your installation with
$ python -m robosuite.demos.demo_random_action

Install from source

  1. Clone the robosuite repository
$ git clone https://github.com/StanfordVL/robosuite.git
$ cd robosuite
  1. Install the base requirements with

    $ pip3 install -r requirements.txt

    This will also install our library as an editable package, such that local changes will be reflected elsewhere without having to reinstall the package.

  2. (Optional) We also provide add-on functionalities, such as OpenAI Gym interfaces, inverse kinematics controllers powered by PyBullet, and teleoperation with SpaceMouse devices. To enable these additional features, please install the extra dependencies by running

    $ pip3 install -r requirements-extra.txt
  3. Test your installation with

$ python robosuite/demos/demo_random_action.py