Multibeam 3D Underwater SLAM with Probabilistic Registration

This paper describes a pose-based underwater 3D Simultaneous Localization and Mapping (SLAM) using a multibeam echosounder to produce high consistency underwater maps. The proposed algorithm compounds swath profiles of the seafloor with dead reckoning localization to build surface patches (i.e., point clouds). An Iterative Closest Point (ICP) with a probabilistic implementation is then used to register the point clouds, taking into account their uncertainties. The registration process is divided in two steps: (1) point-to-point association for coarse registration and (2) point-to-plane association for fine registration. The point clouds of the surfaces to be registered are sub-sampled in order to decrease both the computation time and also the potential of falling into local minima during the registration. In addition, a heuristic is used to decrease the complexity of the association step of the ICP from O(n2) to O(n). The performance of the SLAM framework is tested using two real world datasets: First, a 2.5D bathymetric dataset obtained with the usual down-looking multibeam sonar configuration, and second, a full 3D underwater dataset acquired with a multibeam sonar mounted on a pan and tilt unit.


Introduction
For Autonomous Underwater Vehicles (AUVs), addressing the navigation and mapping problems is crucial to achieve a fully operational status. Dead reckoning navigation systems suffer from an unbounded drift error, regardless of using high-end Internal Navigation Systems (INS) [1]. To avoid this, such systems are commonly aided with absolute positioning fixes. Using the measurements from a Global Positioning System (GPS) receiver is a typical solution during operations taking place on the surface. When the vehicle is submerged, Long Base Line (LBL) systems [2] can be used for the same purpose, although complex calibration of the acoustic beacon network is required prior to its operation. Using single beacon/transponder methods may reduce the calibration burden [3,4] or even eliminate it, at the cost of a reduced accuracy, when inverted LBL [5] or Ultra Short Base Line (USBL) [6] systems are used instead.
All those methods share the limitation of confining the robot operation to the area of coverage of the system. Terrain-based navigation (TBN) methods [7] can mitigate this limitation when an a priori Digital Terrain Map (DTM) is available on the target area. However, for an underwater vehicle to become truly autonomous, it should be able to localize itself using only on-board sensors and without the help of any external infrastructure. The Simultaneous Localization And Mapping (SLAM) concept aims to achieve that. Although more than 20 years of research have provided different approaches to solve the SLAM problem, mostly in land mobile robotics [8], there are still few solutions for underwater use, mainly due to the sensing limitations imposed by the medium and the complexity of the environment. Section 5 presents the experiments and results, and, finally, Section 6 presents the conclusions and future work.

Submap Creation
For bathymetric mapping, multibeam sonars are generally fixed to the vehicle so that the 2D swath profiles are generated perpendicular to the surge direction. In that way, 2.5D surfaces are built by composing the multibeam data with the displacement of the vehicle. Alternatively, more complex environments can be inspected by sweeping a multibeam sonar mounted on a pan and tilt unit, so it is the rotation of the sonar head, and not solely the vehicle motion, that leads to the coverage of the surfaces. The point clouds resulting from the collection of multibeam data (Figure 1), along with other information such as boundaries or position with respect to the world, are what we refer to in this work as patches or submaps. This section describes the process of building these submaps during a mission.
(a) Fixed multibeam (b) Sweeping multibeam Figure 1. Two different submaps colored according to depth. In (a), the multibeam was mounted in a fixed downward-looking configuration, typically from bathymetric mapping; In (b), the sonar head was mounted on a pan and tilt unit and swept vertically to cover a portion of steep terrain.

