*5.3. Verifying the Deep Learning-Based Localization Switching Method to Solve Corridor Effect*

The location of the experiment is a corridor at the National Taiwan University of Science and Technology, as shown in Figure 16. The red line is the ground truth of the experiment. Marks are spaced every 5 m, and the total length is 88 m.

**Figure 16.** The practical corridor environment for experiments.

5.3.1. Evaluation of the Deep Learning-Based Corridor Recognition Method

Because we consider the corridor recognition problem as the binary classification problem, we collect two types of point-cloud data: the data of corridor area and the data of non-corridor data. Then we preprocess the collected 2D LiDAR images as mentioned in Section 4.2 and split the training/test dataset in a ratio of 9:1. Furthermore, due to small amount of 2D LiDAR data, we apply some data augmentation operations, such as flip and rotation, to enrich training data. As shown in Table 4, compared to the traditional Support Vector Machine (SVM) [24] classifier, the deep learning-based.

**Table 4.** Results of corridor recognition models.


Models have better accuracy results in the test dataset. The LeNet-based model has only about 1.2 million parameters for the model size comparison, while its accuracy is similar to the bigger InceptionV3-based model. This guarantees that our proposed deep-learning-based model can be deployed on AGV and give a reliable and effective performance.

5.3.2. Verification of the Localization Switching Method in Practice

On the experimental corridor, we first manually move the mobile robot along the ground truth to record the trajectory of SLAM localization. Simultaneously, the deep learning-based classifier also is used to detect the long corridor regions. As the experimental results (shown in Figures 17 and 18 and Table 5), it is impossible to complete the trajectory tracking and localization task if using SLAM only. Otherwise, by switching between SLAM and odometry localization system using our proposed method, the AGV can complete the trajectory tracking even in sparse LiDAR feature environment. Our experimental results proved the effectiveness of the deep learning-based localization switching method that involve improved Pure Pursuit robustness and feasibility.

**Figure 17.** The tracked trajectory comparison. The red line is the ground truth, The blue line is the SLAM method, and the green line is our method's trajectory method.

**Figure 18.** The complete trajectory tracking of our proposed method in practice.

**Table 5.** Results of corridor recognition models.


#### **6. Conclusions**

To improve the trajectory-tracking accuracy of the original Pure Pursuit algorithm when following the turning path, we propose an improved Pure Pursuit algorithm that adds the functions of predicting the next turn and adjusting speed in the current turn. In structure-less environment AGV localization, this paper introduces a deep-learning-based corridor area classifier using 2D LiDAR data to select a suitable localization system to solve the corridor effect. The practical experimental results verified that the maximum error of the modified Pure Pursuit is within 45 mm, with a 77% improvement rate compared to the original Pure Pursuit. The improved Pure Pursuit algorithm also increased the speed by more than 5.6%. Moreover, the proposed localization switching method using deep learning helps to increase 36.25% of completion rate higher than that only using SLAM localization, prove the robust effectiveness of the proposed method in practice.

**Author Contributions:** P.T.-T.N. is responsible for revising papers, design deep-learning based localization switching method, verify experiments; S.-W.Y. is responsible for designing SLAM and Odometry localization, design deep-learning based localization switching method; J.-F.L. is responsible for path planning part and improve PurePursuit trajectory tracking method; C.-H.K. is the advisor who orients research direction for the paper, gives comments and advices to do this research. All authors have read and agreed to the published version of the manuscript.

**Funding:** Ministry of Science and Technology, Taiwan under Grant MOST 109-2221-E-011-112-MY3 and the "Center for Cyber-physical System Innovation" from The Featured Areas Research Center Program within the framework of the Higher Education Sprout Project by the Ministry of Education (MOE) in Taiwan.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.
