Note: This library is currently under development. The architecture is fluid and subject to change.
This library is a hardware-agnostic library intended to support basic commutation of actuators. As of now, the following actuator types with associated commutation strategy are supported by this C++ library:
- BLDC/PMSM (Sensored & Sensorless Trap, Sensored FOC)
The following were, at one point, WIP, but are deprioritized in favour of a focus on BLDC software development.
- Stepper Motor Commutation (Note: SW commutation of stepper motors should be avoided as the motor will commutate far slower)
- Brushed Motor (Torque and Open-Loop Speed)
The components shown in blue are implemented in this library; the user must implement the other modules as per their application. This affords flexibility when implementing the library as the user can adapt the various modules as required by the specific application.
The following commands are intended to be run on an Ubuntu 22.04 machine (and what is done right now in CI/CD). #31 will track an eventual build system containerization. Follow the steps below for development:
- Clone this repository
- Run
bash scripts/setup.sh
- this will install packages on the system that are required for development. - Run
bash scripts/test.sh
to build the test cases. - Run
bash scripts/format.sh
to format the source code. - Run
bash scripts/linter.sh
to run the linter.
API documentation is available here
Submit PR's against main
. PR's that modify the source code's functionality without a unit test will not be accepted unless determined that the functionality does not require one. CI will check test, lint, and format upon check-in.
General styling:
- Doxygen-style comments on enums and function declarations (including internal functions)
- Write expressive code (use enums, make the codebase human-readable)
See the simulation hook-in here that employs Simulink. It is very scrappy at the moment and was used primarily for elementary modelling exposure and verification of actuator control strategies implemented in this library off-target. https://github.com/sahil-kale/basilisk-control-loop-sim