Detection and location of surfaces in a 3 D environment through a single transducer and ultrasonic spherical caps

In this paper, an ultrasonic arc map method for flat mapping is extended to three-dimensional space replacing the circumference arcs by spherical caps. An enclosed environment is scanned by employing a single ultrasonic device. The range, position, and orientation of the transducer are used to digitize the uncertainty caps and place them in a three-dimensional map. Through the spatial voting method, the generated voxels are elected in order to distinguish those which mark the true position of an obstacle and discard those that are produced by cross talk, noise, fake ranges, and angular resolution. The results show that it is possible to obtain sufficient information to build a three-dimensional map for navigation by employing inexpensive sensors and a low power data processing.


Introduction
Ultrasound is an acoustic method used to measure distances and locate objects.It is widely employed in medicine, oceanography and non-destructive tests to produce images.In robotics, sonar is used to detect obstacles and make maps.Mobile robots are equipped with sonar arrays to explore unknown environments in which they are capable of doing autonomous motion.In the last decade, ultrasound has been displaced by optical methods like LASER systems, infrared scanners or digital cameras (Jaramillo, Prieto, & Boulanger, 2007).Compared with light waves, one of the most important disadvantages of ultrasound is its wide beam pattern; however, the inexpensive sensors, the low power that computer requires in data process (Restrepo G., Loaiza Correa, & Caicedo B., 2006) and the sound wave property to travel through foggy air or muddy water make sonar a very good option to provide information for autonomous navigation in robotics.
The most common use of sonar is pulse-wave (Xiaole & Lichen, 2012) and the ultrasound transducer is typically modeled by a flat piston enclosed in an infinite surface baffle (Kinsler, Frey, Coppens, & Sanders, 2008).The transducer emits a pulse inside a beam pattern and the measurement has two important uncertainty sources (Hansen, 2012;Murino & Trucco, 2000;Przybyla, et al., 2012;Shi, Chen, Lin, Xie, & Chen, 2012): (a) Range resolution δR, inability to distinguish two objects in the same direction line but at different distances, and (b) angular resolution δβ, inability to distinguish two objects at the same distance but different orientations or angular positions (Figure 1).Using a single transducer, the pulse-echo method can provide the distance from the sensor to an obstacle but it cannot provide the position with the same accuracy.Normally, the range resolution (δR) is much smaller than the angular resolution (δβ) and it is diffi cult to exactly locate obstacles and differentiate between planes, edges and corners (Barshan & Kuc, 1990;Restrepo Girón, Loaiza Correa, & Caicedo Bravo, 2009).When a single transmitterreceiver is used, the angular resolution is defi ned by the divergence angle of the beam pattern in the far zone.This paper presents an extension of a UAM fl at methodology to three dimensions by employing a simple transducer in the air.To do that it is necessary to estimate the location of the obstacles inside the uncertainty spherical cap caused by the angular resolution instead of the circumference arc.

Methods and instruments
To build a 3D obstacle map, the method proposed in this paper, uses the measured ranges R and the beam angle θ 0 to make digitized uncertainty caps.Knowing the position (x,y,z) and orientation (ϕ,θ,ψ) of the sonar, the uncertainty caps are placed into a 3D mesh map.Through a UAM method, the fake points are discarded and fi nally a 3D obstacle map is produced (Figure 2).The width beam angle θ 0 is a function of the wave-length λ and the transmitter radius α, and is given by Barshan & Kuc (1990) and Bozma & Kuc (1991) as it follows in Equation (1): In order to reduce the uncertainty of where obstacles are located, some authors have proposed to divide the plane into a grid where the square side has the same size of the range resolution and the localization uncertainty is represented by an arc.Probabilistic and statistical (Borenstein & Koren, 1991;Cañas & García-Alegre, 1999;Elfes, 1987;Lee, Cho, Chung, & Lee, Y., 2006;Lee, Lee, Y., Kölsch, & Chung, 2013;Lim & Cho, 1992;Moravec & Elfes, 1985), fuzzy logic (Gasós & Martín, 1996;Noykov & Roumenin, 2007), neural networks Kang, An, Kim, & Oh, 2010;Thrun, 1998, and ultrasonic arc map (UAM) (Barshan B., 2007) are used to build a mesh map where each square has an occupancy mark.The probabilistic and statistical methodologies have been extended to three dimensions to build a spatial map for underwater navigation in (Auran & Silven, 1996;Fairfi eld, Kantor, & Wettergreen, 2007).In Ribas, Ridao, & Neira (2010) the authors build 3D maps by stacking fl at ultrasonic arc maps.

