*4.2. Experiments in the Simulated Environment*

The simulation experiments were conducted in the Gazebo simulator [8]. We designed two sets of experiments: one evaluated the system under the same initial conditions; a second set of tests aimed at evaluating the robustness of the system as a whole and the utility of our novel re-localization module in particular.

#### 4.2.1. Experiments under the Same Initial Conditions

In this set of experiments, the system was re-launched every time so as to have the same initial conditions for every try. Moreover, the landing platform followed two different trajectories, namely linear and circular. A total of 20 takeoff-tracking-landing maneuvers were executed, 10 for each trajectory type, always re-initiating the whole system for every new test. Within a trajectory type, we tested the two variants of our tracking algorithm, i.e., w/ and w/o prediction. In all experiments, we computed the Euclidean distance between the landing platform's centroid and the UAV's body frame with respect to the latter. In the following, we will denote this as the *error*. Note that this error only coincides with the error fed to our height-adaptive PID controller in the mode w/o prediction. The details of the two types of trajectories together with the results obtained in each case are described next.

**Linear trajectory.** The UGV (and thus the landing platform) describes a linear trajectory at a speed of 0.5 m s−<sup>1</sup> along its x axis. Initially, both the UGV and the UAV are at rest, with the latter lying on the landing platform. After a takeoff signal, the aerial vehicle begins its ascent phase to a pre-defined height of 4 m, and the UGV starts moving along a linear trajectory. Upon detection of the landing platform, the UAV automatically begins to follow the UGV by reducing its distance to the latter in the xy-plane, as explained in previous sections. After 30 s in tracking mode, a landing signal is sent automatically to the drone, which begins its descent towards the UGV.

Figure 6 shows the trajectory described by the UAV and the UGV for a single experiment of the linear trajectory. Results for both the non-predictive and predictive modes of the controller are presented. At first glance, no notable differences can be appreciated. The system w/ prediction is, however, more stable than its non-predictive counterpart as can be noted by visualizing the slightly more smooth curves in Figure 6b compared to those in Figure 6a. Importantly, note the scale of the y axis in Figure 6a,b and how the trajectory of the UAV is bounded within roughly 3 cm after the first 5 m in both cases (w/ and w/o prediction), following almost perfectly the linear trajectory described by the landing platform.

Figure 7 plots the error along both the x and y axis for a single experiment of the linear trajectory. As with the previous figures, results for both for the non-predictive and predictive variants are shown. Note that the error along the UAV's y axis is close to zero for both modes (w/ and w/o prediction), as was expected in the case of a linear trajectory. As for the error along the x axis, the general trend is similar in both modes, though more bounded for the algorithm w/ prediction. The big initial peak in Figure 7a is due to the fact that the UGV starts moving at the same time that the UAV takes off, thus generating a relatively large initial error along the x axis that is corrected after the first 10 s of simulation.

**Figure 6.** Views of the movements of the UGV and the UAV during a linear trajectory experiment.

**Figure 7.** Errors for a linear trajectory sequence.

**Circular trajectory.** In this experiment, the UGV describes circles with a forward speed along its x axis of 0.5 m s−<sup>1</sup> and an angular velocity along its z axis of 0.05 rad s−1. In theory, this would result in a circular trajectory of radius 10 m. In practice, due to the friction coefficient of the UGV's wheels, it results in a circle of radius 12 m in this particular case. Note that the takeoff-tracking-landing procedure described for the linear trajectory is also followed here.

Figure 8 shows the trajectory described by the UAV and the UGV for a single experiment of the circular trajectory. As with previous figures, results for both the non-predictive and predictive variants are presented for comparison. Note how the UAV's trajectory resulting from the system w/ prediction matches that of the landing platform slightly better than in non-predictive mode, especially in the region between 6 and 8 m along the x axis.

Similarly, Figure 9 plots the error along both the x and y axis for a single experiment of the circular trajectory. Once again, non-predictive and predictive approaches are compared. The reader will again note that the system leveraging a predictive action outperforms its non-predictive counterpart in terms of a smaller error overall, both along the x and the y axis.

**Figure 8.** Views of the movements of the UGV and the UAV during a circular trajectory experiment.

**Figure 9.** Errors for a circular trajectory sequence.

4.2.2. Overall Results in the Simulated Environment for a Linear and Circular Trajectory

Figure 10 reports the errors in the x and y axis, respectively, for all 20 experiments. Each box within a boxplot represents five experiments, where for each experiment we computed the mean error value of the whole trajectory (from takeoff until landing).

Note that the mean error in all cases was always lower than 0.12 m. Note as well how for both trajectory types (linear and circular) and for both the error in the x and y axes, the variant w/ prediction achieved lower error than its non-predictive counterpart.

In particular, the error along the x axis (Figure 10a) for a linear trajectory was around 0.10 cm on average for the system w/o prediction and around 0.04 cm for the system w/ predictive action; for a circular trajectory, this error was smaller in general terms: around 0.04 cm for the system w/o prediction and close to zero when employing the predictive height-adaptive PI controller.