Dead Reckoning
To be able to construct the submaps, regardless of whether the sonar is being swept or mounted on a fixed position, it is necessary to estimate the AUV position at the time each multibeam reading was acquired. As will be later detailed in Section 2.2, our procedure uses the relative displacements made by the vehicle between consecutive multibeam swaths to compound the point clouds. Moreover, given the probabilistic nature of the proposed registration algorithm, it is also necessary to estimate how the uncertainty evolves during these motions. To obtain this information, an Extended Kalman Filter (EKF) is used.
The state vector of the filter (see Equations (1) and (2)) contains 12 elements representing the current six Degrees of Freedom (DoF) vehicle position and velocity, as well as two more elements corresponding with the stored x and y position of the vehicle at the time when the last multibeam reading was obtained (x mb , y mb ): A constant velocity kinematic model is used for prediction of the vehicle states, while those regarding the stored previous vehicle position are assumed static. In the correction stage, updates are performed asynchronously with the measurements coming from an Attitude and Heading Reference System (AHRS), a Doppler Velocity Log (DVL), and a pressure sensor. The filter iterates normally until a new multibeam reading is received. When this occurs, one last prediction is made to get an updated estimation of the vehicle's position before calculating o k = N(ô k , P o k ), a new vector containing the displacement executed by the vehicle in the horizontal plane during the period of time between the current and the previous multibeam readings, as well as the z position and orientation of the vehicle at the current time:ô Note that the two first elements of o k correspond to incremental values, while the other four are absolute with respect to the base reference frame used for the dead reckoning. The calculation of those increments is motivated by the cumulative drift that affects the motion in the horizontal plane. Since those states are only estimated indirectly by the velocity measurements from the DVL, the uncertainty in the xy position grows without bound. As will be introduced in the following section, working with those increments allows for a better distribution of the uncertainties within the point cloud. On the other hand, the remaining states in o k are observed directly by other sensors (the z position is observed by the pressure sensor, and the orientation by the AHRS), and therefore their uncertainties are bounded.
Once o k has been calculated, it is stored until the current submap is finalized. To continue with the execution of the dead reckoning filter, and to keep track of the displacements from the current position to that of the next multibeam measurement, it is necessary to replace the last two elements of the state vector (x mb , y mb ) with the current position of the vehicle x and y: Given that, the execution of the filter can continue by replicating the procedure we have just described.

Submap Forming
During the execution of the mission, the information required for the generation of the patches is stored in a temporal data structure S temp : where O = {o 1 , ..., o n |o i = N(ô i , P o i )} is the set of displacements and positions as computed in Equations (3) and (4), while M = {m 1 , ..., m n }, with m i = {δ 1 , ..., δ m |δ i = N(δ i , P δ i )}, is the set of all the multibeam swaths m, each one containing the corresponding polar range measurements δ. Finally, R = {r 1 , ..., r n |r i = N(r i , P r i )} is the set of transformations required to represent the multibeam data with respect to the vehicle frame. This is particularly relevant in the case of a multibeam sonar mounted on a pan and tilt unit, since the transformations will change continuously because of the sweeping motion. When the amount of accumulated data is deemed sufficient (see the conditions below), the current patch is closed and the contents of S temp are used to generate the point cloud and other information that will be necessary later during the registration process. In addition, the position of the recently terminated patch is stored in the state vector of the pose-based EKF in charge of the SLAM process (see Section 4). Before beginning a new patch, the S temp is reset to store a new batch of data.
The criteria to close a patch depend on which scenario we are dealing with. If the sonar is scanning a tri-dimensionally rich environment by means of a pan and tilt unit, each complete sweep is taken as an independent submap because, unless a very fast vehicle is used, successive scans will re-visit the same area, which only contributes to increasing the number of points without incorporating significant new information. On the other hand, the situation with typical bathymetric survey missions where the multibeam is fixed on the vehicle is substantially different. Scanned areas are generally not re-visited (not in the same transect), and the seabed is often scarce in features, which may make the successful matching of surface patches difficult. In this case, a combination of three criteria is used to determine when to close a patch: • Minimum size: A minimum size is defined to avoid handling a large number of tiny patches augmenting unnecessarily the length of the SLAM state vector and reducing the overlapping. • Maximum size: The maximum size is bounded to avoid handling huge patches with a high uncertainty in the surface points due to the accumulated dead reckoning error. • Normal occupancy: The surface relief is analyzed to determine when the patch is rich enough to be successfully matched. The procedure basically consists in finding surface normals for each point on the cloud and representing their parametrization on a histogram. If the histogram is sufficiently occupied, the submap is closed.
Once sufficient data has been acquired and the submap is closed, all the stored data is processed to generate the point cloud and the information required for the potential registration with other submaps. In [21], the reference frame for each submap was defined as the position of the robot when the patch was started. Here, the point cloud is generated with respect to a new reference frame I, which is placed on top of the central position of the trajectory executed during the creation of the patch, but oriented like the base frame B used for the dead reckoning navigation. By placing this frame in the center of the submap, the uncertainty of the points grows from the center of the patch to the edges (see Figure 2b) instead of growing from the beginning to the end (see Figure 2a). This gives a more convenient distribution of the uncertainty in the point cloud which improves the registration [29].
The process of generating the point cloud begins by selecting the central position that will be associated to I, and that will be referenced hereafter with the mp subindex. Then, the q k vector relating a given k position in which a multibeam reading was acquired, and the I reference frame can be computed from the corresponding o k and o mp (both pertaining to O and stored in S temp ) as: where x a should be read here as the element x contained in the vector a. Note that for computing q k , the vectors q k−1 (if k > mp) or q k+1 (if k < mp) also need to be known. This means that the calculation needs to be done sequentially starting by the mp position and then moving towards both ends of the submap (1 and n). The uncertainty of q k is then computed as: being J j the Jacobians of the function: It is worth noting that q k is composed of both relative (first three elements representing a displacement) and absolute (last three elements being the orientation) measurements. Assuming that correlations in attitude estimates are negligible, computing the relative increment of the orientation would end up adding uncertainty in these 3 DoF artificially. This would apply also to the z displacement. However, we observed that if the same approach is taken in this DoF, the lever-arm effect in the registration process (the depth is referenced to the water surface) makes it much more prone to error. Therefore, we decided to reference the z position to the actual depth of the AUV regardless of the increment of uncertainty in order to make the registration process more stable.
With all the q k computed, the point cloud can now be generated. The first step is to transform all the polar range measurements δ i = N(δ i , P δ i ) which are represented in the sensor frame to that of the vehicle using the r k transformations stored in R: where g(.) is the polar to Cartesian conversion function, J g is its corresponding Jacobian and ⊕ is the compounding operator with Jacobians J 1⊕ and J 2⊕ as defined in [30]. With the point p × i referenced to the vehicle frame and q k being the vehicle position referenced to I, we can calculate the position of a point p i as:p After all these calculations, the information regarding the patch is saved in a new structure S as: where x = N(x, P x ) is the position of the frame I that will be used to anchor the submap in the state vector of the pose-based SLAM framework described in Section 4; O is the same set of transformations as in S temp ; W = {p 1 , ..., p n | p i = N(p i , P p i )} is the set of points referenced to I that have been calculated and, finally, B is a volume containing all the points that pertain to the patch. On the horizontal plane, B is the polygon containing all thep i points, while, on the z direction, the boundary is defined by the minimum and maximum depth of all the pointsp i (see Figure 2).

