# Reactive Obstacle-Avoidance Systems for Wheeled Mobile Robots Based on Artificial Intelligence
## 4 Results and Comparisons
### Case I: Mobile Robot and Fuzzy Logic  
The tests of the reactive fuzzy navigation system were carried out in a computing laboratory. The Kinect sensor's height is 0.78 m with a vertical tilt of 0 degrees, and it is located on the mobile platform Era-Mobi. The fuzzy control system works on the depth images, using the RGB images as a human visual reference. One thousand experiments were run to compute execution times for the analyzed system, where the image capture time, the running time for each of the four stages, and the total time are measured. The computing of the turning _angle_ by using fuzzy control requires a higher consumption of computational resources. The morphological reconstruction process expends the least time with 4.8 ms, where the fuzzy reactive navigation system performs its operations in a range between 38.9 ms and 43.5 ms. The Kinect sensor at 30 Hz requires an approximate time of 33.33 ms. A client system was programmed. In addition, a client/server player application is implemented on the robot's onboard computer to communicate and execute the mobile robot's turning angle. In the performed tests, the system made accurate decision choices regarding the turning to avoid obstacles in 85.7% of the attempts. Figures 11 and 12 show the system performance in the test environment with no object movement and moderate lighting. Parts (a) and (b) show the RGB image and its corresponding depth image, respectively. Part (c) shows the output of the fuzzy system, which processes and identifies depth in each division of the image, gives linguistic values, and produces the turning angle in degrees (see part (d)), respectively. It is shown that the system tries to follow the path with the lowest probability of collision, reporting stability  
while going through spaces with known information. Depending on the amount of known data, the system infers if it must either ignore them or consider them for computing the average depth for each sub-image. On the one hand, Figure 12 presents a situation where there are many objects that are obstacles, and the fuzzy control indicates to turn left, which has a value of \(-90.00^{\circ}\). On the other hand, for Figure 11, the system determines a soft turn of \(-20.08^{\circ}\). It is possible to examine the behavior for the output variable (turning angle) using the combination of the inputs that vary as a product of possible changes in the environment (obstacles or noise) and a constant input. Part (d) is the inputs of the _turnAngle_ function, which produces an angle for avoiding obstacles. Algorithm 1 presents a pseudo code, where \(V_{i}\) are computed from \(D_{i}\), and the rule set is described in Table 1.  
```
FunctionturnAngle Angle in sexagesimal degrees Input\(Left(x)\), \(Front(y)\) and \(Right(z)\) Output:\(turnAngle(x,y,z)\), \(fuzzification1(x)\), \(fuzzification2(y)\) and \(fuzzification3(z)\) for each member \(i\) of the \(Ruleset\)do \(W_{i}=fuzzyOperation1\) AND \(fuzzyOperation2\) \(V_{i}=D_{i}\) endfor \(turnAngle=\frac{\sum_{i=1}^{N}W_{i}\approx V_{i}}{\sum_{i=1}^{N}W_{i}}\)
```  
**Algorithm 1** Main fuzzy control function. Figure 11: Examples of operation by using Era-Mobi: (**a–d**) simple path. Figure 12: Examples of operation by using Era-Mobi: (**a–d**) path with many obstacles. The Sugeno fuzzy inference system is chosen instead of the Mamdani system, since it is not necessary to generate information for the human being, but for motor control. Additionally, this allows a lower computational load because the Sugeno approach does not require any fuzzification module. The three aspects of analysis considered were: (1) image format, (2) number of bits for representing depth, and (3) membership function. The first aspect is related to image formats that Kinect can process: point cloud and depth images. We generate the same image using point cloud images and depth images, and we observe that point clouds need significantly more disk storage space than depth images (on average, about 1 MB per capture).