Skip to content

PyBullet Gym environments for single and multi-agent reinforcement learning of quadcopter control

License

Notifications You must be signed in to change notification settings

raviswaroop-98/gym-pybullet-drones

 
 

Repository files navigation

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.

About

PyBullet Gym environments for single and multi-agent reinforcement learning of quadcopter control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%