/jdrones

PyBullet models prepared for usage via the gymnasium environment for scientific research

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

jDrones Logo codecovCDCI docstring coverage

Why

Provide a gymnasium style interface using a physics simulation engine (pybullet in this case) to drone models. This in-turn enables faster prototyping of controllers, and reinforcement models. I'm maintaining this particular repo for my own research which is focused on waypoint generation, hence my priority is the trajectory drone environment. However, any upgrades and updates on the others would be hugely appreciated.

⚠️ This code is still in alpha and will change over time as I use it ⚠️

Development

Create the local development environment:

conda create --name jdrones python=3.10
conda activate jdrones
pip install -r requirements.txt -r tests/requirements.txt

The run ***all tests with

#!/bin/bash
GIT_DIR=$(git rev-parse --show-toplevel)
PYTHONPATH=$GIT_DIR/src python -m pytest -s -q -n auto $GIT_DIR
PYTHONPATH=$GIT_DIR/src python -m pytest -s -q -n auto --only-integration $GIT_DIR
PYTHONPATH=$GIT_DIR/src python -m pytest -s -q -n auto --only-slow-integration $GIT_DIR

Citations

[1] J. Panerati, H. Zheng, S. Zhou, J. Xu, A. Prorok, and A. P. Schoellig, ‘Learning to Fly -- a Gym Environment with PyBullet Physics for Reinforcement Learning of Multi-agent Quadcopter Control’. arXiv, Jul. 25, 2021. doi: 10.48550/arXiv.2103.02142.

[2] J. Meyer, A. Sendobry, S. Kohlbrecher, U. Klingauf, and O. von Stryk, ‘Comprehensive Simulation of Quadrotor UAVs Using ROS and Gazebo’, in Simulation, Modeling, and Programming for Autonomous Robots, Berlin, Heidelberg, 2012, pp. 400–411. doi: 10.1007/978-3-642-34327-8_36.

Future Work

  • Better sensor modelling and kalman filters
  • Performance improvements of simulation using either compiled code or a JIT
  • Better controllers
  • Better trajectory generation between waypoints
  • Examples
  • Proper integration testing
  • Higher fidelity motor models