Aerial manipulators unite the agility of drones with the dexterity of robotic arms. But when the manipulator moves, the drone’s flight dynamics shift instantly — the center of mass changes, and gravity pulls differently on every link. To keep everything stable, a controller must account for these coupled dynamics.

A practical and elegant solution: PD + gravity compensation.

The Problem

When a manipulator is attached to a UAV, its movement alters the total inertia and center of gravity of the system. Traditional UAV controllers assume a rigid body and cannot handle these internal disturbances. A common solution adopted in aerial manipulation is to implement two different controllers, one for the arm and one for the drone, and then expect that the movement of one to be felt as a disturbance by the other. The strategy just mentioned may work when the inertia of the drone is much bigger than the inertia of the arm, but this is not always true. In the context of this project I had to put the boomslang arm on the tilthex drone, so I couldn’t make the simplification explained before.

Image

Boomslang

Image

Tilthex

The goal here is to design a whole-body controller that stabilizes both the UAV and manipulator under gravity and makes the movement of the drone compensate for the movement of the arm and vice-versa.

The modeling of the system

The generalized coordinates of the system can be presented as:

\[q = \begin{bmatrix} x \\ y \\ z \\ q_x \\ q_y \\ q_z \\ q_w \\ q_1 \\ q_2 \\ q_3 \end{bmatrix}\]

Where:

This way, the generalized coordinate vector \( q \) contains:

And the generalized velocities as:

\[\dot{q} = \begin{bmatrix} v_x \\ v_y \\ v_z \\ \omega_x \\ \omega_y \\ \omega_z \\ \dot{q}_1 \\ \dot{q}_2 \\ \dot{q}_3 \end{bmatrix}\]

Where:

The generalized velocity vector \( \dot{q} \) contains:

Finally, the generalized acceleration vector is:

\[\ddot{q} = \begin{bmatrix} \dot{v}_x \\ \dot{v}_y \\ \dot{v}_z \\ \dot{\omega}_x \\ \dot{\omega}_y \\ \dot{\omega}_z \\ \ddot{q}_1 \\ \ddot{q}_2 \\ \ddot{q}_3 \end{bmatrix}\]

Where:

With all coordinates defined, their evolution is expressed as:

\[M(q)\,\ddot{q} + C(q,\dot{q})\,\dot{q} + g(q) = \tau\]

Where:

We can further dissect the above equation in the form below:

\[\begin{bmatrix} M_{bb} & M_{bj} \\ M_{jb} & M_{jj} \end{bmatrix} \begin{bmatrix} \dot{v} \\ \ddot{q}_j \end{bmatrix} + \begin{bmatrix} C_{bb} & C_{bj} \\ C_{jb} & C_{jj} \end{bmatrix} \begin{bmatrix} v \\ \dot{q}_j \end{bmatrix} + \begin{bmatrix} g_b \\ g_j \end{bmatrix} = \begin{bmatrix} f \\ \tau_j \end{bmatrix}\]

Then we can finally define:

The control strategy

As suggested by the title, the control strategy chosen here was a simple PD plus gravity compensation. It was implemented by choosing the \(\tau\) to be equal to:

\[\tau = \begin{bmatrix} f \\ \tau_j \end{bmatrix} = g(q) + K_p (q_d - q) + K_d (\dot{q}_d - \dot{q})\]

The controller combines gravity compensation with proportional–derivative (PD) feedback to regulate both base and joint motion.

Finally, the closed-loop dynamics can be defined as:

\[M(q)\ddot{q} + C(q, \dot{q})\dot{q} = K_p (q_d - q) + K_d (\dot{q}_d - \dot{q})\]

With gravity exactly compensated by ( g(q) ), the resulting dynamics describe a PD-stabilized system, ensuring smooth and stable convergence toward the desired motion.

The torques of the joints can be used as control inputs, but the control inputs of the drone need to be obtained using the following body wrench–input mapping:

\[w = A\,u, \quad w = \begin{bmatrix} f_x\\ f_y\\ f_z\\ \tau_x\\ \tau_y\\ \tau_z \end{bmatrix}, \quad u = \begin{bmatrix} u_1\\ u_2\\ \vdots\\ u_m \end{bmatrix}\]

Where:

Explicitly:

\[u = \omega^2 = \begin{bmatrix} \omega_1^2 \\ \omega_2^2 \\ \vdots \\ \omega_m^2 \end{bmatrix}\]

Where \( \omega_i \) is the angular velocity of rotor \( i \).

Result

The proposed solution was implemented using the Python package Pinocchio and visualized using Meshcat. Down below, two videos (first with half arm and then with full arm) can be seen of the implemented solution working. The colored arrows represent the different thrusts of each motor.

For now, the system can fly around the workspace and move the arm, but for reliable interaction with the environment an impedance control scheme will be implemented at a later date.