Cap rasterization
The process to digitize images is called rasterization and its basic units are the pixel in the plane and the voxel in the space.These units are very useful in digital systems due to their integer representation and easy arithmetic process.The computer graphics algorithms are the most used to rasterize and in this paper they are employed to digitize the uncertainty of the position of the obstacle.
In the 3D space, the localization uncertainty could be represented by a spherical cap (Figure 3).This cap has a thickness equivalent to the range resolution and its base radius r and height h are determined by the measured range R and the beam angle θ 0 through the well-known expressions ( 2) and (3): By employing the Bresenham algorithm for plotting circles (Bresenham, 1977) it is possible to rasterize the sphere by dividing it in circular slides and then digitizing those circles (Montani & Scopigno, 2009).This algorithm should be modifi ed because it produces gaps (Roget & Sitaraman, 2013) and the number of absentee voxels increases as a quadratic dependence of r (Bera, Bhowmick, & Bhattach, 2014).If the size of the cubic voxel side equates to the range resolution δR, then the measured range R is an integer multiple of δR and it should be used as the integer radius of the rasterized spherical cap.The other required input is the width beam angle θ 0 ,usually provided by the manufacturer of the transducer.The cap is built by making a disk on the plane XY where each concentric circumference is a slice of the cap.The height (z) and radius of each slice (rc) are calculated using the circle algorithm (Figure 4); in each iteration these values are modifi ed to follow a circumferential arc on the YZ plane.Each slice over the XY plane is made by using again the circle algorithm (Figure 5) where the coordinates are calculated for a quadrant and the voxels are assigned by symmetry (Figure 6).In this manner, a fully digitized cap is made over a 3D space, with its origin at (0,0,0), centered and symmetric on the Z axis and with no gaps (Figure 7).The side of each voxel in the cap is the size of range resolution.According to the methodologies for building mesh maps, the cap could be moved through transformation matrices to any place in space and a weight could be assigned to the voxels as described below.

UAM
The UAM methods were developed on robotics to solve issues concerning the detection of edges, corners, curved surfaces, and thin objects for map-building purposes.
Simple pulse-echo sonar devices are employed to scan the environment and the measured ranges are obtained through the time of fl ight.
In order to build a map, the measured range, the orientation and position of the transducer are used to estimate an uncertainty arc.Each arc is rasterized and placed on a mesh map.The real refl ection points are usually "touched" by several arcs and those that cross each of them reinforce the point on the map where an obstacle is really located.Some UAM techniques are spatial voting (Barshan B. , 1999), morphological processing (Baskent & Barshan, 1999), triangulation based fusion (Wijk & Christensen, 2000), arc-transversal median (Choset , Nagatani, & Lazar, 2003) and directional maximum (Barshan B., 2007).
The spatial voting algorithm discards the false points produced by noise, crosstalk, specular refl ection and the angular resolution.In order to achieve the above, this paper uses spherical caps instead of circumference arcs, as follows: fi rst, each measured range produces an uncertainty cap located on a mesh map through a transformation matrix T using the position (x,y,z) and orientation (ϕ,θ,ψ) of the transducer (Figure 8).When a particular point on the map is reached by a cap, a value of 1 is assigned to it.Each time that a cap reaches this point, its value is added by 1 (Figure 9), then the number of votes matches the number of caps that crossed this particular point.Finally, those points that have a number of votes higher than a threshold (Th) are elected as the location of an obstacle (Figure 10).

Instruments
In order to scan the 3D environment, a kind of theodolite was built.This "theodolite" consists of a single pulse-echo transducer mounted on a mechanism with two degrees of freedom (Figure 11).The mechanism is capable of rotating 360 degrees in the vertical axis and 180 degrees in the horizontal axis.The ultrasonic transducer is the SRF02, it measures distance in integer centimeters (δR = 1 cm) and according to the manufacturer (Devantech Limited, 2012) it transmits an 8 cycle 40 kHz burst per ranging and has a wide beam angle of 60 degrees at -6 dB and 124 cm of range detection (δβ ≈ 0,5 R).The use of a wide beam pattern allows the evaluation of the robustness of the proposed method against the disadvantage of angular resolution.
The device transfers 16-bit unsigned result from the latest ranging through a serial protocol.The ranging lasts up to 65 ms, the minimum measurement range varies from 15 to 18 cm and the maximum measurement range is 249 cm.The transducer and motors were driven by a microcontroller ATMEGA328P, linked to a virtual instrument running on a PC to do the data acquisition and movement control.
At each position, the transducer was oriented every 30 degrees in both rotation axes, enough to allow consecutive caps to cross themselves whenever the transducer detected a same plane.A single range measurement was taken per each posture and a new posture was set every 100 ms.

