Probabilistic Meta-Conv1D Driving Energy Prediction for Mobile Robots in Unstructured Terrains

Driving energy consumption plays an important role in the navigation of autonomous mobile robots in off-road scenarios. However, the accuracy of the driving energy predictions is often affected by a high degree of uncertainty due to unknown and constantly varying terrain properties, and the complex wheel-terrain interaction in unstructured terrains. In this paper, a probabilistic deep meta-learning approach is proposed to model the existing uncertainty in the driving energy consumption and efficiently adapt the probabilistic predictions based on a small number of local measurements. The method expands upon an existing deterministic deep-meta learning model that, in contrast, only provided single-point energy estimates. The performance of the proposed method is compared against the deterministic approach in a 3D-body dynamic simulator over several typologies of deformable terrains and unstructured geometries. In this way, the benefits of the proposed method are illustrated to enhance the predictions with informative probabilistic considerations, which can be crucial to the safety of mobile robots traversing challenging, unstructured environments.


I. INTRODUCTION
A UTONOMOUS mobile robots (AMRs) can be applied in a variety of tasks requiring them to traverse rough, unstructured terrains, such as search and rescue activities, nuclear plant inspections, agriculture, and planetary exploration.In these scenarios, the driving energy consumption (i.e., the energy expended by the AMR traction system) plays a crucial role in the success and efficiency of the mission [1] [2] [3].Indeed, AMRs in off-road scenarios have often limited energy supplies and their activities involve moving for long distances.Therefore, an accurate estimation of the AMR driving energy consumption is critical to minimize the time spent recharging, thereby ensuring longer periods of continuous operations.
In off-road scenarios, the driving energy consumption is a complex function of (1) the terramechanical properties of the terrain (i.e., its mechanical characteristics and its response to vehicular loading and shear stress) and (2) the geometry of the terrain [4].Particularly, in natural environments, several types of terrains with different characteristics may be encountered, ranging from sand, mud, rocks, and a multitude of intra-classes.However, the terramechanical properties of a terrain are often a priori unknown, can constantly change, and are challenging to estimate online [5]- [8].
Regarding the geometry of the terrain, previous works have commonly considered the terrain as a uniformly-sloped surface whose inclination is the only energy-relevant geometric factor [9]- [12].However, many areas in off-road environments contain complex, unstructured geometries, such as scattered rocks, steps, bumps, and rough terrain.Traversing unstructured geometries can induce complex motion dynamics, uncertain wheel-terrain interactions, and can pose increased challenges to the AMR locomotion and control system [13].
Such complex interplay between varying, unknown terrain properties, unstructured geometries, and its effect on the driving energy consumption, is challenging to model and is affected by considerable uncertainty.However, failing at estimating the driving energy consumption can be detrimental to the safety and efficiency of the AMR.For example, an excessive underestimation of the driving energy may cause the robot to run out of battery and stop ahead of time in a precarious position, causing critical damage to the robot and/or the abortion of the mission.Hence, providing a singlepoint estimation of driving energy consumption may carry an unacceptable degree of risk, due to the safety-critical nature of many applications in off-road scenarios [14].In contrast, an approach is desirable that can explicitly reason about the uncertainty in the driving energy prediction.
In a previous work [15], we proposed a meta-learning approach (called Meta-Conv1D), based on deep neural networks, to learn and adapt the driving energy prediction model of an AMR traversing terrains with (1) unknown and varying terramechanical properties and (2) complex unstructured geometries.Specifically, Meta-Conv1D demonstrated the capability to efficiently adapt its energy estimates to unknown terrains based on a small number of local measurements and to analyse the effect of unstructured geometries on the driving energy consumption using Convolutional 1D (Conv1D) neural networks (Section III).However, Meta-Conv1D could only provide single-point energy estimates, while no consideration about the uncertainty of its estimations was provided.In contrast, in many realistic scenarios, the local measurements may not carry enough information to adapt the energy model with high certainty.Moreover, while Meta-Conv1D demonstrated superior performance to previous state-of-theart methods, its estimates were still affected by increasingly large errors in particularly rough, unstructured environments.
In this paper, 1) Our primary contribution is a probabilistic re-framing of the Meta-Conv1D approach.First, we analyze the main factors contributing to the driving energy prediction uncertainty (Section IV).Then, we propose the integration of different probabilistic distribution models within the Meta-Conv1D meta-learning framework 1 (Section V).
2) We provide experimental results of our method, in simulation, over several types of natural terrains and unstructured geometries (Section VI) and we compare its performance with the deterministic Meta-Conv1D approach (Section VII).
3) We show that our method can correctly model the existing uncertainty in the driving energy prediction caused by (1) the lack of information in the few local measurements used to adapt the energy model (Section VII-A) and (2) the influence of traversing complex, unstructured geometries (Section VII-A and VII-B).Hence, while the standard Meta-Conv1D approach could only provide single-point estimates, often affected by large errors in the more uncertain scenarios, the proposed probabilistic method yields more descriptive 1 Our approach is made available at META-CONV1D-PROB.
uncertainty-aware predictions which can be beneficial to AMRs traversing challenging, off-road environments.

