Installation

The installation of the OffWorld Gym is OS agnostic and gives you access to real physical environments and their simulated replicas (via Docker).

Note

Python 2.7 and 3.5 are not supported. Please run your scripts using Python 3.6.

Pre-requisites

The communication with a real physical OffWorld Gym environment does not require anoython other than Python 3.6, but you will need Docker if you want to make use of the simulated environments:

Setup

git clone https://github.com/offworld-projects/offworld-gym.git
cd offworld-gym
pip3 install -e .

Verify the installation

To test your installtion and the connectivity with the physical enviroment, do the following:

  1. Book your time slot at https://gym.offworld.ai/book

  2. export OFFWORLD_GYM_ACCESS_TOKEN=paste_your_token_here using the OffWorld Gym Access Token from https://gym.offworld.ai/account (consider adding it to your ~/.bashrc)

  3. Run the minimal example python3.6 examples/minimal_example_OffWorldMonolithDiscreteReal.py

  4. Open https://gym.offworld.ai/cameras in your browser to see the live camera feed from the environment!

To run a simulated environment:

  1. python3.6 examples/minimal_example_OffWorldDockerMonolithContinuousSim.py

  2. Open the URL from the script’s output in your browser to visualize the Gazebo simulation

Additinal steps to run the examples that based on Keras-RL

If you are interested in running or building upon the DDQN examples provided in the examples/ directory you will need to install our fork of keras-rl. we have created an easy script that will create a virtual environment that everything you need, please see the Examples section for details.

Local Ubuntu installation without Docker (no active supported)

If for some reason you would like to avoid using Docker for running simulated environments, you can install all the necessary components directly on your system (tested on Ubuntu 16.04).

Install ROS Kinetic by following the corresponding installation instructions.

For GPU support also install

Run the installation script scripts/install-real-and-sim.sh (tested on Ubuntu 16.04):

git clone https://github.com/offworld-projects/offworld-gym.git
cd offworld-gym/scripts
export OFFWORLD_GYM_ROOT=`pwd`/..
./install-real-and-sim.sh

To test the Sim installation open two terminals, start the environment in the first one

source $OFFWORLD_GYM_ROOT/scripts/gymshell.sh
roslaunch gym_offworld_monolith env_bringup.launch

and a Gazebo instance in another

source $OFFWORLD_GYM_ROOT/scripts/gymshell.sh
gzclient

To test the real installation please follow the steps in the section above.