Coder Social home page Coder Social logo

jjshoots / pyflyt Goto Github PK

View Code? Open in Web Editor NEW
86.0 4.0 14.0 249.69 MB

UAV Flight Simulator for Reinforcement Learning Research

Home Page: https://taijunjet.com/PyFlyt/documentation.html

License: MIT License

Python 99.47% Shell 0.08% Makefile 0.20% Batchfile 0.25%
drones pybullet reinforcement-learning reinforcement-learning-environments uav unmanned-aerial-vehicle

pyflyt's Introduction

Ruff total downloads weekly downloads

PyFlyt - UAV Flight Simulator for Reinforcement Learning Research

Comes with Gymnasium and PettingZoo environments built in!

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}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.