II. RELATED WORKS
Driving energy prediction methods for AMRs in off-road scenarios typically falls into two categories: (1) physics-based and (2) data-driven.Several works have developed physicsbased models that can provide analytical descriptions of the AMR wheel-terrain interaction.Hence, the models can provide accurate estimates of the AMRs contact forces, drawbar pull, as well as driving energy consumption in many natural terrains [16] [17].However, analytical methods have often demonstrated only approximate modeling of the actual mechanical behavior of many types of terrain [8].Moreover, they require the knowledge of terrain-dependent parameters that are often a priori unknown and difficult to estimate online.Finally, they are often computationally expensive, making them ill-suited for the implementation into fast-paced planning frameworks [18].
To overcome the challenges of physics-based approaches, different methods have been proposed to directly learn energy models from collected data.For example, several methods have categorized the environment as made of a set of distinct terrain classes [19] [20].Then, terrain classifiers can be adopted to identify the terrain category, while sensors such as LIDAR or stereo vision estimate the terrain geometry [21].Hence, different data-driven energy models, such as semiempirical functions [9], [12], [22], look-up tables [10], or neural networks [11] [13] can be adopted to link the terrain geometry to the driving energy consumption for each terrain type.However, these methods cannot account for terrains with unknown properties.
Differently from considering distinct terrain categories, Higa et al. [23] proposed a global energy model that analyzes RGB and depth images, based on 2D convolutional neural networks, to determine, at distance, the terramechanical properties and the driving energy consumption of a terrain.However, the prediction of driving energy consumption from images assumes a strong correlation between the terrain's visual appearance and its properties.This is often not true in off-road scenarios as terrains with similar visual appearances may have, in contrast, very different characteristics, thereby requiring different energy costs to be traversed.Moreover, their method was based on the off-line training of a large and representative dataset, while possible online adaptation to unforeseen terrain conditions was not considered.
Given the difficulty of modeling all possible terrain variations in advance, online adaptation algorithms can represent crucial assets.In this context, meta-learning offers a promising approach to enable rapid adaptation based on limited amounts of data [24].Other works have proposed the use of meta-learning for the online adaptation of robotic platforms [25]- [28].However, little attention has been given to the problem of driving energy prediction in unstructured terrains.As previously stated, an energy-aware deep metalearning framework was presented, in [15], called Meta-Conv1D, to predict, adapt, and plan over terrains with unknown and varying terramechanical properties and complex unstructured geometries.However, Meta-Conv1D could only provide single-point energy estimates, while no consideration about the uncertainty of its estimations was given.
Few works have proposed prediction algorithms for AMRs in unstructured environments that are both adaptive and provide probabilistic estimates of traversability metrics.In [29], a Gaussian process was proposed to build, and refine over various loops, a probabilistic energy map of a robot traversing an unknown terrain, while exploration was encouraged to converge to a minimum energy tour of the environment.However, this method is impractical for robots that explore new environments and do not perform repetitive loops.In [30], probabilistic slip models were learned for visually classified terrain types using Gaussian process regression.Then, a second Gaussian process leveraged spatial correlations in slip data for online slip model adaptation.However, this method still relied on the assumption of discretized terrain types and only considered the adaptation to small intraclass variations.Moreover, only the inclination of the terrain (i.e., pitch and roll) was considered as relevant geometric factor.Conversely, the Gaussian process is often computationally expensive and cannot scale to high-dimensional 3D geometric inputs, which are characteristic of highly unstructured environments.In [31], a meta-learning-based approach was proposed to adapt probabilistic predictions of two terramechanical parameters using neural networks and Bayesian linear regression.Then, a standard physics-based model [32] was adopted to link the two terramechanical parameters to the AMR dynamic.Hence, this method still suffered from the limitations of physics-based models mentioned above.Moreover, it only considers laterally symmetric motions in uniformly-sloped environments (i.e. the right and left wheels had identical motion and driving torques), while the interaction of more complex, unstructured, and non-uniform terrains was not considered.

III. BACKGROUND ON META-CONV1D
In this paper, we exploit the Meta-Conv1D meta-learning framework and we extend it to consider probabilistic estimates.Meta-Conv1D has the advantage of end-to-end machine learning models in that no specific domain knowledge is required for their implementation while driving energy prediction and adaptation are entirely based on the collected data.Moreover, Meta-Conv1D enables the processing of high dimensional 3D geometric data, by means of Conv1D neural networks, thereby improving the prediction performance in highly unstructured, non-symmetric, environments.
In this section, related background information on the Meta-Conv1D methodology is provided.

