Introduction

Aerial robots perceive vegetation as obstacles to avoid1,2. However, dense yet compliant branches, twigs, and leaves could potentially be traversed using direct physical interaction. This would give access to currently unreachable areas, enabling the collection of valuable data for environmental monitoring3, precision agriculture4, and search and rescue5,6.

Despite considerable advancements over the last decade7, the design and control of aerial robots still face limitations when interacting with compliant obstacles. Common approaches for aerial physical interaction (APhI), such as impedance and admittance controllers, are easy to implement but are mainly tailored for exerting desired forces on rigid surfaces8,9,10. In contrast, traversing vegetation necessitates the use of different interaction modes, including pushing to bend obstacles, sliding along them, or employing a combination of these techniques. Model-based or robust controllers enable different modes of interactions as demonstrated in complex tasks such as making contact and pushing hinged doors or rolling carts11,12,13, and pushing and sliding along surfaces for writing or inspection14,15,16. However, these solutions require high-level switching policies based on empirically tuned conditions and thresholds, which become complicated to define when mechanical properties of the environment are stochastic and complex to model, as is the case with vegetation. Moreover, while extensive research has been dedicated to APhI with rigid and movable obstacles17, obstacles with an elastic response, such as vegetation, have received limited attention. Another limitation of current drones is that interaction tasks are constrained to sensorized end-effectors, as demonstrated by tasks such as sensor installation and retrieval18,19, contact-based inspection20,21, or object manipulation22,23. However, traversing vegetation demands an “unconstrained” interaction, where contacts can be established and moved along the entire body of the drone during traversal. As a result, haptic sensing cannot be confined to the end-effector but must be distributed along the entire body of the robot.

Animals have evolved remarkable biomechanical and locomotion strategies24,25,26,27, allowing them to move safely in cluttered vegetation. Through a synergistic interaction of body morphology and feedback control modulated by sensing, animals can transition between various locomotor and interaction modes for navigating complex terrains28,29. For example, cockroaches traverse flexible, grass-like beams by initially pushing across the beams and often rolling their bodies to efficiently slide through the gaps27. This transition is the result of the interplay between their terradynamically streamlined body26 and sensory feedback control. Some insects have also evolved microstructured body surfaces to reduce the friction when moving under leaves or burrowing30,31. Translating these insights in task-oriented morphology and minimalistic controllers, researchers are developing ground robots that use their sensorized body to skillfully push aside and slide through compliant obstacles26,27,32, drones that exploit protective cages to fly through rigid obstacles33,34, and foldable drones that traverse narrow passageways35,36.

The locomotor and interaction versatility demonstrated by animals can inspire the development of novel embodied APhI strategies that tightly integrate morphology, sensing, and feedback control. In this study, we present a direct physical interaction strategy designed for the traversal of a single obstacle with a large and unknown range of stiffnesses, utilizing an underactuated aerial robot (Fig. 1 and Supplementary Movie S1). Our embodied APhI strategy integrates a task-oriented morphology with a simplified yet versatile feedback controller modulated by distributed haptic sensing. A sensorized discoid shell enables the making and sensing of contacts at any point along the body, and facilitates sliding over obstacles due to the streamlined shape and low-friction surface. These design features simplify the control strategy by eliminating the need for a contact model, constraints, or complex switching conditions between pushing and sliding, thereby reducing the computational load. Indeed, we utilize a straightforward optimization-based controller that uses force feedback to maintain robot safety by dampening environmental oscillations during interactions, without requiring knowledge about the elastic response. In a series of experiments, we demonstrate the feasibility of our approach as the drone successfully traverses hinged compliant plates, validating its effectiveness for three different stiffness values spanning one order of magnitude. Through an ablation study, we show that the task-oriented morphology and sensory driven control feedback lead to successful traversal of the obstacle only when exploited simultaneously. Furthermore, additional experiments using real branches with and without leaves confirm the versatility of our approach and provide insights into the challenges of real-world applications.

Fig. 1: Traversal of complaint obstacles with a drone.
figure 1

An underactuated aerial robot equipped with a discoid shell traversing a compliant, hinged plate whose dynamic parameters are unknown. The robot is required to follow a desired path during the interaction, which translates into the need to actively push and slide to overcome the obstacle. Experimental validation conducted with (A) a hinged plate and (B) a real branch.

Results

Task definition

We study the task of traversing a single compliant obstacle consisting of a rigid plate connected to a vertical hinge with a torsional spring of stiffness K. Different obstacle stiffness levels are achieved by varying the value K, which is unknown to the robot. Given the geometry of both the obstacle and the drone, we assume that the interaction problem predominantly occurs on a plane (Fig. 2).

Fig. 2: Task and modes of interaction.
figure 2

A Visual representation of the robot following a reference path while interacting with a compliant environment (a hinged surface with compliance around the anchor point). Highlighted: gravity; world, inertial W frame; and body B frame centered and fixed in the drone’s center of mass. Top-view schematic of (B) Pushing, (C) Sliding and (D) Push-and-Slide phases. K is the torsional stiffness of the compliant obstacle.

