Project · Aerial robotics

UAV Dynamics Simulator

A lightweight Python simulator of a quadrotor and a fully-actuated hexacopter, built from the rigid-body equations.

Role
Developer
When
2026
UAV Simulator
2vehicle models (4 and 6 rotors)
13states (position, quaternion, velocities)
RK4integration at 1 kHz

How it works

  1. 01

    Rotor thrusts

    Input is the thrust command of each rotor.

  2. 02

    Wrench

    Rotor positions, spin directions and drag give total force and torque.

  3. 03

    Dynamics

    Newton–Euler equations with quaternion attitude.

  4. 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.

Quadrotor climbing: position, velocity and acceleration
Quadrotor climbing: position, velocity and acceleration
Quadrotor yaw manoeuvre: attitude and angular velocity
Quadrotor yaw manoeuvre: attitude and angular velocity

Tools & techniques

  • Python
  • NumPy
  • Rigid-body dynamics
  • Quaternions
  • RK4
  • Matplotlib