Skip to main content

UAV Flight Simulator Gymnasium Environments for Reinforcement Learning Research.

Project description

PyFlyt - UAV Flight Simulator for Reinforcement Learning

Comes with Gymnasium and PettingZoo environments built in!

View the documentation here!

This is a library for testing reinforcement learning algorithms on UAVs. This repo is still under development. We are also actively looking for users and developers, if this sounds like you, don't hesitate to get in touch!

Installation

pip3 install wheel numpy
pip3 install pyflyt

numpy and wheel must be installed prior to pyflyt such that pybullet is built with numpy support.

Usage

Usage is similar to any other Gymnasium and PettingZoo environment:

Gymnasium

import gymnasium
import PyFlyt.gym_envs # noqa

env = gymnasium.make("PyFlyt/QuadX-Hover-v2", render_mode="human")
obs = env.reset()

termination = False
truncation = False

while not termination or truncation:
    observation, reward, termination, truncation, info = env.step(env.action_space.sample())

View the official documentation for gymnasium environments here.

PettingZoo

from PyFlyt.pz_envs import MAFixedwingDogfightEnv

env = MAFixedwingDogfightEnv(render_mode="human")
observations, infos = env.reset()

while env.agents:
    # this is where you would insert your policy
    actions = {agent: env.action_space(agent).sample() for agent in env.agents}

    observations, rewards, terminations, truncations, infos = env.step(actions)
env.close()

View the official documentation for pettingzoo environments here.

Citation

If you use our work in your research and would like to cite it, please use the following bibtex entry:

@article{tai2023pyflyt,
  title={PyFlyt--UAV Simulation Environments for Reinforcement Learning Research},
  author={Tai, Jun Jet and Wong, Jim and Innocente, Mauro and Horri, Nadjim and Brusey, James and Phang, Swee King},
  journal={arXiv preprint arXiv:2304.01305},
  year={2023}
}

Gallery

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyflyt-0.29.0.tar.gz (183.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyflyt-0.29.0-py3-none-any.whl (215.6 kB view details)

Uploaded Python 3

File details

Details for the file pyflyt-0.29.0.tar.gz.

File metadata

  • Download URL: pyflyt-0.29.0.tar.gz
  • Upload date:
  • Size: 183.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyflyt-0.29.0.tar.gz
Algorithm Hash digest
SHA256 987172a52dc86d5c69c42afc4ecc10d4d4ec412ffce4290b4107499b8cc0d051
MD5 8602836c968b4d7058d977ff343c946e
BLAKE2b-256 8215bf00a97e58797680091bbf410828fd73dc47cc5e8f5d0294f1be243bb914

See more details on using hashes here.

File details

Details for the file pyflyt-0.29.0-py3-none-any.whl.

File metadata

  • Download URL: pyflyt-0.29.0-py3-none-any.whl
  • Upload date:
  • Size: 215.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyflyt-0.29.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2ae0e2b35921b74bba49cd16eb4b9d7ae9dddab74ffa09ed94c9f89ab381f3a
MD5 85e449e09b6227ebac7c9322320541f3
BLAKE2b-256 3518f399138d8266ad28b53f7a50fdce24f1dfc645185499807bdafa2a2023c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page