A. CONV1D GEOMETRIC ANALYSIS
The terrain geometry is preprocessed using Conv1D neural networks.Conv1D analysis has reported remarkable capabilities to better capture complex wheel-terrain interactions over unstructured terrains, thereby leading to more accurate energy predictions in these scenarios [13] [15].An illustration of the procedure is given in Fig 1 .First, the terrain point cloud is downsampled into a 2D-voxel grid and rearranged such that each row can be seen as the terrain elevation under a section of the robot along its width at a specific time, while each column represents the time evolution of the terrain under that section as the robot advances along the trajectory (see Fig. 1a).Then, the 2D-voxel grid is fed to a Conv1D neural network which analyses the terrain geometry along the temporal axis and outputs the latent geometric representation x g (see Fig. 1b).For brevity of the paper, the details are referred to [15].In this paper, we set the voxel discretization, trajectory length, and the Conv1D architecture to be the same as in [15].

B. META-LEARNING
Meta-learning is concerned with learning algorithms that can efficiently adapt to new tasks.In line with [15], we exploit the meta-learning black-box approach that can be formally expressed as: L(f θ (x ts j , D tr ), y ts j ) (1) Where ρ(D) is a distribution over a collection of datasets D from different tasks sharing some underlying similarity.Then, each dataset D is divided into a meta-training dataset D tr and a meta-test dataset D ts both of them made of inputoutput pairs (x, y) from the same task.Then, the metalearning objective is to find the parameters θ of a function f θ such that, for all the tasks drawn from the distribution ρ, given K examples of a task D tr = {(x, y) tr 1:K }, we can successfully predict new pairs from the same task on the meta-test dataset D ts = {(x, y) ts 1:J }.In the black-box formulation, f θ is a single neural network trained in an endto-end fashion to predict y ts j from x ts j and D tr .Therefore, the black-box formulation aims at modelling the predictive distribution: p(y ts j |x ts j , D tr , θ) = p(y ts j |x ts j , (x, y) tr In our context, each task can be described as the problem of driving energy estimation y ts of a terrain whose only available information x ts is its geometry x g (preprocessed with the method in Section III-A).Meanwhile, the terramechanical properties of the terrain are not explicitly given to the prediction model, while they are treated as the unknown characteristic that varies across tasks.Hence, a small number of local geometry-energy measurements D tr are exploited to implicitly retrieve the unknown terramechanical characteristics of the terrain and the information is leveraged to adapt the energy predictions accordingly.While in [15], single-point energy predictions were performed, in this paper, our goal is to explicitly model the probability distribution in Eq. ( 2) through neural network training.

IV. SOURCES OF UNCERTAINTY
In this section, we analyze the main factors responsible for uncertainties in the driving energy estimations and how they can affect the shape of the probability distribution in Eq. ( 2). 1) Uncertainty of the geometric input data.The geometry collection procedure in Section III-A, assumes that the robot initial position and speed are known and constant and that the on-board controller (see Section VI) can perfectly track the lateral position and longitudinal speed errors along the trajectory.While this is often the case in planar environments, unstructured geometries often pose a greater challenge to the onboard control system, thereby leading to the violation of these assumptions.As a consequence, the same terrain geometry x ts can result in different values of energy consumptions y ts .For example, depending on the lateral error of the robot, an obstacle present in a 2D-voxel grid may or may not be stepped over.Stepping over an obstacle often causes the variation of the wheel-ground contact area, possibly leading to unexpected slip, and altering the longitudinal speed and/or lateral error over the trajectory.Intuitively, these events (i.e., non-perfect tracking of the on-board controller and unexpected slip) often lead to increased energy costs compared to the nominal travel conditions (i.e., perfect tracking and noslip).Therefore, we foresee that the uncertainty in prediction caused by these events can be expressed as a right-skewed probability distribution.This means that greater probabilities are associated with energy costs higher than the peak of the distribution (also called the mode).
2) Uncertainty of the meta-training examples.The metalearning framework is an inherently uncertain procedure [33].Indeed, few meta-training examples D tr = {(x, y) tr 1:K } are often insufficient to univocally retrieve the unknown terramechanical properties of a terrain.Moreover, some examples may be non-informative, i.e. they may carry little information about the properties of the traversed terrain.For example, a meta-training example consisting of a steep downhill trajectory that requires null energy consumption to be traversed (i.e. the robot always breaks) provides little information about the properties of that terrain as it may be equally representative of several terrain types.Furthermore, some meta-training examples may be ambiguous, as they can be affected by the same uncertainty of the geometric input data described in point 1.Generally, more examples will help better recover the unknown characteristics of the terrain, thereby reducing the uncertainty of the energy estimation.Making a priori assumptions on the shape of the probability distribution caused by the meta-learning uncertainty is challenging.Intuitively, there is no apparent reason to expect skewed distributions due to this source of uncertainty.
Other common sources of uncertainty can be errors due to the precision of the instruments (e.g., measurement of energy consumption, point cloud collection, and robot localization).While those factors are likely present in realworld robots, they are strongly dependent on the specific sensors and algorithms adopted for the measurements.In this paper, we assume perfect knowledge of those data, as a detailed analysis of the uncertainty due to the instruments' errors is beyond the scope of this work.Despite this being a simplifying assumption, we note that our approach is entirely model and uncertainty agnostic, thereby allowing the direct integration of any other source of data uncertainty with minimal modifications to the proposed method.

