## 3 Results and Discussion  
In this study, the developed tennis ball collection robot was tested in various conditions, and its performance was analyzed. As mentioned in the flowchart of Figure 9, after starting the mission, the robot began to create a 2D map of the working environment using Hector SLAM. An example of the generated map is shown in Figure 18.  
The map generation algorithm was tested in various indoor environments. The Hector SLAM map generation algorithm has its advantages and disadvantages. An advantage is that it is independent of odometry data. Therefore, the map generation software can be run individually, and only its results are used to control the robot. However, due to a lack of odometry feedback and fusion techniques, such as the Extended Kalman Filter, the generated 2D map may include some inaccuracies. Figure 17: Fuzzy rule base. Figure 18: 2D map generation using Hector SLAM. Tennis ball detection is an important part of the mission. The applied algorithm should be strong enough to handle various environment illuminations. It should also be applicable to minicomputers such as Raspberry Pi and able to process enough frames per second (FPS). In this study, the applied YOLOV5 method supplied 9 FPS. The supplied FPS is not a high value, but considering the low speed of the robot during ball collection operation, the supplied FPS was enough for this application. A comparison was done between the applied YOLO algorithm and the tennis ball detection using green pixels intensity ranges. For this purpose, the grabbed frames changed to the HSV (Hue Saturation Value) protocol, and based on the intensity values of the tennis balls in different environment illuminations, upper and lower limits were defined for the Hue, Saturation, and Value parameters. Both algorithms were tested to detect the 20 balls in three different indoor and outdoor environments. Even though the pixel intensity ranges provided higher FPS, the accuracy of the YOLO method was higher. The comparison results are mentioned in Table 1.  
For the robot path planning and navigation using a single camera and a lack of depth information, the camera frame was divided into 15 regions, as explained in Section 2.5. An example of this implementation is shown in Figure 19. The binary image related to the selected pixels is also shown. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Supplied FPS** & **Detection Accuracy** \\ \hline YOLOv5 & 9 & 91\% \\ \hline HSV intensity limits & 21 & 71\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison between tennis ball detection YOLOV5 and HSV pixel intensity limits. Figure 19: Path planning using a single camera with 15 regions of the camera scene. Figure 20 depicts the placement of 23 tennis balls in one-half of a tennis court to evaluate the performance of the developed algorithms. The origin of the figure was the base station where the tennis court net was placed. The robot started its motion from the base point. While implementing the explained path planning algorithm, the robot began to collect the tennis balls that were distributed on the court. The path followed by the robot is shown in Figure 21 and was based on the encoders' data. As previously stated, if the robot failed to detect a tennis ball, the search function was activated. While implementing the function, the robot began to rotate in a clockwise direction until a tennis ball was detected or the mission ended. As depicted in Figures 20 and 21 (91%) tennis balls were successfully detected by the robot's YOLO algorithm. These balls are shown in green and blue colors. The green points successfully collected 19 tennis balls, which represents a success rate of approximately 83%. The blue points are the detected but not collected balls. There are two primary causes for the failure of this call collection. The first problem was structural as the robot collided with the balls and sent them in unintended directions as opposed to collecting them. This typically occurred when the balls were grouped closely together.