## 5 Results and Discussion
### Self-Localization  
After automatically calibrating the magnetometer, the robot was driven in a circle across the corridor of the EE building of the University of King Abdulaziz. One test was conducted clockwise, and another was conducted counterclockwise. A Google Maps aerial photograph was used to record the positions of the resulting trajectories. The trajectory was recorded by considering the aspect ratio and orientation of the building. The result of the self-localization is shown in Figure 9.  
Figure 9 shows red and blue colors, and each color represents a trajectory direction-wise--either clockwise or anticlockwise. The red measurement is recorded for the clockwise trajectory, and the blue color trajectory denotes the counterclockwise direction. From the results, it can be seen that there is a small deviation in each trajectory. This deviation is due to the accumulation of past values in the present value. To perform further analysis, the error accumulation keeps increasing, and the results deviate from the present value. However, the error can be further reduced through more calibration and control, but the residual value improvement is not that much, and the computational complexity continues increasing. The results also show that the first three tracks are exactly parallel to one another, and a slight deviation is found in the fourth track, which can be improved. As mentioned above, there are many causes of errors in the trajectories. The first reason could be poor magnetometer calibration. The variation in the calibration is due to the rotation of the angle or other interferences. The interference could be due to other sources of interference in the building, which can cause deviation. Examples of these sources could include the transmission lines, waves from undesired interfering sources, and the railing stairs. The experimental data are given in Table 1.  
Figure 9: Self-estimates of robot position. The results validate the usability of our approach and show auto-MERLIN to be a ready robot for short- and long-term tasks, showing better results than using a default system--particularly when deployed in highly interactive scenarios. The results show that the proposed approach is less complex and provides better trajectory planning accuracy. An experiment was conducted to compare the proposed approach with the A-star algorithm. The results showed that the proposed system better covers the distance from the doctor's office to patient room A. The cumulative distance covered by each approach is noted in Table 2.  
Gazebo is an open-source 3D robotics simulator that can be used to simulate the different environments over which robots navigate. A Gazebo simulation framework was used with the robot operating system (ROS) integration for Lidar sensor configuration, and the results are shown in Figure 10. The model was trained in four steps using our suggested multistage training-mechanism-based technique. Utilizing the Gazebo simulation framework with the help of ROS integration, we created four training scenarios, as shown in Figure 10. Each of the simulation environments corresponds to one of the training phases. Our customized TR was chosen to train our model, and its starting position was predetermined. In this simulation environment, the navigation success rate (NSR) was evaluated. The NSR is the TR's success rate in navigating toward its destination without collisions. The estimated NSR was calculated as an average of 500 navigations. The navigation of the TR was successfully calculated, and the experiment is shown in Figure 10. In each of the given frames, an environment is shown and the robot's navigation can be observed. In the scenarios, the robot was successfully maneuvered, and 3D results were obtained with the help of Lidar.