A. MODELLING UNCERTAINTY
In this paper, we choose to model the overall probability distribution of the energy estimates derived from all sources of uncertainty combined.Therefore, the most suitable probability distribution, which most accurately models the uncertainty in the driving energy prediction, must be identified.As discussed in Section IV, we foresee a right-skewed component in the resulting distribution.Moreover, another property of the driving energy consumption is that it is only defined for non-negative values (i.e., y >= 0).As a consequence, the Gamma and Lognormal distributions are identified as the two most promising candidates [34].The Gaussian and Gaussian mixture model (GMM) distributions are also considered, as they are the most common distributions, used in the majority of continuous problems [35].Hence, we describe all the considered distribution models.
1) Gamma Distribution is is a two-parameter family of continuous distributions.Its probability density function (PDF) can be defined as: The probabilistic Meta-Conv1D neural network architecture.In light green, the parts that differ from [15] and that have different definitions for each of the four considered distribution models.
where X is a random variable (in our case, the driving energy consumption y), α, β > 0 are respectively the shape and rate parameters, and Γ is the Gamma function The Gamma distribution is right-skewed and defined only for real positive random variables.We also note that the mode of the Gamma distribution is not defined for α <= 1.Therefore, since in our application we are interested in the mode of the prediction, we only consider Gamma distributions with α > 1.
2) Lognormal Distribution is a two-parameter family of continuous distributions where the logarithm of the random variable X is normally distributed.Its PDF can be defined as: where µ and σ are the mean and standard deviation of a random variable Y = ln(X) that is normally distributed.Similar to the Gamma distribution, the Lognormal distribution is right-skewed and defined only for real positive random variables.We note that the mean and standard deviation of the Lognormal distribution are exponentially related to the µ and σ parameters.For this reason, we heuristically set bounds on µ and σ to avoid the explosion to infinitely high values of the Lognormal distribution.Specifically, in our application, we set µ > −7 and 0 < σ < 1.6.
3) Gaussian Distribution is the standard, and most widely used, normal distribution, whose PDF can be defined as: where µ and σ are the mean and standard deviation of the distribution.The Gaussian distribution is symmetric and defined for all real values.For this reason, we argue that the Gaussian distribution may be limiting to describe the driving energy prediction uncertainties in the context of mobile robots in unstructured environments.We provide evidence of this in Section VII-A.4) Gaussian Mixture Model Distribution is a weighted sum of M Gaussian components.Its PDF can be defined as: where w 1:M are the mixture weights (with M i=1 w i = 1), and each component N (X, µ i , σ i ) is a Gaussian distribution as in Eq. ( 5).The advantage of GMM is that it is flexible, as it is not constrained to assume any specific shape while, by increasing the number of components M , it enables modeling of complex probability distributions or distributions with unknown shapes.However, the main downside is the increased complexity due to the higher number of parameters.Specifically, the number of parameters of a GMM is equal to 3 × M .In our experiments, we set M = 3 as we experimentally observe minimal improvements in prediction for higher values of M .Moreover, as with the Gaussian distribution, the GMM is defined for both positive and negative real values, thereby being potentially limitative to describe the existing uncertainty in our problem.Finally, while the GMM is a valid approach if used exclusively for sampling, it does not provide analytical formulations of many useful probability metrics (e.g., mode, mean, CDF, PPF, etc.).Specifically, these metrics can only be approximated by assessing the PDF for several values of the random variable X.This makes the implementation of GMM more computationally expensive during inference than the other distribution models.

B. NEURAL NETWORK ARCHITECTURE
In this paper, we propose four alternative versions of the probabilistic Meta-Conv1D neural network, one for each of the four distribution model described in Section V-A. Figure 2 shows the architecture of the proposed neural networks.
The network architecture is the same for all the methods, except for the parts in light green, which have different definitions for each of the four distribution models.The first part of the neural network (Conv1D stack, and LSTM layer) adopts the same architecture as the network in [15].Specifically, the 2D-voxel grid geometries of the meta-training dataset x tr 1:K (i.e. the previously traversed terrains) and of the meta-test dataset x ts (i.e. the new terrain to analyze) are fed to multiple instances of the Conv1D stack (having shared weights) which process them and output the latent geometric representations x tr g,1:K and x ts g .Then, x tr g,1:K is concatenated to the respective driving energy consumptions y  3)-( 6).In the following, we provide, for each method, the architecture of the linear FC layer and of the AddOps layer (note, the subscript k, relative to the meta-training example, is omitted for notation simplicity).
1) Gamma Distribution: the linear FC layer has 2 units, while the AddOps layer (that generates the α and β parameters) is defined as: Where o 1,2 are the two outputs of the FC layer and the Sof tP lus operations ensure that α > 1 and β > 0.
3) Gaussian Distribution: the linear FC layer has 2 units, while the AddOps layer (that generates the µ and σ parameters) is defined as: Where the Sof tP lus operation ensures that σ > 0. 4) Gaussian Mixture Model Distribution: the linear FC layer has 3×M units, while the AddOps layer (that generates the µ i , σ i , and w i parameters, with i = 1 : M ) is defined as: Where the Sof tP lus operation ensures that σ i > 0 and the Sof tM ax operation ensures that M i=1 w i = 1.