Figure 2 illustrates the task and the different interaction modes that the drone needs to alternate in order to traverse the obstacle. Starting from a hovering condition, the drone follows a straight reference path toward the obstacle, then deflecting it away to fly past it (Fig. 2A). Upon contact with the obstacle, the drone transitions from a zero to a non-zero interaction wrench (consisting of the forces and torques exchanged between the drone and the environment during the interaction); strong impacts may destabilize the robot. To deflect the obstacle, the drone has to start Pushing. In this mode (Fig. 2B), the relative movement between the drone and the obstacle is minimal, as the drone maintains a static point of contact while the obstacle is pushed. The Sliding mode instead, occurs when the obstacle cannot be moved (Fig. 2C), e.g., because it is too stiff, causing the robot to slide on it. The drone can actively slide along the surface of the obstacle without losing contact. In this mode, relative movement occurs between the moving drone and the static obstacle. The two interaction modes may coexist in the Push-and-Slide mode (Fig. 2D), that occurs when the drone pushes the obstacle away while simultaneously sliding on it. Here, the point of contact moves on both the obstacle’s surface and the robot’s body. During the whole interaction, the drone maintains contact with the surface, i.e., no loss of contact. Upon detachment, the drone loses contact with the obstacle and may be subject to an abrupt change in the interaction wrench.

Design rationale

Robots traversing a compliant obstacle by physical interaction can derive benefit from environment- and task-oriented morphologies, facilitating task execution and simplifying the formulation of feedback control systems. We have equipped a quadrotor with a disc-shaped shell that protects the propellers from collisions and can be used to push and slide on the compliant plate (Fig. 3A, manufacturing details available in the “Methods” section). The circular shape provides symmetry to the robot, prevents any discontinuities in the contact point while interacting, and generalizes the interaction in any direction on the plane defined by the disc. The low-friction fiberglass surface of the shell further promotes the sliding of the obstacle along its surface. To enable force feedback control, we integrated a six-axis load cell connecting the quadrotor’s frame and the shell. The result is a distributed haptic sensor that measures the net wrench resulting from contacts occurring across the entire surface the shell.

Fig. 3: Task-oriented design of the aerial robot.
figure 3

A CAD of the aerial robot, consisting of a quadrotor connected to a streamlined, disc-shaped shell via a force/torque (F/T) sensor. B Block diagram of the control framework: the full odometry (position p, orientation q, linear v and angular ω velocities) is provided by the on-board tracking camera (VIO) and converted into the correct frame by the state estimator, while the external wrench (Fext, τext) is provided by the force/torque sensor that connects the quadrotor and the cage. Starting from desired position and velocity (pref, vref), which define the path to follow, the controller (NMPC) outputs a command of mass-normalized thrust ccmd and orientation qcmd to the low-level, Attitude controller running on the Flight Controller (FC).

Controller rationale

A sensory feedback controller allows the robot to follow a reference path while safely interacting with compliant obstacles of unknown stiffness. We utilize a Nonlinear Model Predictive Control (NMPC) framework formalized in the drone’s center of mass (CoM) (1) to take into account the full dynamics of the drone and how they are affected by the external wrench exerted by the obstacle, (2) to introduce specific cost terms in order to achieve the different objectives of following a path and simultaneously interacting with the compliant obstacle, and (3) to impose constraints on the drone’s dynamics to guaranteeing safe operation. In the following sections, we examine these three features of the controller. The mathematical formulation and implementation details are comprehensively described in the “Methods” chapter and in Supplementary Method 3. Figure 3B portrays the overall control scheme, which involves the proposed NMPC-based strategy embodied in a standard feedback loop of an aerial robot.

The NMPC takes into account the full model of the dynamics of the drone, including the external wrench in both the translational and rotational dynamics. This is favorable to predict how the measured external wrench will affect the robot’s dynamics.

Two objective terms are introduced in the NMPC to enable the movement toward the other side of the obstacle and to simultaneously interact with it. The first objective term is for path following and commands the drone to follow a straight path and to stay as close as possible to it, tracking a desired velocity. The second objective term is for physical interaction and consists of an impedance behavior included in the NMPC optimization to shape the desired response of the drone while in contact with the obstacle. A similar approach has been validated for both manipulators37 and aerial robots38, but never for interaction with compliant environments. By defining a desired impedance, the controller dampens oscillations of the elastic environment without the need for a model. This approach is independent of the location of the point of contact, allowing us to exploit the benefits of the design, i.e., interaction on every point on the cage and unconstrained with respect to the point of contact. Properly balancing the two objectives allows achieving good performance, as demonstrated in our ablation study on the impact of the controller parameters on the behavior of the drone during the interaction (see Supplementary Method 6 and Supplementary Movie S5).

Finally, a set of safety constraints in the NMPC creates guarantees to avoid oscillations upon contact and detachment, as well as to permit a smooth and direct transition between the interaction modes thanks to the body shape. In detail, enforcing constraints on the dynamics of the drone (e.g., max pitch and roll angles), in combination with flying at a low reference speed, allows us to assure a quasi-static motion and a safer operation, by limiting the external wrench exchanged during interaction. Increasing speed would result in higher wrenches exerted on the drone, which would make the traversal more challenging (e.g., difficulty in smoothly transitioning between interaction modes due to the high speed and short interaction time) or destabilize the drone (e.g., drone not capable of counteracting a high wrench due to physical limitations of the platform).

The task-oriented design enables substantial simplifications in the feedback controller. APhI generally requires an analytical description of the environment and, most importantly, a set of models and constraints related to the contact point, in order to define the motion of the end-effector and the interaction with the environment (e.g., end-effector partially or fully constrained in position and/or orientation, assumption of rigid contact with the environment, friction cone contact models). Such constraints are necessary to define the switching logic for transitioning between interaction modes. Thanks to the streamlined shape of the shell and the use of low-friction materials, the proposed controller does not need constraints on the contact point, which can occur and move anywhere on the shell. This is beneficial because (1) the implementation of the controller is simplified, (2) the controller has less constraints so it can find a feasible solution faster, and (3) the controller can exploit the robot’s body to automatically transition between Pushing, Sliding, and Push-and-Slide, which will be induced by the motion itself, without imposing high-level strategies to handle them. Our controller only requires measuring the response of the environment in order to predict how the robot dynamics will be affected, without requiring the location of the contact point or a model of the elastic environment. In our scenario, the stiffness of the obstacle is unknown, does not need to be estimated, and the controller can therefore generalize for different values of compliance. This is favorable because in natural environments obstacles can have highly nonlinear dynamics, often unfeasible to model or estimate online. Furthermore, without the need for accurate contact dynamics, the controller can be released from any type of contact constraint, which generally increase the optimization problem’s complexity.

