# Voice Interaction Recognition Design in Real-Life Scenario Mobile Robot Applications
## 3 Environment Map Generation through VSLAM  
A real-time appearance-based mapping (RTAB-Map) algorithm based on the concept of SLAM to generate the map of the environment is proposed in this study. The RGB-D cameras concurrently obtain the image and distance information. The RGB-D maps do not consume much computational time to calculate the distance, and approach better accuracy of position than the binocular or monocular camera. The proposed RTAB-Map SLAM algorithm is divided into three parts: (1) front terminal part, (2) rear terminal part, and (3) loop closure detection. The objective of visual odometry extracts the feature and information from the odometer's captured image, and plots the local map. The rear part is used to optimize the original maps and robot posture estimation and other processes. Figure 15 shows the Flow Chart of the RTAB-based SLAM. In the rear part, the speeded-up robust features (SURF) is used to extract and match the feature point purpose [33]. A Hessian matrix is applied to detect feature points; image integration is also proposed to speed up the calculation. The URF structure is a multiple-layer filter containing different filters in the same layer. Further, same-sized filters are contained in the different layers of URF. Therefore, the Vague coefficient of filter is gradually increased to reduce the captured process and improve the handing speed. SURF confirms the matching degree based on the Euclidean distance between two feature points, where the shorter distance presents the better matching degree. To calculate the visual odometry, the reference frame is obtained from the previous time and the current frame is defined in the now time. The reference frame is selected as the benchmark of the coordinate system, where it is matched with the current frame. The random sample consensus-perspective-n-points (RANSAC-PnP) [39] is taken to calculate the coordinate position of the current RGB-D sensor. The previous cycle is then repeatedly performed while the whole movement track of the RGB-D sensor is achieved. This path is considered the track of the mobile robot. The local map is selected as the matched feature point of the object of interest in the environment, and the real position and posture of the object are calculated through the matching procedure between the current frame and the feature point. The advantage of the local map method is that it can be modified based on the constructed information of each frame even when some of the resulting frames are wrong. Figure 15: Flow chart of the RTAB-based SLAM. In the rear terminal part, the SLAM procedure meets the error noise problem, which is gradually accumulated when operating in the front part. The error is a big amount because it is accumulated over a long period. Therefore, it appears that there is a huge gap between the constructed and the real maps; thus, collecting all the possible map information is necessary to complete the whole optimization. The optimization is added to the load tags from the previous motion trajectory, which is obtained in the front part; the prediction of the motion state is then approached to the desired target. After that, the second rank in optimization is achieved to obtain the better pose graph, which is needed to optimize the global map after updating the motion state. Because the object is continuously detected by the RGB-D sensor, the same object is always constructed, which causes some errors in the map. This research extracted the primary feature point to match the object and then, the position value was attained through the motion relationship. Through this, we were able to efficiently construct the dynamic motion of the mobile robot while generating and keeping the trajectory of the primary feature point. For the loop closure detection function, this study proposed the RTAB-map algorithm [15] to finish the real-time localization function of the robot. Figure 16 shows the flowchart of the RTAB-map algorithm.