C. TRAINING PROCEDURE
Algorithm 1 illustrates the training procedure for the proposed neural networks according to the probabilistic blackbox meta-learning framework.At each training step, for each element in a mini-batch, we randomly select a dataset D j , from a collection of datasets each with different terramechanical properties.Then, K meta-training samples (x, y) tr and 1 meta-test sample (x, y) ts are randomly sampled from D j .The predicted probability distributions p ts 1:K (y) are obtained by feeding the samples to the network models as described in Section V-B.Hence, the loss for each batch is computed by averaging the negative log-likelihood (NLL) of the probability distributions evaluated on the true energy values y ts j (see Line 9).Finally, the network weights are updated to minimize the loss using stochastic gradient descent.In our experiments, each network is trained for 60 epochs, with mini-batch size N = 32, learning rate α = 10 −4 , and RMSprop optimizer [36].

D. ADAPTATION PROCEDURE
Upon training completion, new meta-training examples from the local terrain can be exploited to adapt the distribution model to the new terrain conditions.For instance, if one example is available, only the first LSTM cell must be fed with (x g , y) tr 1 .Hence, the LSTM output h 1 is used by the Distribution stack for the probabilistic energy prediction of new terrain geometries x ts .

E. PATH PLANNING INTEGRATION
In this work, we adopt the same A* lattice-space path planner developed in [15].Particularly, the path planner adopts the standard Meta-Conv1D approach to assign a single-point energy value to each edge of a state-lattice graph [37] and searches for an energy-optimal path using a heuristic A* approach [38] [39].For more information on the method refer to [15].Meanwhile, the probabilistic models are not actively involved in the path planning procedure, while they are only integrated as additional layers to provide further probabilistic information about the already selected path solutions.
The implementation of more advanced probabilistic path planning methods may be the subject of future studies while, in this paper, we exclusively focus on the probabilistic reframing of the adaptive prediction model.

VI. SIMULATOR AND DATA COLLECTION
The proposed method is tested using the dataset collected in [15].The dataset is based on data gathered by an AMR navigating in several simulated unstructured scenarios using the Chrono dynamic simulator [40] and Soil Contact Model (SCM) [17].SCM enables realistic modeling of arbitrary shaped wheel-terrain interactions in deformable terrains [41] [7] and retains a more efficient computing workload than alternative Finite Element or Discrete Element methods [18] [42].In total, 17 terrain types are considered, which can be divided into 4 macro-categories: (1) high moisture content clays, (2) loose frictional, (3) compact frictional, and (4) dry clays.In addition, rigid, unstructured obstacles are embedded into half of the generated environments.Therefore, each dataset can be considered as made of three subsets: Mixed is the full dataset, (2) Unstructured is the subset that contains unstructured geometries, and (3) Simple is the subset that does not contain unstructured geometries.
The robot is driven over the generated environments at a constant speed of 1 m/s for a total of 1000 km (59 km for each of the 17 terrain types) [43].The robot is subjected to a PID controller for the acceleration-brake pedals and a P controller for the wheel steering.Both controllers run at a frequency of 500 Hz.Hence, the geometry and driving energy data are collected during the traverses using simulated sensors, according to the method described in [15].The final dataset is composed of 17 different datasets, each one from a different terrain type and made of 21 763 geometry-energy pairs (about 50 % Simple and 50 % Unstructured).
Fig. 3 illustrates an example of data collection in a Simple and Unstructured environment.In the example, the Unstructured scenario has the same terramechanical properties and Digital Terrain Model (DTM) as the Simple environment, but its DTM is randomly augmented with rigid, unstructured obstacles (see Figs. 3a and 3c).Hence, the same trajectory is commanded in both scenarios (see Figs. 3b and 3d).Figs.3e-3g and Figs.3i-3k show the AMR state profiles relative respectively to the Simple and Unstructured trajectories.As expected, greater efforts are required by the onboard controller to track the longitudinal speed and lateral error in the Unstructured scenario (note the higher acceleration, braking, and steering commands in Fig. 3i compared to Fig. 3e, and the higher tracking errors in Fig. 3j compared to Fig. 3f).Indeed, stepping over the unstructured geometries causes external forces to act on the wheels and the constant variation of the wheel-ground contact area.For example, note the abrupt changes in the AMR pitch and roll orientations in Fig. 3k compared to the smoother variations in Fig. 3g.As a consequence, sharper peaks of motor power are required, in the unstructured scenario, in the attempt of tracking the target trajectory (see Fig. 3h and 3l).This illustrates how navigating over unstructured geometries majorly contributes to the increased uncertainty in the driving energy prediction and, thereby, provides insights into the potential benefits of a probabilistic formulation.

