This library provides a modular framework for implementing various control strategies for drones, including:
- PID Control
- Model Predictive Control (MPC)
- Linear Quadratic Regulator (LQR)
- Robust Control (H-Infinity)
- Modular design for easy extension.
- Simulation-ready components.
- Integration with custom drone models.
include/: Header files.src/: Source files for control algorithms and utilities.tests/: Unit tests for each module.examples/: Example applications demonstrating library usage.doc/: Design notes and module primers (e.g. mixers).
-
Clone the repository and pull submodules:
git clone https://github.com/antshiv/controlSystems.git cd control_systems git submodule update --init --recursive -
Build the library:
mkdir build && cd build cmake .. make
-
Build and run the attitude-hold example:
cmake --build build --target attitude_hold_example ./attitude_hold_example
-
(Optional) Run tests:
ctest --output-on-failure
- C
- CMake 3.10+
- Optional: GNU Scientific Library (GSL) for advanced numerical computations.
This project expects external components to be checked out under external/ as git submodules. For example:
controlSystems/
├── external/
│ └── attitudeMathLibrary/ # git submodule add https://github.com/antshiv/attitudeMathLibrary.git
The control build pulls headers/sources from external/attitudeMathLibrary. After cloning, always run:
git submodule update --init --recursiveThe same pattern should be followed when integrating the state estimation or dynamics libraries—add them under external/ and propagate include/link directives in CMake.
Feel free to contribute by creating a pull request or opening an issue.