GithubHelp home page GithubHelp logo

personalrobotics / gym-pybullet-drones Goto Github PK

View Code? Open in Web Editor NEW

This project forked from utiasdsl/gym-pybullet-drones

0.0 1.0 0.0 108.51 MB

fork for CCIL paper

Home Page: https://utiasDSL.github.io/gym-pybullet-drones/

License: MIT License

Shell 1.13% Python 98.87%

gym-pybullet-drones's Introduction

gym-pybullet-drones

This is a minimalist refactoring of the original gym-pybullet-drones repository, designed for compatibility with gymnasium, stable-baselines3 2.0, and SITL betaflight/crazyflie-firmware.

NOTE: if you prefer to access the original codebase, presented at IROS in 2021, please git checkout [paper|master] after cloning the repo, and refer to the corresponding README.md's.

formation flight control info

Installation

Tested on Intel x64/Ubuntu 22.04 and Apple Silicon/macOS 13.4.

git clone https://github.com/utiasDSL/gym-pybullet-drones.git
cd gym-pybullet-drones/

conda create -n drones python=3.10
conda activate drones

pip3 install --upgrade pip
pip3 install -e . # if needed, `sudo apt install build-essential` to install `gcc` and build `pybullet`

Use

PID position control example

cd gym_pybullet_drones/examples/
python3 pid.py

Stable-baselines3 PPO RL example

cd gym_pybullet_drones/examples/
python3 learn.py

Betaflight SITL example (Ubuntu only)

git clone https://github.com/betaflight/betaflight
cd betaflight/ 
make arm_sdk_install # if needed, `apt install curl``
make TARGET=SITL # comment out line: https://github.com/betaflight/betaflight/blob/master/src/main/main.c#L52
cp ~/gym-pybullet-drones/gym_pybullet_drones/assets/eeprom.bin ~/betaflight/ # assuming both gym-pybullet-drones/ and betaflight/ were cloned in ~/
betaflight/obj/main/betaflight_SITL.elf

In another terminal, run the example

conda activate drones
cd gym_pybullet_drones/examples/
python3 beta.py --num_drones 1 # also check the steps in the file's docstrings to use multiple drones

Troubleshooting

  • On Ubuntu, with an NVIDIA card, if you receive a "Failed to create and OpenGL context" message, launch nvidia-settings and under "PRIME Profiles" select "NVIDIA (Performance Mode)", reboot and try again.

Run all tests from the top folder with

pytest tests/

Citation

If you wish, please cite our IROS 2021 paper (and original codebase) as

@INPROCEEDINGS{panerati2021learning,
      title={Learning to Fly---a Gym Environment with PyBullet Physics for Reinforcement Learning of Multi-agent Quadcopter Control}, 
      author={Jacopo Panerati and Hehui Zheng and SiQi Zhou and James Xu and Amanda Prorok and Angela P. Schoellig},
      booktitle={2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
      year={2021},
      volume={},
      number={},
      pages={7512-7519},
      doi={10.1109/IROS51168.2021.9635857}
}

References

TODO

  • Add crazyflie-firmware SITL support @spencerteetaert
  • Add motor delay @JacopoPan / @spencerteetaert
  • Replace rpy with quaternions (and ang_vel with body rates) in obs @JacopoPan
  • Replace BaseSingleAgentAviary and BaseMultiAgentAviary with a single RLAviary, incl. PR #161 @JacopoPan
  • Add a multi-agent MDP with 2-drone chase through a gate @JacopoPan

University of Toronto's Dynamic Systems Lab / Vector Institute / University of Cambridge's Prorok Lab

gym-pybullet-drones's People

Contributors

jacopopan avatar spencerteetaert avatar hany606 avatar hehuizheng avatar ykeuter avatar hidal00p avatar dippa-1 avatar olmpya12 avatar beomyeolyu avatar bttner avatar jamesjrxu avatar siqizhou avatar umutkavakli avatar

Watchers

 avatar

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.