Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 2.07 KB

README.md

File metadata and controls

44 lines (35 loc) · 2.07 KB

Requirements and Installation

The repo was written using Python 3.7 with conda on macOS 10.15 and tested with Python 3.8 on macOS 12, Ubuntu 20.04

On macOS and Ubuntu

Major dependencies are gym, pybullet, stable-baselines3, and rllib

Video recording requires to have ffmpeg installed, on macOS

$ brew install ffmpeg

On Ubuntu

$ sudo apt install ffmpeg

macOS with Apple Silicon (like the M1 Air) can only install grpc with a minimum Python version of 3.9 and these two environment variables set:

$ export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
$ export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1

The repo is structured as a Gym Environment and can be installed with pip install --editable

$ conda create -n drones python=3.8 # or 3.9 on Apple Silicon, see the comment on grpc above
$ conda activate drones
$ pip3 install --upgrade pip
$ git clone https://github.com/utiasDSL/gym-pybullet-drones.git
$ cd gym-pybullet-drones/
$ pip3 install -e .

Examples

There are 2 basic template scripts in gym_pybullet_drones/: singleagent.py and test_singleagent.py

Run singleagent.py to train a reinforcement learning algorithm to train a drone to hover and the model is saved in gym_pybullet_drones/results. To evaluate the trained model run test_singleagent.py.