# Implementation of Autonomous Mobile Robot in SmartFactory
## 2 Autonomous Mobile Robots
### Obstacle Detection  
The obstacle detection system is constantly active, and its main purpose is to detect obstacles around the robot. Information about the current location of surrounding obstacles is also used to determine the current position of the mobile robot on the map or when placing the mobile robot on the map. Three types of sensors are used to detect obstacles. These are laser sensors, ultrasonic sensors, and 3D cameras.  
* Laser sensors: The MiR100 mobile robot is equipped with a pair of SICK S300 laser sensors. Each sensor has a viewing angle of 270\({}^{\circ}\) and is placed in opposite corners of the mobile robot to cover all 360\({}^{\circ}\) around the robot (Figure 2(a)). However, these sensors have several limitations. They can only detect obstacles at a height of 200 mm from the floor and cannot detect transparent obstacles (glass). For some reflective surfaces, the data may be inaccurate. False obstructions may be detected when the sensor is exposed to direct light.
* Three-dimensional cameras: Another way to detect obstacles is with a pair of Intel RealSenseTM cameras on the front; see Figure 2(b). The cameras are intended for indoor navigation only, not as obstacle detection safety sensors. An important feature is the ability to detect the height of individual obstacles in the environment. According to this, the mobile robot can determine whether it will fit under the obstacle or not. The height of the mobile robot is set manually in the web interface. The pair of cameras occupy a space from 180 to 1950 mm in front of the robot with a viewing angle of 118\({}^{\circ}\) and a height of 1800 mm. Three-dimensional cameras also have several limitations. Unlike 360\({}^{\circ}\) laser sensors, they can only detect objects in front of a mobile robot. They cannot detect transparent or reflective objects or steps that descend. Distance determination may be inaccurate when detecting objects with repeating patterns. False obstructions can be detected when exposed to direct light.
* Ultrasonic sensors: The robot is equipped with four ultrasonic sensors; see Figure 2(c). Two sensors are located in the back of the mobile robot and two are located in the front wheels of the mobile robot. Ultrasonic sensors are used to detect obstacles that could not be detected with a laser sensor or 3D cameras. The front sensors can detect obstacles of 10 to 200 mm, while the rear sensors detect obstacles at distances of 10 to 350 mm.  
The information from all mentioned sensors has a fundamental effect on the speed of the robot's movement in the given space, see Figure 4, Tables 2 and 3. When a mobile robot travels at low speed, it primarily guards the space and obstacles in its immediate vicinity. However, if the mobile robot is traveling at a higher speed, it has much more space to be able to brake if an obstacle occurs. The robot's speed automatically changes according to the conditions of the environment in which the mobile robot moves. When the robot moves forward, it is also taking care of the situation behind him. The maximum speed of the robot can be limited using commands during mission creation.  
Figure 3: Obstacle detection system [20].  
In Zone 1 in Table 2, you can see a negative speed for the forward direction. It should be noted that in this zone, the robot performs 3 consecutive actions: reversing, stopping, and slowly moving forward. Zone 5 then shows the maximum forward speed of the robot. Then, in Zone 1 in Table 2, you can see the positive speed for the backward direction. It should be noted that in that zone, the robot performs 3 consecutive actions: forward, standstill, and slowly backward. Zone 5 then shows the maximum backward speed of the robot.