A. VALIDATION PERFORMANCE
In this section, we compare the generalization performance of the proposed probabilistic models with the deterministic Meta-Conv1D approach.As in [15], we perform 5 test trials with different training-validation splits.For each trial, the training dataset is constituted by 4 randomly selected terrain types, and the corresponding datasets.Hence, the remaining 13 datasets are used for validation to assess the adaptation performance to new terrain types.
In Meta-Conv1D, the evaluation metrics of interest were the root mean squared error (RMSE) and the r2 score (R2) between the predicted and true energy data, while no other information was available about the probability of the prediction.In the probabilistic models, the main evaluation metric is the NLL of the predicted distribution evaluated on the true energy data.Indeed, this metric is an indicator of the capability of the model to characterize the uncertainty in the prediction (the lower the NLL on the same dataset, the better the model).Moreover, we additionally monitor the RMSE and R2 score between the mode (i.e. the peak) of the predicted distributions and the true energy data.In this way, we can compare the performance of the most-likely prediction in the deterministic and probabilistic cases.
Table 1 summarises the validation performance of the methods averaged over the 5 test trials.We observe that, as more meta-training examples are provided, the accuracy of the most-likely prediction improves for all the methods (RMSE decreases and R2 increases) and the uncertainty is reduced for the probabilistic methods (NLL decreases).The decrease of NLL, in particular, provides evidence that more meta-training examples help better capture the unknown properties of the terrain, thereby resulting in lower prediction uncertainties.We observe that Meta-Conv1D has the best RMSE and R2 score in all scenarios (except for the Simple subset with 3 meta-training examples, where Meta-Conv1D-Gaussian has marginally better performance).This can be explained by that, in Meta-Conv1D, the network is explicitly optimized to minimize the distance between the most-likely prediction and the true value.However, it can only provide a single-point energy estimate, while it cannot account for uncertainty considerations.Conversely, the probabilistic approaches are optimized to minimize the NLL.As An example of adaptation to a new terrain type and driving energy prediction according to the different methods is provided in Fig. 4. We observe that the first meta-training example (x, y) tr 1 consists of a steep downhill trajectory that requires null driving energy consumption to be traversed.As discussed in Section IV, this represents a non-informative example as, based solely on this example, little information can be derived about the terramechanical properties of the terrain under analysis.As a consequence, Meta-Conv1D provides a single-point solution for the meta-test terrain that is affected by a large error.Moreover, Meta-Conv1D cannot provide any indication of the uncertainty of its estimation.Conversely, all the probabilistic approaches can describe the high uncertainty of the first prediction (i.e., flat distributions with large standard deviation).Hence, as more meta-training examples are provided, the models' most-likely predictions improve and the uncertainty of the probabilistic models decreases.This provides indications of the advantages of our approach that, by explicitly describing the uncertainty of the driving energy predictions, can provide more informed driving energy estimations.Furthermore, we observe that the first prediction of M.C.-GMM consists of a bimodal distribution.This provides further insights on that the first meta-training example is noninformative, as a well-defined single prediction, provided only that example, is challenging to identify.We note that M.

