# Implementation of Autonomous Mobile Robot in SmartFactory
## 4 Experimental Setup
### Cooperation with SmartFactory
#### 4.2.3 Precise Robot Positioning  
In order to always be able to place the product in the same place on the robot superstructure, it was necessary for the mobile robot to approach the line in the loading position with great accuracy. If the mobile robot took the design of the product and then passed it on to the customer, this accuracy was not very necessary. However, if the mobile robot returned with a LEGO product and requested that the product be removed back to the line, an accuracy of a few millimeters was required. The mobile robot product loaded and unloaded the KUKA robotic arm, which always moved to the same position. This meant that when LEGO loaded a product onto a mobile robot, it expected the product to be in the same place when it was unloaded. The MiR100 mobile robot did not always move to the exact same position, and it was possible that when returning to the line, it was shifted by a few millimeters or even centimeters. The arm expected that the product would be in a completely different position. From this, three options were considered to achieve this. Figure 8: Program functionality diagram. Camera  
The first and at the same time the most technologically demanding possible solution was the use of a camera. The camera would be placed on a robotic arm and recognize the position of the product by recognizing the shapes of objects. The robotic arm would tilt over the mobile robot and use a camera to determine the exact location of the product on the mobile robot. The camera would pass this location to the robotic arm, who would know exactly where the product is located and how to grasp the product. The camera solution has one major advantage, but also disadvantages. When using the camera, the robot could enter the line differently each time, and its accuracy would not be necessary. A big advantage would be the ability to move the product on the platform of a mobile robot. The camera would always detect the position of the product, even if it was moved or rotated in a different direction from the original position. This would allow the customer to view the product and then place it back on the mobile robot. The disadvantage of the solution is the price and the high technical complexity. To enable image recognition, it would be necessary to connect the camera to the line control system and create a program that recognizes products. Distance sensors were another possible solution to make missions and paths more precise. In the first case, the sensors would be placed on the body of the mobile robot and would sense the exact distance from the selected obstacles. After approaching the line, the mobile robot would use sensors to check whether it was in the exact position and, if necessary, adjust its position. However, this solution encounters a problem in communication with the mobile robot. Communication with the MiR100 mobile robot using the WISE module only allows control of digital inputs and outputs. For the purpose of this solution, it would be necessary to transfer the analog value from the sensors to the robot. A second variant was the placement of sensors on the production line. Instead of detecting the position of the mobile robot, the sensors would sense the position of the product on the robot. When using two laser sensors, one would sense the position of the product on the X-axis, and the other would sense the sensor in the position on the Y-axis. Markers  
The last solution considered was to enter the line using markers. Markers are a direct solution for a mobile robot to ensure that it approaches positions with a certain accuracy. Several types of markers can be used to navigate the mobile robot. These are V, L, VL, and bar-markers. Each marker has a specific shape and dimension that must be strictly adhered to during production. The marker should be placed directly in front of the mobile robot in the position where the robot will approach. This solution is the most accurate and accuracy also depends on the marker type used.