# Reactive Obstacle-Avoidance Systems for Wheeled Mobile Robots Based on Artificial Intelligence
## 3 System Analysis
### Case I: Mobile Robot and Fuzzy Logic  
The first case is a self-navigating robot, which uses depth data obtained from the Kinect sensor, and provides knowledge from its working space. This information enables us to adjust soft turning angles by applying fuzzy rules. The robotic system considers uncertain information aiming to provide services to disabled people to improve their quality of life. The architecture is reactive for soft turning and consists of three main stages: (i) data acquisition and processing, (ii) decision on navigation using fuzzy logic, and (iii) reactive behavior and actuators (see Figure 3). The first stage includes sensors (provide data) and data processing (generates features, metrics, and characteristics). The second stage takes processed data from the previous stage, which are inputs for the navigation module, based on fuzzy logic that generates certain decisions for the next stage. Finally, the third stage makes decisions and produces control signals for the mobile robot actuators, avoiding obstacles. These three stages provide the architecture with flexibility, adaptability, and fast-response capacity in front of unexpected situations. The main characteristics of the system are a depth image and fuzzy logic. The first one offers data and objects in a depth context, whereas the second one implements a fuzzy reactive inference control without the system model's preconditions. In this way, the planning strategy is reactive and adjusts the wheels' turning angle by sensing its environment in real time. Figure 3: Architecture for the mobile robot based on fuzzy logic. The mobile robot is designed and programmed to operate in a dynamic environment, which implies no environmental constraints. The architecture does not require a priori knowledge about the obstacles or their motion. The environment is dynamic, an important issue that many works do not consider because it implies that the environment changes and objects move. These objects must be recognized, and the robot must react in a short time to avoid them. The Kinect sensor provides depth data, which is processed in a computer in four stages to generate the soft turning angle, avoiding future and unexpected collisions. The system was implemented and tested on the differential-type wheeled robot Era-Mobi equipped with an on-board computer and Wi-Fi antenna. The turning angle is sent to the robot via sockets using the Player/Stage server, a popular open-source generic server employed in robotics to control sensors and actuators. The Era-Mobi robot is compatible with a broad range of sensors, including infrared, sonar, laser telemeter, and stereoscopic vision. The analyzed system is integrated by four modules that transform depth data from the Kinect sensor into a soft turning angle (see Figure 4) described in the next sections. Module 1: Pixel-wise bit reduction. This module is based on depth images acquired using the Kinect sensor, which has a size of 640 \(\times\) 480 pixels. On the one hand, Figure 5a presents an RGB image, which is shown for visual reference and is not used for processing or analyzing. On the other hand, depth images are processed, where each pixel represents a depth value in a range between 0 millimeters (black color) and 65,535 millimeters (white color), as can be seen in Figure 5b. In this image, most pixels fall into the darker specter, since they are in an extreme vision range of the Kinect sensor (about 10,000 millimeters). The pixel-wise reduction process transforms the 16-bit image (format from the Kinect sensor) into an 8-bit image (see Figure 5c), where 0-value represents a distance very close, very far or unidentified objects. Thus, the navigation system must maintain a path towards places where there is enough space, avoiding going towards regions where 0-values are predominant and, consequently, avoiding potential future collisions. Otherwise, the system stops the actuators. Module 2: Morphological reconstruction.