B. PATH PLANNING INTEGRATION
In this section, we test the single-point and probabilistic energy estimators integrated into the A* lattice-space path planner, as illustrated in Section V-E.Particularly, M.C.-Gaussian and M.C.-GMM are not considered, given their demonstrated inferior performance in the validation datasets.Hence, the prediction performance of the Meta-Conv1D, M.C.-Gamma, and M.C.-Lognorm methods are tested by conducting statistical analysis over 1080 random-start goal positions on randomly generated new scenarios with unstructured geometries and unforeseen terrain properties (selected from the 13 validation terrain types).Specifically, for each start-goal position: (1) the AMR navigates for 8.1 m and collects the three most recent geometry-energy pairs, (2) the three example pairs are used by Meta-Conv1D to plan a path to the next target, and (3) the prediction performance of the three methods are compared on the selected path.To further increase the uncertainty of the terrain properties encountered during testing, random noise is added to each one of the 6 terramechanical parameters (with noise bounded to ±5% of the value of each parameter).Hence, the number of unstructured geometries in the test environments is progressively increased after each 120 executions (from 0 to 0.8 n ug /m 2 , where n ug is the number of unstructured geometries).In this way, the impact of the unstructured geometries on the prediction performance of the three methods can be analyzed.with 0.8 n ug /m 2 .This provides further evidence of the large impact that unstructured geometries have on the accuracy of the energy estimation.Therefore, the single-point Meta-Conv1D approach, despite its higher mode performance, may be limiting in highly unstructured scenarios, as it does not provide any additional information about the uncertainty of its estimations.Conversely, both M.C.-Gamma and M.C.-Lognorm can model the increasing uncertainty in the predictions.Fig. 5b illustrates the true total energy (sum of the 120 trajectories in each scenario) and the respective predictions according to the three methods.Specifically, for the probabilistic models, in addition to the mode, the 62 % and 98 % confidence of intervals (CIs) are shown.We observe that the mode predictions underestimate the true total energy values for all the methods.As previously mentioned, an excessive underestimation of driving energy can be dangerous in the context of AMRs navigating in challenging scenarios.Therefore, considerations about the existing prediction uncertainty can be beneficial.Hence, we observe that both the predicted uncertainties of M.C.-Gamma and M.C.-Lognorm increase and tend to be more right-skewed as the number of unstructured geometries rises.This provides evidence that the uncertainty of the driving energy consumption, due to the presence of unstructured geometries, is skewed towards energy values higher than the mode.Particularly, M.C.-Lognorm presents increasingly larger skewness and heavier tail than M.C.-Gamma as the roughness of the environments rises.To further assess which of the two probabilistic models is better representative of the actual prediction uncertainty in our problem, Fig. 5c illustrates the percentage of true data points (in total, 120 × 3 = 360 for each scenario) that falls within different predicted CIs according to the two methods.Specifically, the closer the resulting percentage is to the percentage of the respective CI, the more accurate is the predicted probability distribution.Hence, we observe   This confirms that, despite the higher degradation in terms of mode accuracy of M.C.-Lognorm, its description of the prediction uncertainty is overall more accurate in both simple and unstructured environments.Fig. 6 illustrates a qualitative example of the path planning procedure with probabilistic driving energy predictions.First, the AMR plans a path in an environment with 0 n ug /m 2 (see Fig. 6a).Then, it moves on a more challenging, unstructured scenario with 0.7 n ug /m 2 (see Fig. 6b).On the bottom right of both Figs.6a and 6b, the recent experience from the previous trajectories (i.e., the 2D-voxel grid geometries and the respective driving energy consumptions) are used as metatraining examples to adapt the energy prediction models.On the top right, the 2D-voxel grids of the next trajectories, of which the driving energy consumption must be determined (i.e., meta-test), are shown.As with previous results, the prediction accuracy of Meta-Conv1D considerably degrades as the roughness of the terrain increases (note, in Fig. 6c, the red and blue dots of the trajectory 4-5-6 compared to 1-2-3).Specifically, the true energy values of trajectory 4-5-6 are considerably higher than the Meta-Conv1D single-point predictions.Meanwhile, M.C.-Gamma and M.C.-Lognorm correctly capture the increased uncertainty of the second trajectory (note that the CI 98 % of both models increase and that the true energy values are appropriately contained within the CIs, for all the trajectories).As a consequence, while Meta-Conv1D provides a single value for the overall energy consumption that considerably underestimates the true energy cost, our proposed probabilistic framework provides more informative uncertainty boundaries, which can be crucial to the safety of AMRs in challenging, unstructured scenarios.

VIII. CONCLUSION
In this study, we proposed a probabilistic deep-meta learning driving energy prediction model for AMRs navigating in complex, unstructured scenarios.Our work is based upon an existing deterministic meta-learning approach that is, in this paper, reframed to consider probabilistic estimates.We showed that, despite a marginal degradation of the most-likely prediction, our approach is more reliable than the deterministic method, as it can yield more informative uncertainty-aware estimations.Specifically, we remark the benefit of our approach to capture and explicitly model the uncertainty in the driving energy prediction caused by (1) insufficient and/or non-informative local measurements used to adapt the prediction model to the local terrain conditions and (2) the complex wheel-terrain interaction caused by traversing unstructured surfaces.Therefore, our method can be of interest to several applications of AMRs in unknown, challenging scenarios, for which an incorrect (e.g., overly optimistic) estimation of the driving energy consumption can compromise the safety and success of the mission.
This work can be extended in several directions.While in the current implementation all the sources of uncertainty were considered together, in a single prediction output, future works may investigate the development of more interpretable methods that explicitly distinguish among the different uncertainty components.Moreover, while the probabilistic prediction model was integrated, in this paper, into a deterministic path planner and only used as an additional information layer, future studies may investigate its active integration into more advanced probabilistic path planning frameworks.Finally, while in this work our method was tested in simulation, exploiting the SCM 3D-body dynamic simulator, real-world tests will be required to further validate the results obtained during simulation.

