A lightweight quadrotor and hexacopter fully-actuated (non-tiltable) dynamic simulator in Python.
-
uav/ - Core simulation modules
quadrotor.py- Quadrotor (4-rotor) dynamics modelhexacopter_fa.py- Hexacopter (6-rotor) fully-actuated dynamics modelutils.py- Quaternion, rotation, and integration utilitieslib.py- NumPy and matplotlib importsplotting.py- Visualization functions
-
tests/ - Test scripts and simulations
test_quad.py- Quadrotor test scenariostest_hexa_fa.py- Hexacopter test scenariostest_body.py- Rotor configuration visualization
-
plots/ - Simulation output (generated)
bash setup.shOr install manually:
pip install -r requirements.txtRun a simulation:
python3 -m tests.test_quad
python3 -m tests.test_hexa_faBoth models use:
- State: position, quaternion, velocity, angular velocity
- Input: rotor thrust commands (per rotor)
- Dynamics: RK4 integration with quaternion propagation
- Rotor config: stores position, direction, and drag torque coefficient
The hexacopter has 6 rotors in a symmetric configuration, enabling fully-actuated control (6 DOF wrench authority).