Experimental validation

We report the experimental validation of our traversal strategy for different values of stiffness (thus, compliance) of the obstacle, by changing the torsional spring at the hinge. In detail, we selected three values (18, 77.8, 155.5) N mm rad−1, which we refer to as low, mid and high.

First, we report an experiment conducted with the mid value of stiffness, with the aim of analyzing the interaction behavior of the drone during the traversal. In Fig. 4A, the different phases of the traversal task are depicted with still frames from lateral and top views. The direction of motion is from right to left. In Fig. 4B, the plots show the time evolution of the variables of interest (attitude and external wrench) during the execution of the task. Upon first contact, the drone starts pushing against the hinged plate (light blue zone) and the force along the longitudinal axis Fext,x increases. Simultaneously, the drone undergoes rotation around the yaw axis (ψ) following the deflection of the obstacle. To follow the reference, straight path the drone begins to rotate to adjust the yaw angle in the opposite direction. The rotation is facilitated by the low-friction shell and the cost terms related to path following included in the objective function of the NMPC. Eased by the circular morphology of the shell and its low-friction surface, this action results in a Sliding interaction (light pink zone), which can be seen by the change in the force along the lateral axis Fext,y, in the yaw angle ψ, and in the torque around the vertical axis τext,z. At this point, the drone starts to push again, in order to go straight, further deflecting the obstacle, and simultaneously starting to slide on it. In other words, the obstacle is moved aside by the drone pushing forward while the point of contact slides on the surface of the obstacle and on the robot’s shell, resulting in the combined Push-and-Slide condition (mixed light blue and pink zone), which is indicated by increasing force on the longitudinal axis Fext,x and torque around the vertical one τext,z, while the yaw remains unaffected. Thereafter, the detachment is smooth and the drone keeps following the reference path, until it receives the hovering command.

Fig. 4: Experiment with the mid value of stiffness, highlighting the phases of the traversal.
figure 4

A Still frames from lateral (standard camera) and top (fisheye camera) views. Reference path depicted with a red dashed line. Direction of motion from right to left. B Attitude (roll ϕ, pitch θ, yaw ψ), external forces (longitudinal Fext,x, lateral Fext,y, vertical Fext,z), and external torques (around the longitudinal axis τext,x, around the lateral axis τext,y, around the vertical axis τext,z) during the execution of the task. Commanded variables are reported with dotted lines.

We demonstrate the versatility and repeatability of the proposed strategy by performing ten experiments for each of the three stiffness values (Supplementary Movie S2). During all experiments, the reference speed is set to 0.15 m s−1. The quantitative analysis in Fig. 5 refers only to the physical interaction, i.e., between the first contact and the detachment. The success rate (Fig. 5F) shows the number of successful tests out of ten. Since there is one failure for the highest stiffness, the rest of the metrics are evaluated on nine experiments to have the same number of data points for each stiffness. The five quantitative metrics for such analysis are explained in detail in the Methods chapter. The performance in terms of tracking the reference path is assessed by computing the errors in lateral position and longitudinal velocity. Statistical analysis using the Mann–Whitney U test does not indicate a significant difference across different stiffness values (p value > 0.05). As depicted in Fig. 5A, the drone does not experience drifts exceeding 0.2 m during the interaction. Although the data exhibits greater dispersion with increasing stiffness, the median values remain similar for all three stiffness levels, specifically at 0.084 m, 0.098 m, and 0.090 m, respectively. Figure 5B shows non-zero velocity errors, which are expected as the drone adjusts its speed during interaction with the environment. The medians of the velocity errors are similar across distributions, measuring 0.108 m s−1, 0.104 m s−1, and 0.109 m s−1, respectively. The maximum force values along the longitudinal axis are depicted in Fig. 5C. Values increase with stiffness, reflecting the drone’s need to push more to traverse stiffer obstacles. The median of the force is equal to 1.193 N, 1.272 N, and 1.670 N for the three values of stiffness. Statistical analysis reveals that the distributions of data, specifically for the low and high stiffness values, are statistically different from each other with a significance level of 95% (Mann–Whitney U test, p value < 0.05). The stability of the drone during interaction is assessed by analyzing the attitude oscillations (Fig. 5D, E). The amplitude of oscillations is calculated using the root mean square (RMS) of the roll angle ϕ and pitch angle θ. Across the three stiffness values, the drone exhibits minimal oscillations, with medians well within the admissible roll and pitch angle limits [−20, 20] deg. Specifically, the medians are reported as 2.664 deg, 2.100 deg, and 3.525 deg for the roll and 3.935 deg, 5.057 deg, and 5.828 deg for the pitch, respectively. Statistical analysis for roll oscillations indicates no significant difference among the data distributions (Mann–Whitney U test, p value > 0.05). In contrast, the distributions of data for pitch oscillations show statistical differences for some stiffness values (Mann–Whitney U test, *p < 0.05 between low and mid, and **p < 0.01 for low and high). This observation aligns with expectations, as the drone needs to pitch more to generate additional force when encountering obstacles with higher stiffness. The presented results imply that the performance of our approach in traversing compliant obstacles is consistent and independent of the obstacle compliance in the tested range, as further verified by the fact that the drone was capable of traversing in almost all the experiments (success rates over ten experiments reported in Fig. 5F).

