# Field Navigation Using Fuzzy Elevation Maps Built with Local 3D Laser Scans
## 6 Multithreaded Computation of FEMs and FRMs  
The onboard computer of Andabata has a processor with four physical cores, but it employs simultaneous multithreading to divide each core into two virtual units, resulting in eight independent virtual cores. This section discusses how to employ the multithreading capability of ROS in the virtual cores to enhance the output rate and steadiness of FEMs and FRMs.  
With an horizontal resolution of \(2.4^{\circ}\) for the 3D laser scanner, a filtered 3D point cloud is obtained every \(3.75\,\mathrm{s}\), with \(60,000\) laser points approximately (this number depends heavily on sky visibility, that reduces the number of valid ranges). However, the calculation of the FEM and its FRM (performed by the Map node) takes much more time. This time depends on the total number of 3D points and on the processor load.  
Figure 11: Lateral (**top**) and aerial views (**bottom**) of the FEM (**left**) and FRM (**right**) associated with the filtered 3D point cloud of Figure 7.  
To increase the output rate, the calculation of the FEM and the FRM has been parallelized into two threads inside the Map node by separating the calculation of Equation (8) to that of Equation (9). For further improvement, the Map node can be launched two or more times working on different 3D point clouds.  
To decide which 3D point clouds will be processed and which will be discarded, the Cloud_selector node has been developed (see Figure 4). When a Map node becomes available, it is necessary to decide to employ the previous received 3D point cloud or to wait for the reception of the current 3D point cloud. Moreover, in case of using multiple Map nodes, it can also be of interest to wait for future 3D scans to avoid the processing of consecutive 3D laser scans (introducing one or more spacing).  
Figures 12 and 13 show timetables with the output rates of the 3D point clouds, FEMs and FRMs using the previous and actual 3D scans, respectively. In these figures, different selection strategies have been employed by the Cloud_selector node. Processed 3D point clouds are colored and the same color is employed to indicate when its corresponding FEM and FRM have been obtained. Discarded 3D point clouds are not colored at all.  
Table 1 compares the map age (i.e., the time employed to produce an FEM and its FRM from a filtered 3D point cloud), the interval between consecutive maps and their respective standard deviations for different selection strategies. When using the current 3D point cloud, the age of the map is smaller, but the interval between maps is greater than when using the previous 3D point cloud. The best map age can be obtained by processing the current 3D point cloud with only one Map node. On the other hand, map interval can be improved by using more Map nodes. The ideal strategy would be the one that minimizes both map age and map interval. A compromise between both objectives can be achieved by using two Map nodes and one forced spacing with the previous point cloud. Consequently, the latter is the selection strategy adopted for autonomous navigation of Andabata.  
Figure 12: Output rate for the 3D point cloud, FEM and FRM using the last received 3D point cloud with one Map node (**a**), two Map nodes without forced spacing (**b**) and two Map nodes with one forced spacing (**c**).  
Figure 13: Output rate for the 3D point cloud, FEM and FRM using the current 3D point cloud with one Map node (**a**), two Map nodes without forced spacing (**b**) and two Map nodes with one forced spacing (**c**).