Project · Aerial robotics
UAV Dynamics Simulator
A lightweight Python simulator of a quadrotor and a fully-actuated hexacopter, built from the rigid-body equations.
How it works
-
01
Rotor thrusts
Input is the thrust command of each rotor.
-
02
Wrench
Rotor positions, spin directions and drag give total force and torque.
-
03
Dynamics
Newton–Euler equations with quaternion attitude.
-
04
Integrate & plot
RK4 step, then state and 3D trajectory plots.
What it does
A small, readable simulator for multirotor drones, written from scratch in Python. It contains two models:
- a quadrotor (4 rotors), the classic under-actuated drone;
- a hexacopter with 6 fixed rotors in a fully-actuated layout, so it can produce force and torque in every direction (6-DOF wrench).
Each model stores the state (position, attitude quaternion, linear and angular velocity), takes per-rotor thrust as input, and is integrated with Runge-Kutta 4.
Test scenarios
Short scripts run each model through simple manoeuvres (hover, climb, lateral motion, yaw) and plot the states and the 3D trajectory. They are a quick sanity check that the dynamics behave as expected.
Tools & techniques
- Python
- NumPy
- Rigid-body dynamics
- Quaternions
- RK4
- Matplotlib