Fig. 5: Performance of the NMPC in terms of path following and stability during the interaction phase for different values of stiffness.
figure 5

A tracking error of the lateral position; B longitudinal velocity; C max longitudinal force; D oscillations on the roll attitude; E oscillations on the pitch attitude. Mann–Whitney U test performed for all possible combination of distribution; box plots indicate median (middle line), 25th, 75th percentile (box) and 5th and 95th percentile (whiskers) as well as outliers (single points); number of tests used for the statistical analysis = 9 for each stiffness (over a total of ten experiments each); p > 0.05, *p ≤ 0.05, **p ≤ 0.01. F Success rate (SR %) of the proposed strategy for the different values of stiffness K.

Ablation study

The interaction versatility and adaptability demonstrated by the drone in the experiments arise from closely coupled body morphology and sensory driven control feedback. We conduct a series of experiments to illustrate that successful traversal of the obstacle cannot be achieved with either component alone (Fig. 6 and Supplementary Movie S3).

Fig. 6: Ablation study to validate the tight interplay between body morphology and sensory driven control feedback.
figure 6

A Drone embodying a non-streamlined, squared cage. B Nominal cage with high-friction material on the outer shell. C Drone embodying the nominal cage and exploiting a controller without external wrench feedback and desired impedance behavior. D Success rate (%) of the three approaches for the different values of stiffness K. We stopped at five experiments when we had five consecutive successes/failures. We continued to ten experiments in case of a mix of successes and failures to have a more representative and accurate success rate (mid stiffness, haptic sensing OFF).

Initially, we adopt a squared cage and conduct experiments for each of the three values of stiffness. The non-streamlined shape of the cage leads the yaw rotation of the drone to become constrained with the rotation of the surface. Consequently, the drone remains stuck in the Pushing mode and could not slide or realign with the straight path (test for mid stiffness in Fig. 6A). It is worth noting that defining thresholds, as done in previous works, might facilitate the transition into a lateral Sliding mode. However, this approach contradicts our strategy, which aims to demonstrate that successful traversal can be achieved using optimized body morphologies without the need for empirically tuned thresholds and switching conditions.

Then, we incorporate non-slip material on the nominal, disc-shaped cage in order to increase the friction on the outer shell. In this case the drone attempts to slide, but this results in aggressive maneuvers due to the high friction that hinders the transition to the Sliding mode (test for mid stiffness in Fig. 6B). In both cases the traversal failed in 100% of the experiments (Fig. 6D). These two sets of experiments validate the importance of a streamlined and low-friction body morphology that allows for transitions between the interaction modes, which are necessary for a successful traversal.

Lastly, we conduct experiments to demonstrate the importance of haptic sensing to inform the feedback control loop, both to monitor the effects of the wrench on the drone’s dynamics and for reacting to the interaction with the environment during traversal. To this end, we disable the haptic sensing, thereby removing the wrench measurements from the dynamics model and the impedance term in the NMPC formulation. This allows the controller to track the reference trajectory, but the interaction is treated only as a disturbance (test for mid stiffness in Fig. 6C). For low stiffness obstacles, trajectory tracking, coupled with the low-friction surface and streamlined shape of the shell, is sufficient for successful traversal due to the weak mechanical response of the environment (small wrenches involved and negligible oscillations). However, as the stiffness of the obstacle increases, the lack of haptic-driven control causes the drone to fail. For mid and high stiffness, the drone fails to traverse the obstacle (reaching instability) in 70% and 100% of the experiments respectively (success rate in Fig. 6D), due to the higher wrenches and notable oscillations. These experiments demonstrate that the drone cannot rely solely on morphology-enabled behaviors to successfully traverse stiffer obstacles. They confirm the crucial role of the closed-loop haptic feedback controller in sensing and dampening the oscillations induced by the compliant obstacles during the interaction.

Single branch traversal

Experiments are conducted using real branches (Fig. 7 and Supplementary Movie S4). The drone successfully traverses two branches—one branch without leaves (Fig. 7A) and the other one with small twigs and leaves (Fig. 7B)—both attached to a fixed structure at a single anchor point. The performance of the system is quantified using the evaluation metrics introduced in the previous analysis (reported in the “Methods” chapter). Table 1 highlights that errors in the lateral position remain close to zero across all experiments. The errors in longitudinal velocity, the longitudinal force, and the oscillations on the pitch angle, are smaller when compared to experiments with the foam plate. This reduction is attributed to the short interaction time and the rapid snapping away of the branches. The elongated shape and constraints of the branches results in a shorter and weaker interaction, leading to a quick Push-and-Slide mode. This is evident in Fig. 7C, illustrating the usage of Push-and-Slide mode due to increased longitudinal and lateral forces Fext,x and Fext,y, and torque around the vertical axis τext,z.

Fig. 7: Traversal of real vegetation.
figure 7

Still frames from experiments with two different branches, one without leaves (A) and one with small twigs and foliage (B) (lateral view). C Attitude and external wrench during the traversal of the branch with foliage, with highlighted Push-and-Slide mode (colored region). Commanded variables are reported with dotted lines.

Table 1 Quantitative results of the experiments with real branches

Discussion

Surveying biotic and abiotic factors of Earth’s ecosystems is essential to build the scientific knowledge needed to tackle the interconnected challenges of sustainability, climate change and declining biodiversity. Enabling drones to access cluttered vegetation would unlock the possibility to survey regions that cannot be sensed remotely by flying high in the sky. Drones designed for vegetation traversal hold the potential to revolutionize various crucial tasks, such as gathering environmental DNA in terrestrial ecosystems to conduct biodiversity surveys3 or deploying sensors in trees and crops for environmental monitoring and precision agriculture18,19,39.