Registration Algorithm
This section explains the procedure to register two submaps using probabilistic ICP. The inputs of the algorithm are a reference submap S re f , which has been already stored in the SLAM framework; a newly generated submap S new , and an initial guess of their relative displacement q 0 = N(q 0 , P q 0 ) obtained from the navigation. The algorithm uses a two-stage correction procedure. First, a point-to-point correction is performed to roughly align the two submaps (until their relative displacement in two consecutive iterations falls below a threshold), and then, a point-to-plane correction is executed to refine the result. Point-to-point association tends to produce undesired effects in the presence of small misalignments (see for instance the lateral displacement depicted in Figure 3a). This is because associated points do not necessarily correspond to the exact same spot in the original surface and therefore their arbitrary occurrence may prevail over the general shape of the surface. However, point-to-point association is powerful when large displacements are present (see Figure 3b). On the other hand, point-to-plane associations tend to be driven by the shape of the surface and hence, perform better in the presence of small misalignments (see Figure 3a), but may fail when dealing with large displacements (see Figure 3b). To complement their strengths and weaknesses, we combine both methods by using an error threshold which determines when to switch from one strategy to the other.

Point-to-Point Association
Given a certain point n i = N(n i , P n i ) from the new patch S new , and a matching candidate r j = N(r j , P r j ) from the reference surface S re f , both represented in Cartesian coordinates and referenced to their respective frames (I new and I re f ), the association error e ij = N(ê ij , P e ij ) can be defined as: so the point-to-point association may be solved through a simple individual compatibility test over the corresponding Mahalanobis distance: All the points individually compatible with n i form the set A i . From this set, the one with smaller Mahalanobis distance is chosen to be associated with n i .