FIGURE 1 :
FIGURE 1: The Conv1D geometric analysis procedure.(a) The terrain point cloud, relative to the trajectory, is downsampled into a 2D-voxel grid.(b) The 2D-voxel grid is preprocessed by a stack of Conv1D neural networks to generate the latent geometric representation x g .

tr 1 :
K (measured by the AMR while traversing the terrains).Hence, the resulting metatraining examples D tr = {(x g , y) tr 1:K } are fed to a Long-Short Term Memory (LSTM) layer with 128 units.In this way, each LSTM cell implicitly captures the unknown characteristics h k of the terrain based on the k examples provided up until that point and passes on its current estimate to the next cell.In meta-learning, the maximum number of metatraining examples K is a heuristic application-dependent parameter.In line with [15], we experimentally set K = 3, as we observe minimal improvement in prediction error if more examples are provided.Then, the top part of the neural network (called Distribution stack) is a stack of one Fully Connected (FC) layer with 64 units and relu activation, followed by one FC layer with linear activation, Additional Operations (AddOps) layer, and PDF layer.The architecture of these last three layers varies depending on the distribution model considered.In this way, the Distribution stack (repeated K times with shared weights) takes as input the LSTM hidden vector h k and the latent geometry of the meta-test terrain x ts g , and outputs the predicted probability distribution p ts k (y) given the k meta-training examples provided up to that point.Specifically, the AddOps layer takes the outputs o k of the linear FC layer and generates the parameters of the probability distribution γ ts k (where γ stands for α, β in case of the Gamma distribution, µ, σ in case of the Lognormal distribution, etc.), while the PDF layer takes the γ ts k parameters and implements the PDF.The definition of the PDF for each distribution model was illustrated in Eqs. (

FIGURE 3 :
FIGURE 3: (a) Example of Simple environment with deformable terrain in the Chrono simulator.Colors on the wheel trace indicate the terrain sinkage depth after the AMR traversal.On the top left, the onboard controller commands to the AMR at that snapshot time.On the top right, monitored metrics of interest at that snapshot time (i.e., the AMR longitudinal speed, the engine round per minute, and the engine torque).(b) The DTM and the AMR traverse relative to the Simple environment.(c) Example of Unstructured environment, obtained by augmenting the DTM of the Simple environment with rigid, unstructured geometries (colored in black).(d) The DTM and AMR traverse relative to the Unstructured environment.From (e) to (h), the AMR state profiles along the traverse on the Simple environment and, from (i) to (l), on the Unstructured environment.From left (e/i) to right (h/l), the on-board controller commands (adimensional between [−1, 1]), the controller tracking variables (i.e., the AMR longitudinal speed and lateral error), pitch and roll of the AMR, engine metrics of interest to the driving energy consumption.
C.-GMM is a flexible distribution unconstrained to any specific shape type.As more examples are provided, the second mode of M.C.-GMM is smoothed out and the PDF converges to a right-skewed distribution, similar to the M.C.-Gamma and

FIGURE 4 :
FIGURE 4: Example of terrain adaptation and driving energy prediction according to the different methods.(a) Three metatraining examples (x, y) tr i and one meta-test geometry x ts are randomly selected from an unknown terrain type.(b) The ground truth (in blue) and predicted driving energy consumptions, relative to x ts , are shown (single-point estimates or probability distributions depending on the model) after each new meta-training example is provided.

FIGURE 5 :
FIGURE 5: Effect of the number of unstructured geometries on the prediction performance for the deterministic and probabilistic approaches.(a) Prediction performance of the mostlikely prediction.(b) Total energy (sum of 120 trajectories) true and predicted (mode, CI 62 %, and CI 98 %).(c) Percentage of true energy samples within different CIs.

FIGURE 6 :
FIGURE 6: Example of two path planning procedures with probabilistic driving energy predictions.(a) The AMR plans the path 1-2-3 in an environment with 0 n ug /m 2 .(b) The AMR plans the path 4-5-6 in an environment with 0.7 n ug /m 2 .(c) The total (Tot) and the single trajectory (Traj) driving energy consumption (true and predicted according to the different models).

TABLE 1 :
The models' performance (averaged over 5 trials) for different numbers of meta-training examples (columns from 1 to 3) and different subsets of the validation dataset (Mixed, Unstructured, and Simple).Therefore, the Lognormal distribution is the most accurate model to describe the uncertainty in the prediction (especially in unstructured scenarios and if more than one meta-training example is provided), but at the price of a higher error of the peak of the distribution.Finally, M.C.-Gamma provides the best overall compromise, being second-best in terms of mode degradation (after M.C.-Gaussian), and second-best in terms of uncertainty description (after M.C.-Lognorm).
mode degradation, it is the model with the lowest NLL overall (except for the Mixed and Simple subsets with 1 metatraining example, where M.C.-Gamma has the lowest NLL).