In this work, we demonstrate that underactuated quadrotors can traverse a single obstacle with unknown and varying compliance through direct physical interaction. Our embodied APhI strategy harnesses the synergy between body morphology and haptic-based feedback control—both components are indispensable for successful traversal. The low-friction and streamlined shell grants the drone the ability to interact with and slide along obstacles with its entire body. A minimalist optimization-based controller commands the drone to fly along a straight trajectory and uses force feedback to effectively dampen oscillations of the environment, even in the presence of unknown and varying elastic responses. The versatility of our embodied APhI strategy is validated through a series of traversal experiments involving obstacles with compliance values spanning over an order of magnitude. Our approach demonstrates seamless handling of different interaction modes without the need for complex switching policies.

These results form a solid foundation for addressing the open research challenges needed for successfully traverse multiple compliant obstacles, as expected in the real world. Overcoming existing limitations requires a holistic advancement in the drone’s morphology, sensing capacity, and intelligence.

In the current prototype, the discoid shell leaves the propellers vulnerable to collisions with branches, twigs, and leaves from both above and below the drone. To mitigate this, a spherical protective cage can be employed. For instance, the authors have successfully utilized a hemispherical cage to safeguard the drone’s propellers during branch landings3. Additionally, an energy-absorbing cage has the potential to enhance resilience against collisions with stiff obstacles40. This enhancement could potentially relax the assumption of quasi-static motion, enabling navigation at higher speed.

The existing haptic sensing method measures the net wrench acting on the drone, which fails to discern the locations of individual contacts on the body and accurately measure local interaction forces. Preliminary simulation results indicate that this limits the robot’s ability to navigate environments with multiple compliant obstacles (refer to Supplementary Method 7 and Supplementary Movie S6). In scenarios where the drone attempts to traverse both soft and rigid obstacles simultaneously, it may become stuck on rigid obstacles due to its inability to detect paths of lower stiffness with a higher likelihood of traversability. Addressing this challenge requires higher-resolution haptic sensing, achievable through electronic skins41, visual haptic sensors or whisker arrays42, to estimate the compliance and traversability of obstacles. When combined with high-level path planning, the drone can use this information to plan trajectories toward more traversable areas. This integration, together with the extension of the haptic controller from 2D to 3D, will be crucial to effectively manage multiple interactions and to deploy the drone in complex natural environments.

Methods

Cages manufacturing

The frame of the shell was laser-cut (Trotec Speedy 360) from 2-mm medium-density fiberboard (MDF) panels. The components of the frame were connected via 3D-printed elements (Stratasys F120, ABS) and fixed with screws. The external surface of the shell was made of fiberglass (FR-40-HF, 0.2 mm) and connected to the frame via 3D-printed parts. The shell were designed such that only the external fiberglass surface can establish contact with the surroundings. Such a shell further shields the propellers and protects the inner components of the quadrotor. For the high-friction material, we laser cut strips of Dycem Non-Slip (Dycem Ltd). Figure 8 depicts the main cage, one with high-friction material on the shell, and the square variant.

Fig. 8: Three cages used during the experiments.
figure 8

A Streamlined, disc-shaped cage with low-friction shell. B Streamlined, disc-shaped cage with high-friction shell. C Non-streamlined, squared cage with low-friction shell.

Quadrotor dynamics

In this work, we make use of a world, inertial frame W with orthonormal basis \(\{{\hat{{{{{{{{\boldsymbol{x}}}}}}}}}}_{W},{\hat{{{{{{{{\boldsymbol{y}}}}}}}}}}_{W},{\hat{{{{{{{{\boldsymbol{z}}}}}}}}}}_{W}\}\) and a body frame B with orthonormal basis \(\{{\hat{{{{{{{{\boldsymbol{x}}}}}}}}}}_{B},{\hat{{{{{{{{\boldsymbol{y}}}}}}}}}}_{B},{\hat{{{{{{{{\boldsymbol{z}}}}}}}}}}_{B}\}\) represented in world coordinates, fixed to the quadrotor with the origin coinciding with its center of mass (Fig. 2A).

The quadrotor dynamics are described through a rigid-body approach in which the forces resulting from each propeller are combined in the thrust force vector T = [0, 0, mc]T—where c is the mass-normalized thrust—and into the torques τ around the body axis, both terms expressed in body frame B. Following the rigid-body approach we can write the translational and rotational dynamics of the drone’s CoM by deriving the state variables as follows—the dot ( · ) on the variables expresses their temporal derivative:

$$\dot{{{{{{{{\boldsymbol{p}}}}}}}}}= {{{{{{{\boldsymbol{v}}}}}}}}\\ \dot{{{{{{{{\boldsymbol{v}}}}}}}}}= -g{\hat{{{{{{{{\boldsymbol{z}}}}}}}}}}_{W}+{{{{{{{{\boldsymbol{R}}}}}}}}}_{B}^{W}({{{{{{{\boldsymbol{T}}}}}}}}+{{{{{{{{\boldsymbol{F}}}}}}}}}_{{{{{{\rm{ext}}}}}}})/m\\ \dot{{{{{{{{\boldsymbol{q}}}}}}}}}= {{{{{{{\boldsymbol{q}}}}}}}}\odot {\left[0 \, {{{{{{{{\boldsymbol{\omega }}}}}}}}}^{T}/2\right]}^{T}\\ \dot{{{{{{{{\boldsymbol{\omega }}}}}}}}}= {{{{{{{{\boldsymbol{J}}}}}}}}}^{-1}\left({{{{{{{\boldsymbol{\tau }}}}}}}}-{{{{{{{\boldsymbol{\omega }}}}}}}}\times ( \, {{{{{{{\boldsymbol{J}}}}}}}}{{{{{{{\boldsymbol{\omega }}}}}}}})+{{{{{{{{\boldsymbol{\tau }}}}}}}}}_{{{{{{\rm{ext}}}}}}}\right)$$
(1)