Point-to-Plane Association
At the second stage, the metric changes and the point-to-plane distance is used instead. Now, the set of compatible points A i is used to estimate a local plane Π(ν i , d i ) whose equations are given by ν T i x − d i = 0, being d i the plane distance to the origin and ν i its normal vector. Because of the probabilistic nature of our algorithm, we are interested not only in the plane parameters but also in their uncertainty. An iterative method is reported in [31] for this purpose, being too computationally expensive for our case. In [32], the authors use a two-step minimization method for estimating: (1) the plane using region growing algorithms and (2) its uncertainty. Finally, in [33], the error of a set of samples is minimized using the uncertainty related to the range of the sensor by means of a weighted Principal Component Analysis (PCA). This last method is the one which best fits our requirements because of its reduced computational complexity, and also because of its nature, since it does not search for the points forming the plane, but fits the plane among the given points.
Given a plane Π(ν, d), whose equation is ν T x = d, the likelihood of observing a plane point r j ∈ A i is given by: The objective here is to maximize the sum of the log-likelihood of the previous equation. The problem cannot be solved in a simple way since the error of the uncertainty depends twice on the normal ν. To solve the problem in an efficient way, it was necessary to approximate the uncertainty by the trace of P r j : Tr P r j . In this way, the error ellipsoid is approximated to a sphere, and it is possible to solve the equation analytically and as efficiently as in [33] (please refer to this work for a more extended derivation).
The log-likelihood that we want to maximize, ignoring constants, is the approximate least squares problem: with Lagrangian Setting ∂L ∂d = 0, we find the solution p µ being the weighted center of the set of points A i . Finally, The minimizing normal ν is defined by the eigenvalues of the covariance matrix of the points as in the common weighted PCA method. The uncertainty of the estimator is found as: where H is the Hessian of the Lagrangian in the optimal plane. Given the point n i and the plane Π i (ν i , d i ) estimated from all the compatible points in A i , the point a i is defined as the orthogonal projection of n i over the plane Π i (ν i , d i ): This new virtual point a i is actually the point that will be associated with n i to execute the new registration phase using the same point-to-point equations we already presented in Equations (20) and (21), but using a i instead of r j .

Minimization
At the end of each association stage, a minimization process is executed to estimate the robot displacement q min that minimizes the addition of the Mahalanobis distance of the association error: ξ being a vector composed of all theê ij error vectors (see Equation (20)) after associating all the points (either virtual or real) and P ξ the block diagonal matrix with their corresponding covariances P e ij (Equation (21)). This minimization is done using weighted least squares: J being the Jacobian matrix of the error function at the previous estimation evaluated in all the points.

Submap Simplification
Traditional ICP-based methods may encounter some problems in a scenario like the one depicted in Figure 4a, where two almost flat surfaces share a poorly visible feature. For instance, ICP tends to associate each point with its closest neighbour according to a particular metric. Because of that, it may be difficult to correctly associate the feature areas when the displacement is large (i.e., they are far from each other, and the proximity of flat areas may lead to a local minimum). This particular issue will benefit from the proposed probabilistic ICP approach, since the uncertainty of the points should constrain the possible matching candidates to those compatible with the real accumulated error. For instance, uncertainties may be large in the horizontal plane, making it possible to match two distant features, but small in the z direction, so points in the flat areas will not be compatible with those in the features.  Another inconvenience related to traditional ICP-based methods is the weak contribution of flat areas to the registration (they all look alike and their matching possibilities are high). Moreover, when few features are present in scenarios of large flat areas, the planar areas may prevail and lead to poor matching. ICP algorithms have better results when the associated points are significant (i.e., distinguishable from each other). For that reason, a new sampling procedure to reduce the number of points in the cloud by removing the less informative ones is presented (see Figure 4b). Since the surface distribution is not available, the sampling procedure is performed using the discrete points. This resampling improves the odds of successful matchings, even when large displacements are present, as well as decreasing the computation time in the registration by drastically decreasing the number of points to be associated, thus increasing the performance of the algorithm.
The approach proposed here uses an octree structure to sample the scan in its most significant areas (i.e., areas with rich relief). The subsampling algorithm works as follows: the point cloud is contained in a discretized tridimensional space structured as an octree. Using the points contained in each cell of the octree, a relief-based subsampling criteria is evaluated recursively, and if the condition is fulfilled, the cell is divided into eight subcells. After the subdivision process comes to an end, only one point is taken from each cell of the octree (see Figure 5). This makes areas with bigger (i.e., not significant) cells contribute with fewer points than areas with smaller (i.e., significant) cells. In [34], several different criteria were studied to drive the octree subdivision. Although some criteria were more suitable for specific types of environments, in this work, the difference from principal plane method has been selected given its overall performance in both 2.5D and 3D. This criteria basically dictates that a cell should be divided if the average distance between the points in the cell, and the best fitting plane of the cloud is higher than a given threshold. For a more detailed description, please refer to [34].