With regards to the error along the y axis (Figure 10b), for a linear trajectory the mean error for all ten experiments (five for each mode, i.e., w/o and w/ prediction) was very small with almost no dispersion of the data at all. For the circular trajectory, the error produced by the non-predictive tracking algorithm was in the range of 0.06 cm, while the system leveraging the Kalman filter achieved lower errors in the range of 0.03 cm.

**Figure 10.** Comparison of the errors between linear and circular trajectories, both for the non-predictive (w/o pred) and predictive (w/ pred) variants.

Overall, the system performed robustly in all tests, managing to land flawlessly in all cases. We have therefore demonstrated how an approach based on a predictive height-adaptive PI controller

outperforms its non-predictive counterpart, allowing the UAV to follow and land on the moving landing platform consistently, performing a more stable and accurate flight.

### 4.2.3. Experiments to Test the Life-Long Operation Capabilities of the System

To further demonstrate the robustness of our algorithm and its life-long operation capability, we carried out the following experiment: we launched the system once and let the UAV perform up to a maximum of 50 takeoff-tracking-landing maneuvers continuously. For every iteration, 10 s pass from the moment of takeoff before an automated landing signal is sent. Once the UAV lands, it rests for 1 s on top of the landing platform before taking off again to complete a new takeoff-tracking-landing maneuver.

This test was carried out for a circular trajectory and for two different velocity conditions of the landing platform, resulting in a total of 100 attempted maneuvers: on the one hand, nominal conditions (*vx* = 0.5 m s−1, *wz* = 0.05 rad s−1); and, on the other hand, more demanding conditions (*vx* = 0.7 m s−1, *wz* = 0.07 rad s−1). Note that, in practice, the UGV model, i.e., the Summit XL, rarely reaches linear speeds higher than *vx* = 0.7 m s−1, commonly operating at a nominal speed of 0.5 m s−<sup>1</sup> along its x axis. However, we wanted to evaluate our re-localization module thoroughly under more challenging conditions. We used our best-performing system, namely our system based on a predictive, height-adaptive PID controller. Figure 11 visualizes the trajectories described by both the UAV and the UGV for the two speed conditions mentioned above.

Note that, in practice, the trajectory followed by the UGV is never exactly a circle due to the wheels' friction coefficients. Moreover, the UGV also drifted in time, thus resulting in various circles centered in different locations, as can be seen in Figure 11.

As gathered in Table 2, for a velocity of (*vx* = 0.5 m s−1, *wz* = 0.05 rad s−1) the system managed to land the aerial vehicle successfully in all 50 consecutive maneuvers with a Mean Absolute Error (MAE) along the UAV's x axis of 0.127 m and 0.245 m along its y axis. Moreover, the maximum absolute error along the x and y axes was 0.734 m and 0.653 m, respectively. When operating at a higher velocity (*vx* = 0.7 m s−1, *wz* = 0.07 rad s−1), the re-localization module had to be launched 16 times, leaving a total of 34 successful landings. In this case, the MAE along the UAV's x axis was 0.245 m and 0.232 m along the y axis, and the maximum absolute errors were 1.526 m and 1.441 m for the x and y axes, respectively.

**Figure 11.** *Cont.*

**Figure 11.** Trajectories described by the UAV (red) and the UGV (green) when performing a total of 50 consecutive takeoff-tracking-landing maneuvers continuously for two different linear and angular speeds of the UGV.

**Table 2.** Statistics for the life-long capability experiments. Linear velocities (*vx*) are given in m s−<sup>1</sup> and angular velocities (*wz*) in rad s−1.


Note that all 16 recovery maneuvers under the more challenging conditions were triggered not because the UAV lost sight of the landing platform, but due to a too large error—greater than 0.25 m in our experiments—in the moments before landing. Such an early detection of potential failed landings allows the system to avoid accidents and flawlessly continue functioning even under challenging velocity conditions of the landing platform. An example of a relocalization maneuver can be viewed in Figure 12. Moreover, Figure 13 shows the error along the UAV's z axis during the first 200 s of the experiment for both velocity conditions studied. Overall, the rate of successful landings was 100% for the nominal velocity of the UGV and 68% in the case of more challenging (and rather unusual) conditions.

In this subsection, we demonstrated how our system performs flawlessly at the nominal speed of the UGV. More importantly, we have shown that by leveraging our novel recovery module, potential failed landing maneuvers can be detected and avoided, thus demonstrating the great benefits that such a system brings about, both in terms of robustness and reliability.

**Figure 12.** Detail of the 3D trajectory for a velocity of (*vx* = 0.7 m s−1, *wz* = 0.07 rad s−1) where a re-localization maneuver takes place. The run-time interval represented is [47.79 s, 99.84 s].

**Figure 13.** Error along the z axis (relative UAV-UGV distance along the z axis) during the first 200 s for both velocity conditions studied. (**b**) shows three re-localization maneuvers.