The position and velocity of the quadrotor’s CoM are \({{{{{{{\boldsymbol{p}}}}}}}}={[{p}_{x},{p}_{y},{p}_{z}]}^{T}\) and \({{{{{{{\boldsymbol{v}}}}}}}}={[{v}_{x},{v}_{y},{v}_{z}]}^{T}\), both expressed in the world frame W. The body rates \({{{{{{{\boldsymbol{\omega }}}}}}}}={[{\omega }_{x},{\omega }_{y},{\omega }_{z}]}^{T}\), instead, are in body frame B. The quaternion \({{{{{{{\boldsymbol{q}}}}}}}}={[{q}_{w},{q}_{x},{q}_{y},{q}_{z}]}^{T}\) defines the orientation of the quadrotor; the rotation matrix that maps from body frame to world frame (function of q) is denoted as \({{{{{{{{\boldsymbol{R}}}}}}}}}_{B}^{W}\), and can be also expressed with Euler angles ϕ, θ, ψ (roll, pitch, yaw). The symbol  denotes the quaternion multiplication operator. Further, m is the mass of the platform, g = 9.81 m s−2 is the gravitational acceleration, along the opposite direction of \({\hat{{{{{{{{\boldsymbol{z}}}}}}}}}}_{W}\), and J = diag(Jx, Jy, Jz) is the inertia matrix. Finally, Fext and τext are respectively the external force and torque acting on the drone during the interaction—the external wrench wext acting on the CoM is defined as \({[{{{{{{{{\boldsymbol{F}}}}}}}}}_{{{{{{\rm{ext}}}}}}}^{T}{{{{{{{{\boldsymbol{\tau }}}}}}}}}_{{{{{{\rm{ext}}}}}}}^{T}]}^{T}\in {{\mathbb{R}}}^{6}\).

NMPC formulation

For the NMPC problem we define the state x and the input u of the system as follows:

$${{{{{{{\boldsymbol{x}}}}}}}}={[{{{{{{{{\boldsymbol{p}}}}}}}}}^{T}{{{{{{{{\boldsymbol{v}}}}}}}}}^{T}{{{{{{{{\boldsymbol{q}}}}}}}}}^{T}{{{{{{{{\boldsymbol{\omega }}}}}}}}}^{T}]}^{T}\in {{{{{{{\mathcal{X}}}}}}}}\in {{\mathbb{R}}}^{13}\\ {{{{{{{\boldsymbol{u}}}}}}}}={[c \, {{{{{{{{\boldsymbol{\tau }}}}}}}}}^{T}]}^{T}\in {{{{{{{\mathcal{U}}}}}}}}\in {{\mathbb{R}}}^{4}$$
(2)

Then, the discrete dynamics of the quadrotor xk + 1 = f(xk, uk, wext,k) are obtained by discretizing the equations of motion with an explicit Runge–Kutta method of the 4th order. We define a quadratic optimization problem using a multishooting scheme and solve the following discretized nonlinear optimal control problem (OCP):