Association in Linear Time
The association step in ICP based methods has an O(n 2 ) computational cost because it is necessary to compare each reference point r j in S re f against all the n i points in S new to compute their distances. Moreover, the probabilistic implementation of the ICP method requires several matrix operations, including an inversion, to calculate the uncertainty of the association of the points from the two point clouds. Hereafter, a new method for reducing complexity taking advantage of the uncertainty estimates of the points, which are already available, is proposed.
A probabilistic point p with uncertainty P can be represented graphically as an ellipsoid defined by a χ 2 distribution at a certain confidence level α and for d degrees of freedom (DoF): Given that, in our approach, a 3D grid is generated covering the two patches to be matched, and for each point in S re f , the cells falling inside its uncertainty ellipse are marked (see Figure 6a). During the association process, the same procedure is followed for each point in S new .
(a) Before Matching (b) During Association Figure 6. The figure shows how the support grid is used during the association step. First, the points in the reference scan (blue) are inserted into the cells using their uncertainty ellipses (a). Then, each point in the new scan (red) is also laid inside the grid (b). In this case, n 1 overlaps with r 2 and r 3 while n 2 overlaps only with r 3 . Moreover, r 1 has no potential associations. At this point, the following heuristic is applied: To check the compatibility of two points n i and r j , we define their ellipsoids given a certain confidence level α. If the ellipsoids do not intersect with each other, the corresponding points are assumed not to be individually compatible. In other words, if: Note that evaluating the compatibility in this way is still computationally expensive. However, in our method, the space occupied by the ellipses has been previously registered inside a grid, so it is possible to rapidly find the intersecting ellipsoids using a direct grid look-up (see Figure 6b). In other words, association candidates for a given point in the new scan can be easily identified by searching only among the cells occupied by its own ellipse, for tags denoting occupancy of those same cells by ellipses corresponding to points in the reference scan. In that way, candidates are directly determined, without a need to evaluate all the remaining points in the reference scan, and thus, the complexity is reduced to O(n).

SLAM Algorithm
This section describes the EKF implementation of the pose-based SLAM framework in charge of optimizing the surface map.
Every time a submap is finished, the estimate of the robot pose at the reference point of each surface patch x S is incorporated to the state vector x so it contains all the information regarding the submap distribution:x with a pose state x S being: where (x,y,z) is the position of the robot and (φ, θ, ψ) are the roll, pitch and yaw angles. The poses are referred to the same common frame B that was used during the dead reckoning. The covariance matrix for this state is defined as:

Prediction and State Augmentation
The submap poses stored in the state vector are assumed to be static during the execution of the mission. Therefore, the prediction stage of the EKF just maintains the estimated values for the state vector and its covariance. However, every time a new patch is completed, and its pose is introduced in the state vector. This is done during the prediction stage. To be able to fit the requirements of this algorithm (such as the location of the frame I), a new procedure has been developed for the prediction and state augmentation. The procedure explained hereafter uses the previously computed o k to find the relationship between the patch S n and S n+1 by adding all the incremental displacements in the xy plane and copying the position of the other 4 DoF at the position chosen as frame I in patch S n+1 .
Let S n+1 be the new patch to be added to the state vector and S n the last one already added. Then, we need to estimate the transformation n q n+1 = N( nq n+1 , Pn q n+1 ) relating S n and S n+1 . The process begins by defining two functions that will be applied to the set of stored o k relationships between the two patches: with Jacobians: Then, taking the stored O = {o 1 , ..., o m } ∈ S n , the parameter q 1 = N(q 1 , P q 1 ) representing the distance from the central position of the S n patch (defined with the subindex mp) and its last position can be calculated as:q Next, using the stored O ∈ S n+1 , the parameter q 2 = N(q 2 , P q 2 ) representing the distance from the beginning of S n+1 to its center plus the final orientation of the patch can be obtained as: Finally, the complete transformation n q n+1 relating the centers of both patches is calculated as: Knowing this n q n+1 transformation, the state of the filter can be augmented with the new position of S n+1 by doing: Note that the operator is introduced here to define the way in which the global coordinates of the S n patch are combined with the relationship between consecutive patches S n and S n+1 to find the position of the patch S n+1 in the world frame. The operator is described as: with Jacobians:

Matching Strategy
When a new patch is available, potential matches are searched among the previously created patches. This is done by determining the intersection between the volumes B (see Equation (19)) of the two potentially matching patches. In this way, two patches are considered to be intersecting if more than a given % of their volumes is shared. The new patch may potentially intersect with several of the patches that already exist, which may or may not be consecutive in time (see the ones overlapping with patch number 13 in Figure 7). As can also be observed, consecutive patches (such as number 1 and 2, or 8 and 9) may have a small overlap with the new patch. For this reason, a new approach is used that consists in joining consecutive patches to maximize the intersecting area. However, this is not recommended for contiguous non-consecutive patches since the drift between them might be significant (e.g., patches number 1 and 6). The proposed approach involves three steps: (1) search for patches intersecting with the new one; (2) search for consecutive patches among those previously selected; and (3) join the patches that are found to be consecutive. The resulting patches are the result of combining the points of the two surfaces and representing them in the frame I of the earliest created patch.

Scan Matching
In order to execute the probabilistic registration algorithm, given two overlapping scans S i and S n with related posesx S i andx S n , an initial guess q 0 = N(q 0 , P q 0 ) of their relative displacement is necessary. This can be easily extracted from the state vector using the tail-to-tail transformation: where ⊕ and are the compounding and inverse compounding operators as defined in [30]. Since the tail-to-tail transformation is actually a non-linear function of the state vectorx k , the uncertainty of the initial guess can be computed using: where H is the Jacobian computed as: where J 1⊕ , J 2⊕ and J are the Jacobians of the compounding and inverse compounding functions as defined in [30]. Finally, 0 6×6(n−i−1) and 0 6×6(i−1) are zero matrices whose dimensions are determined according to the position in the state vector of the surfaces to be registered. Once the initial displacement guess is available, the registration algorithm presented in Section 3 can be used to produce an updated measurement of this displacement.

State Update
The initial guess in Equation (49) defines the relationship between two patch poses in the state vector. This can be expressed by means of the following measurement model: z k being the estimated displacement q min and v k a zero-mean white Gaussian noise with covariance P q min accounting for the errors in the registration process. Given that, the standard EKF equations can be used to update the state vector.

Experiments and Results
The algorithm has been used to produce the maps for two different underwater datasets. The first one is a bathymetric (2.5D) survey carried out by the Sirius AUV [35] on a site of geological interest off the coast of Tasmania (Australia) which has been previously used for bathymetric SLAM [22], while the second one is a full 3D dataset gathered in the Sant Feliu de Guíxols Harbor (Spain) using the Girona 500 AUV [36] with the multibeam mounted on a pan and tilt unit. The parameters and thresholds that were set for the execution of the algorithm in these experiments can be found in Table 1. Unfortunately, none of the datasets used during the experimental testing have ground truth of the terrain. Therefore, the only option to assess the performance of the algorithm is evaluating the consistency of the resulting map.

Bathymetric Survey
This dataset includes depth from a pressure sensor, bottom lock velocities from a DVL, attitude measurements from an AHRS and bathymetric data from a multibeam echosounder installed in the conventional down-looking configuration. The mission surveyed a rectangular area of geological interest several times to generate multiple loop closures. The explored area, mainly flat, has a number of pockmarks with depths of approximately three meters. Figure 8 shows the elevation maps built using the dead reckoning navigation (Figure 8a) as well as the one obtained with the proposed technique ( Figure 8b). In these two maps, it is possible to observe several differences in the pockmarks. While in the corrected solution (Figure 8b), the pockmarks appear clearly and without much bathymetry-related artefacts on the dead reckoning map, and they are blurred and with some artefacts.
To better assess the correction, the consistency-based error [37] is computed for each cell of the bathymetric map. In Figure 9, it can be seen how the areas of high discrepancy (yellow to dark red) on the dead reckoning error map (Figure 9a) are drastically reduced when the proposed technique is applied (Figure 9b). Table 2 contains the numerical evaluation of the results over the bathymetric data. There, it is possible to see that using the 2.5D statistics (Sum and Mean for the consistency-based error) the improvement is around 19%. Moreover, an additional 3D statistic we have named #Cells has been computed. This statistic consists in counting the number of cells that each map occupies within the same 3D grid. If a map occupies less cells, it is probably because their point clouds are more densely packed due to a better registration. Using this statistic, the improvement of the proposed approach compared to the dead reckoning navigation is 2.17%. Table 2. Numerical results of the algorithm applied to the pockmarks dataset. The first column (Sum) contains the sum of the error in all the cells, the second one (Mean) contains the mean of the error while the 3rd one (#Cells) contains the number of cells occupied on a 3D grid of 0.5 m resolution.

