Metadata-Version: 2.3
Name: multirotor
Version: 0.6.0
Summary: Simulation testbed for multirotor vehicles.
Keywords: multirotor,simulation,gym,uav
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: numba
Requires-Dist: matplotlib
Requires-Dist: gym
Requires-Dist: optuna
Requires-Dist: control ; extra == 'control'
Requires-Python: >=3.13
Provides-Extra: control
Description-Content-Type: text/markdown

# multirotor

[![Documentation Status](https://readthedocs.org/projects/multirotor/badge/?version=latest)](https://multirotor.readthedocs.io/en/latest/?badge=latest)

![](https://raw.githubusercontent.com/hazrmard/multirotor/v0.6.0/_static/logo.jpg)

Simulation of multi-rotor unmanned aerial vehicles in python.

This package provides an object-oriented interface for modeling and simulating motors, propellers, and airframe of a UAV. Additionally, an OpenAI gym-compatible environment is provided for Reinforcement Learning experiments.

See the Demo jupyter notebook in the repository for a walkthrough.

Code repository: [Github](https://github.com/hazrmard/multirotor)

Please cite this as:

```
@inproceedings{ahmed2022multirotor,
    title={A high-Fidelity Simulation test-Bed for fault-Tolerant octo-Rotor Control Using Reinforcement Learning},
    author={Ahmed, Ibrahim and Quinones-Grueiro, Marcos and Biswas, Gautam},
    booktitle={2022 IEEE/AIAA 41st Digital Avionics Systems Conference (DASC)},
    year={2022},
    organization={IEEE}
}
```

## Installation

Install from the Python Package Index (PyPI):

```bash
pip install multirotor
```

Or, clone repository and install for development. This will allow you to change the code of the package so the changes show up when you `import multirotor` in other projects.

```bash
git clone https://github.com/hazrmard/multirotor.git
cd multirotor
uv sync                  # creates .venv, installs package (editable) + dev group
uv sync --group docs     # also install documentation dependencies (used by Read the Docs)
uv sync --extra control  # optional `control` extra
```

Build and publish with [uv](https://docs.astral.sh/uv/):

```bash
uv build                 # writes sdist and wheel to dist/
uv publish               # uploads dist/* to PyPI (set UV_PUBLISH_TOKEN)
```

## Code organization

The following main classes are available in the code. For simulating the vehicle:
![](https://raw.githubusercontent.com/hazrmard/multirotor/v0.6.0/_static/vehicle_classdiagram.png)

And for simulating control:
![](https://raw.githubusercontent.com/hazrmard/multirotor/v0.6.0/_static/controller_classdiagram.png)

These diagrams show the classes a user works with. For developers, the module
docstrings of `multirotor/physics.py` and `multirotor/dynamics.py` show which
functions call which, and how the integrated state is laid out. Those of
`multirotor/controller/pid.py` and `multirotor/controller/kernels.py` do the same
for the controller. The compiled reward of the environments is in
`multirotor/env_kernels.py`.