$$\mathop{\min }\limits_{{{{{{{{{\boldsymbol{u}}}}}}}}}_{k}} \parallel {{{{{{{{\boldsymbol{h}}}}}}}}}_{N}({{{{{{{{\boldsymbol{x}}}}}}}}}_{N}){\parallel }_{{Q}_{N}}^{2}+\mathop{\sum }\limits_{k=0}^{N-1}\left(\parallel {{{{{{{{\boldsymbol{h}}}}}}}}}_{x}({{{{{{{{\boldsymbol{x}}}}}}}}}_{k}){\parallel }_{{Q}_{x}}^{2}+\parallel {{{{{{{{\boldsymbol{h}}}}}}}}}_{u}({{{{{{{{\boldsymbol{u}}}}}}}}}_{k}){\parallel }_{{Q}_{u}}^{2}\right)\\ \,{{\mbox{s.t.}}}\, \quad{{{{{{{{\boldsymbol{x}}}}}}}}}_{k+1}={{{{{{{\boldsymbol{f}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{k},{{{{{{{{\boldsymbol{u}}}}}}}}}_{k},{{{{{{{{\boldsymbol{w}}}}}}}}}_{{{{{{\rm{ext}}}}}},k})\quad k=0,...,N-1\\ \quad{{{{{{{{\boldsymbol{x}}}}}}}}}_{0}={{{{{{{{\boldsymbol{x}}}}}}}}}_{{{{{{\rm{init}}}}}}},\quad {{{{{{{{\boldsymbol{x}}}}}}}}}_{{{{{{\rm{min}}}}}}}\le {{{{{{{{\boldsymbol{x}}}}}}}}}_{k}\le {{{{{{{{\boldsymbol{x}}}}}}}}}_{{{{{{\rm{max}}}}}}}\\ \quad{{{{{{{{\boldsymbol{u}}}}}}}}}_{{{{{{\rm{min}}}}}}}\le {{{{{{{{\boldsymbol{u}}}}}}}}}_{k}\le {{{{{{{{\boldsymbol{u}}}}}}}}}_{{{{{{\rm{max}}}}}}}$$
(3)

as a sequential quadratic program (SQP), executed in a real-time iteration scheme43, with a receding-horizon—we discretize the system evolution into N steps over a time horizon t, and k is the current time step. The goal cost hN(xN), the tracking cost hx(xk), and the action regularization cost hu(uk) refer to the objective cost vectors of the optimal control problem, which is implemented using the open source ACADO toolkit44.

Constraints

In the OCP, we define constraints on some components of the input and state vectors, specifically on the mass-normalized thrust and the orientation, applied at each time step k:

$$0\le {c}_{k}\le {c}_{{{{{{\rm{max}}}}}}}\\ -{\phi }_{{{{{{\rm{min}}}}}}}\le {\phi }_{k}\le {\phi }_{{{{{{\rm{max}}}}}}}\\ -{\theta }_{{{{{{\rm{min}}}}}}}\le {\theta }_{k}\le {\theta }_{{{{{{\rm{max}}}}}}}$$
(4)

where the roll and pitch angles ϕk and θk are converted from the quaternion—via a direct trigonometric formula—before performing the optimization. Whereas constraining the thrust depends on physical limitations due to the hardware, we artificially constrain the orientation—in our case the roll and pitch angles—to limit the forces and torques exchanged with the environment. Since the interaction task is defined in the quadrotor CoM, we have to consider that its underactuation prevents direct control of body wrenches, thus imposing the drone to tilt in order to apply forces and torques on the plane orthogonal to the vertical axis (i.e., the push direction and the sliding plane). Having constraints on the angles allow us to ensure stable flight during the interaction, which, in combination with low velocities, ensures small deviations from the translational equilibrium state. For theoretical guarantees on the stability of underactuated drones during physical interaction, we refer the readers to ref. 45.

Objective cost vectors and weights

In the objective cost, we distinguish three cost vectors:

$$\begin{array}{rcl}{{{{{{{{\boldsymbol{h}}}}}}}}}_{x}({{{{{{{{\boldsymbol{x}}}}}}}}}_{k})&=&\left[\begin{array}{c}{p}_{y,k}-{p}_{y,{{{{{\rm{ref}}}}}}}\\ {p}_{z,k}-{p}_{z,{{{{{\rm{ref}}}}}}}\\ {{{{{{{{\boldsymbol{v}}}}}}}}}_{k}-{{{{{{{{\boldsymbol{v}}}}}}}}}_{{{{{{\rm{ref}}}}}}}\\ {\dot{{{{{{{{\boldsymbol{v}}}}}}}}}}_{k}-{\dot{{{{{{{{\boldsymbol{v}}}}}}}}}}_{{{{{{\rm{imp}}}}}}}\\ {\psi }_{k}-{\psi }_{{{{{{\rm{ref}}}}}}}\\ {{{{{{{{\boldsymbol{\omega }}}}}}}}}_{k}-{{{{{{{{\boldsymbol{\omega }}}}}}}}}_{{{{{{\rm{ref}}}}}}}\end{array}\right]\in {{\mathbb{R}}}^{12}\\ {{{{{{{{\boldsymbol{h}}}}}}}}}_{u}({{{{{{{{\boldsymbol{u}}}}}}}}}_{k})&=&\left[\begin{array}{c}c-{c}_{{{{{{\rm{ref}}}}}}}\\ {{{{{{{\boldsymbol{\tau }}}}}}}}-{{{{{{{{\boldsymbol{\tau }}}}}}}}}_{{{{{{\rm{ref}}}}}}}\end{array}\right]\in {{\mathbb{R}}}^{4}\\ {{{{{{{{\boldsymbol{h}}}}}}}}}_{N}({{{{{{{{\boldsymbol{x}}}}}}}}}_{N})&=&\left[\begin{array}{c}{p}_{y,N}-{p}_{y,{{{{{\rm{ref}}}}}}}\\ {p}_{z,N}-{p}_{z,{{{{{\rm{ref}}}}}}}\\ {v}_{x,N}-{v}_{x,{{{{{\rm{ref}}}}}}}\end{array}\right]\in {{\mathbb{R}}}^{3}\end{array}$$
(5)

where we denote quantities related to the reference path with subscript “ref” and quantities computed by the internal impedance module with subscript “imp”.

The first two vectors hx(xk) and hu(uk) keep track of the error (for a subset of the state and for the input) and the interaction, for each step of the receding horizon. They consist of a position term, only on the lateral and vertical directions, to prevent the drone from drifting from the path, and a velocity term for progression, assigned to all directions to keep a longitudinal velocity along the path and zero velocity on the other two directions. Another term takes into account the mismatch between the quadrotor dynamics and desired impedance dynamics, which is needed to handle a safe physical interaction. A yaw term is used to keep the platform at a fixed yaw angle (aligned with the path), and finally the angular velocity, thrust, and torque terms act as regularization terms (reference thrust is set to hovering value, and angular velocity and torques set to zero, valid for both free-flight and interaction). To follow a straight path, our choice of assigning a reference velocity instead of a reference position (on the longitudinal axis) simplifies the implementation, as the reference velocity can be set at the beginning and kept fixed, whereas a reference position would need to be updated at each iteration as the drone moves forward. The last cost vector hN(xN) acts as a terminal cost since it only depends on the terminal state. We can distinguish a position term needed for path following (two directions) and a velocity term (only along the reference path direction) needed for progression.

The cost vectors’ weighted norms are multiplied by the matrices \({{{{{{{{\boldsymbol{Q}}}}}}}}}_{x}\,\in {{\mathbb{R}}}_{\ge 0}^{12\times 12},{{{{{{{{\boldsymbol{Q}}}}}}}}}_{u}\,\in {{\mathbb{R}}}_{\ > \ 0}^{4\times 4}\), and \({{{{{{{{\boldsymbol{Q}}}}}}}}}_{N}\,\in {{\mathbb{R}}}_{\ge 0}^{3\times 3}\), which are constant throughout the prediction horizon. Regarding the velocity term in the matrix Qx, different coefficients can be used for the velocity along the path following direction (\({Q}_{{v}_{x}}\)) and the remaining two directions (\({Q}_{{v}_{y,z}}\)). The terminal weights of QN have been tuned and chosen by performing physics-based simulations in the Gazebo 3D simulator. Considering the tracking of the reference path as well as a safe, quasi-static interaction as performance metrics, we tuned and selected the weights that allowed us to generalize the robot performance over different values stiffness.

Desired impedance behavior for physical interaction

The desired impedance acceleration is computed as the one of a rigid body with a specific impedance—mass, damping, and stiffness—subjected to an external force acting on it. In such a way, we can reshape the apparent mechanical characteristics of the robot:

$$\begin{array}{r}{\dot{{{{{{{{\boldsymbol{v}}}}}}}}}}_{{{{{{\rm{imp}}}}}}}={{{{{{{{\boldsymbol{M}}}}}}}}}^{-1}\left(-{{{{{{{\boldsymbol{D}}}}}}}}({{{{{{{\boldsymbol{v}}}}}}}}-{{{{{{{{\boldsymbol{v}}}}}}}}}_{{{{{{\rm{ref}}}}}}})-{{{{{{{\boldsymbol{K}}}}}}}}({{{{{{{\boldsymbol{p}}}}}}}}-{{{{{{{{\boldsymbol{p}}}}}}}}}_{{{{{{\rm{ref}}}}}}})+{{{{{{{{\boldsymbol{F}}}}}}}}}_{{{{{{\rm{ext}}}}}}}\right)\end{array}$$
(6)

where the three positive-definite diagonal matrices M, D and \({{{{{{{\boldsymbol{K}}}}}}}}\in {{\mathbb{R}}}_{\ge 0}^{3\times 3}\) define the apparent mass, damping, and stiffness of the desired dynamics of the vehicle.

We selected the mass of the drone (1.2 kg) as a suitable value for the diagonal coefficients of M. Then, in order to achieve a safe and smooth behavior, as well as to properly dampen eventual oscillations provoked by the elastic response of the obstacles, we select the damping coefficients of D equal to 1 to have the same order of magnitude of the apparent mass. We select K = 03×3 and the external force only on the yz axis and to be positive. This choice is useful because: (1) we predominantly want a damping behavior during the interaction, discarding additional elastic behavior of the system in response to the interaction, and (2) we want the drone to push against the obstacle in the direction opposite of the interaction force. In such a way, similarly to relevant work in human-robot interaction46, the robot can indirectly be guided toward the direction of traversal when the obstacle moves aside. Further, as highlighted in ref. 47, for unstructured environments it is safer to have low values of apparent stiffness when the reference speed is low.

Statistical analysis

The statistical analysis reported in the “Results” chapter quantifies the performance and repeatability of our solution. To obtain the distributions of data that we used for the statistical analysis of the performance for varying stiffnesses, we only consider the interval of time when interaction occurs (first contact to detachment) for each experiment. We define this interval as [1, M] with M equal to the number of samples during the interaction, and extract the following metrics:

  • The tracking error of lateral position over the interaction interval, by computing the mean absolute error (MAE): \({e}_{p}=\frac{1}{M}\mathop{\sum }\nolimits_{k=1}^{M}| {p}_{y,k}-{p}_{y,{{{{{\rm{ref}}}}}}}|\). This metric describes how close the drone is to the straight reference path.

  • The tracking error of longitudinal velocity during the interaction interval, using the MAE as above: \({e}_{v}=\frac{1}{M}\mathop{\sum }\nolimits_{k=1}^{M}| {v}_{v,k}-{v}_{v,{{{{{\rm{ref}}}}}}}|\). This metric is expected to deviate from zero during the interaction, due to the response of the environment impeding the drone’s motion.

  • The interaction force along the longitudinal axis, by saving the maximum value during the interaction interval: \({{{{{\rm{max}}}}}}(| {F}_{{{{{{{\rm{ext}}}}}}}_{x},k}| )\) with k = [1, M]. This metric is connected to stability as it tracks high forces that may lead to undesirable behavior.

  • The amplitude of the oscillations occurring on the attitude of the drone; we define this quantity by computing the RMS (root mean square) for both roll ϕ and pitch θ: \({{{{{\rm{RMS}}}}}}(\phi )=\sqrt{(\mathop{\sum }\nolimits_{k=1}^{M}{\phi }_{k}^{2})/M},{{{{{\rm{RMS}}}}}}(\theta )=\sqrt{(\mathop{\sum }\nolimits_{k=1}^{M}{\theta }_{k}^{2})/M}\). This metric also refers to stability as it shows whether the drone is subject to abrupt oscillations on the attitude during the interaction.

Thus, for N experiments, we have a distribution composed of N values for the introduced metrics. The Mann–Whitney U test was performed in MATLAB R2021a (MathWorks, MA, USA). The “boxplot” function is used to create box plots, which provides median, 25th and 75th percentiles (which are also called first quartile Q1 and third quartile Q3), 5th and 95th percentile, and outliers. The latter are computed in a box plot based on the interquartile range (IQR), which is the difference between the Q3 and Q1 of the dataset. The lower bound for detecting outliers is calculated as Q1 − 1.5*IQR, whereas the upper bound for detecting outliers is calculated as Q3 + 1.5*IQR. However, it is important to note that the factor of 1.5 used in calculating the outlier thresholds can be adjusted based on specific needs or domain-specific standards. Finally, the “ranksum” function is used to compute the p values.