## 5 Implementation and Experimental Results

Table 4: The system specification of an edge and a fog robot server. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Modules** & **Tasks** & **Servers** & **Fog Computation Types** & **Functionality** \\ \hline \multirow{2}{*}{Listening module} & Speech recognition & Google Cloud & Cloud–fog-edge & High performance computation \\ \cline{2-5}  & Semantic parsing & Link Parser & Fog-edge & Computing power \\ \hline Vision module & Object recognition & Yolo & Fog–edge & Computing power \\ \hline Motion module & Object handling & Motion application & Edge & Security and privacy \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The functions of the robot and service types. Figure 6: The schematic of the FaaS-FR service implementation with an edge of low computing power. Figure 8 shows the results of the vision module with a fog server. When the module of SCS of the robot captures the RGB-D data by using an Xtion sensor, the SCS executes the vision processing in the fog cloud by transferring the acquired data. The fog server receives the data and processes an object recognition algorithm that needs a relatively higher computing power and then transfers the results of the processing to the cognitive system. Figure 8a,b shows the RGB and depth data of the Xtion sensor. Figure 8c shows the result of object recognition using Yolo. The vision module had the results of BBX and labels of the object were offloaded on the cloud fog server. Figure 8d shows the 3D view of the scene using OpenGL library to get x, y, z coordinates of the cloud points from the acquired RGB-D data, which were processed in the fog robot server. Figure 8e shows the result of 3D object recognition obtained by using 3D segmentation on the BBX area of the object. It provided x, y, z coordinates of the object to be used for the handling of the robot hand  
For the action to handle objects, the action module analyzed the meaning of the ordered sentence. The argument of the sentence was linked with the cup in the object descriptor and searched the position and pose of the object. Figure 9 shows the motion executing an episode, \"bring the cup to the front of the bottle.\" The order was an episode and divided with primitive actions: (a) \"identify the cup,\" (b) \"pick up the cup,\" (c) \"move the hand to the front of the bottle,\" and (d) \"place the cup.\" These primitive actions are executed with atomic functions. In this paper, FaaS-FR model was tested by comparing the two fog computing types. Table 6 shows two sentences and their speech signals for testing FaaS-FR. Two sentences, \"bring the cup\" and \"bring the cup to the front of the bottle\" were tested with the link parser cloud in textual syntactic parsing and Google Cloud for speech recognition. Figure 10 shows the average service times of 20 times of trial with two types of FaaS-FR models to utilize the Google Cloud for speech recognition. The service time was measured with the duration between the start of packet sending and the end of result receiving in the edge applications. The graph shows that the cloud-fog-edge type is better in the service time. Figure 11 shows link parser service time. We can see the fog-edge type is best to reduce the service time. From the results of the two cases, the service time of the services is not proportional to the size of the data. The syntactic parsing shows that the service time performance between cloud-fog-edge and cloud-edge is largely different, but the speech recognition produces a relatively small difference. It could be related to networking delays including processing, queuing, transmission, and propagation delays as well as the computing time of the clouds. Therefore, when one selects a fog computation type, a previous performance test is needed. Figure 7: A test bed of FaaS-FR using Raspberry Pi. (**a**) The service robot, (**b**) a Raspberry Pi and perception and behavior modules.