Experiments and results
In order to evaluate the proposed method, a small enclosure space was scanned in the corner of a room under a desk.The space limits were two room walls, two fences, the room fl oor and the desk table (Figure 12).The distance between the walls and the fences in front of them was 140 cm, the height between the room fl oor and the table desk was 73 cm, and the length of the desk table from the wall to the border side was 59 cm.Inside the closed space, the "theodolite" was placed on a mesh board (XY plane) and moved to different positions that were separated by 10 cm.Data processing was as follows: only ranges from 0 to 255 cm were accepted.Then, a spherical cap was computed for each range.After that, each generated cap was placed in space by using the position of the "theodolite" (x, y, z), the orientation of the vertical axis (ϕ) and the horizontal axis (θ) through the following transformation matrix (Barrientos, Peñín, Balaguer, & Aracil, 2007) given by Equation ( 4 Then, an uncertainty cloud containing all the possible positions of the refl ected points was produced.Finally, by applying the spatial voting, the true voxels were obtained and the fake points were discarded. The raw data set produced a cloud containing 30 503 points where it was very hard to distinguish the surfaces by eyesight (Figure 13).After the spatial voting, the resulting 96 046 elected voxels produced clouds where it was possible to distinguish clusters associated to the desk table, the walls, the fences and even the chest of drawers (Figure 14 and Figure 15).

Discussion
Using the proposed method, it is possible to locate the obstacles in a more effective way than using cells as in (Auran & Silven, 1996).This is because the angular resolution is divided into cubic voxels (δR × δβ × δβ size, 1 cm 3 in this case) for all the scanned space instead of cells (δR × δβ × δβ size) where the volume of each cell increases with the distance (approx.0,25R 2 in this case).Secondly, the computational cost of the proposed method is lower than the Bayesian method used in (Fairfi eld, Kantor, & Wettergreen, 2007), because in the proposed method only the cap is rasterized and it is not necessary to compute all the uncertainty cone and store all the weights of the non-occupancy voxels.Further, the spatial voting method results in a mean absolute error of only a third and takes 10 % of the processing time than the Bayesian method on a fl at space (Barshan B., 2007).Thirdly, the spatial voting method produces dense clouds of points clustered near the actual location of surfaces, it is easy to implement and has good performance when building 3D obstacle maps.In spite of the wide beam pattern angle of the SRF02 (60 degrees), an uncertainty cap radius of 50 % of the measured range, and other strong uncertainty sources like mechanic backlash and vibrations, the method provides acceptable clusters of points to represent the obstacle position in space.The algorithms are easy to embed in a digital system, however, the amount of memory that is necessary for data processing constitutes the principal limitation.
Future research may include scanning large closed spaces on small drones in order to make tridimensional maps from sonar and navigation data, embedding the algorithm in a digital system to develop a whole navigation instrument, and processing the resultant map through image reconstruction algorithms in order to obtain a virtual image from the real environment.

Conclusions
By voxelizing the uncertainty spherical cap, it is possible to extend the 2D mesh map methods to the 3D space.The experiment demonstrates that it is possible to distinguish surfaces in three-dimensional environments by using a single pulse-echo transducer.It may be possible to improve the resolution on other wave based systems by applying the proposed method.Applying the UAM techniques, the robots could do simultaneous localization and mapping (SLAM) and autonomous navigation in three dimensions by using inexpensive sensors, low computational cost, small integrated systems, and all the ultrasound advantages.

Figure 2 .
Figure 2. Method of building a 3D obstacle map suggested in this paper.Source: Authors

Figure 5 .
Figure 5. Algorithm to do a slice.Source: Authors

Figure 4 .
Figure 4. Algorithm to calculate the height (z) and the radius (rc) of the slices.Source: Authors

Figure 6 .
Figure 6.Algorithm to reproduce voxels by symmetry.Source: Authors

Figure 13 .
Figure 13.Points cloud from the raw ranges.Source: Authors