Sum
Mean #Cells

3D Experiments
The data was gathered during some field trials for the MORPH European project in 2015. The experiment involved a formation of four marine vehicles (an Autonomous Surface Craft (ASC) and 3 AUVs) exploring a submerged area of the St. Feliu harbor. The Girona 500 was leading the formation while exploring with the multibeam sonar mounted on a pan and tilt unit ( Figure 10) both the seabed and the pier walls, so the formation could be adapted to the presence of obstacles. The mission performed one and a half loops following a zero-shaped trajectory at one corner of the harbor (Figure 11).
During the experiment, the Girona 500 ( Figure 10) was equipped with a DVL, an AHRS, a pressure sensor and a multibeam echosounder. An acoustic modem on Girona 500 was also used to gather position measurements from a USBL mounted on the ASC navigating on the surface with help of a GPS receiver. The multibeam mounted on the pan and tilt unit allowed us to get full 3D scans by vertically steering the multibeam in front of the robot. Note that, in this experiment, the closure of the surface patches is determined by the completion of a sweep of the pan and tilt, and not by the size or richness of the covered area (see Table 1).  As far as we know, there is no general method to evaluate the consistency of a 3D map. However, it is possible to use the 3D statistic #Cells presented in the previous section. As previously commented, if a map occupies fewer cells, it is probably because their point clouds are better registered. Nonetheless, this has to be supervised since it is also possible to find other positions of the point clouds that can minimize the number of occupied cells. For this reason, the consistency of the 3D experiments will also be evaluated subjectively (visually assessing the consistency) as well as numerically (counting the number of occupied cells).
The top view of the 3D maps produced after the experiments are presented in Figure 12. There, three surfaces are created for different navigation methods: dead reckoning (Figure 12a), USBL-aided ( Figure 12b) and the currently proposed algorithm (Figure 12c). Regarding the number of occupied cells, the proposed method occupies 32570 cells, 5.76% less than the dead reckoning model (34559) while the one aided by the USBL occupies 7.24% less cells (32057). Moreover, the black squares represented in each one of the views highlight the places where it is easier to observe the consistency of the map near to the harbor wall. This area is analyzed in detail in Figure 13. In the left column, the one corresponding to the dead reckoning navigation (views Figure 13a,d,g), clearly shows two parallel lines on the point clouds which correspond to the wall being observed during the first and second laps of the mission. In the other two columns, the one corresponding to the USBL navigation (views Figure 13b,e,h), and the one of the proposed SLAM algorithm (views Figure 13c,f,i) show a single wall, and, thus, a better agreement between the different scans. However, if the point cloud from the USBL navigation is analyzed in detail in the bottom left corner (see Figure 13h), there are still some residues of the two observations of the wall that do not appear in the one from the proposed approach. (2) USBL-aided (b, e and h) and (3) proposed approach (c, f and i).

Conclusions
This paper has presented a probabilistic underwater 3D SLAM for multibeam sonar data that deals with the subdivision of the surface into patches, taking into account the motion uncertainty during their formation. An adaptive sampling procedure for the sensor data has been introduced to deal with areas of the patches that are not relevant (i.e., without relief) to avoid the pICP converging to local minima as well as reducing the computational time. Furthermore, an heuristic has been used to decrease the complexity of the association step of the pICP from O(n 2 ) to O(n) taking advantage of the probabilistic ellipsoid of each point and using a support grid.
The algorithm has been tested using two real world datasets. In both of them, it is possible to observe how the consistency of the model obtained using the proposed algorithm is higher than that obtained with dead reckoning and is even comparable to the one obtained using USBL navigation in the case of the 3D dataset.
Future work will have to focus on correcting the internal patch error. In the method presented here, only the relative positions of the patches are corrected, but the patch itself is not modified once closed. Although the proposed method has been proved to be useful for obtaining consistent maps, it is not possible to use it online due to its computational cost if the point sampling is not tuned properly. Therefore, further investigation could be done in this field to allow the algorithm to work online. Finally, in the future, we plan to test the algorithm using a camera-laser system, which produces data of similar characteristics to that of a multibeam sonar (2D swath profiles) but with a much different uncertainty level in the measurements.