# AI-Based Quality Control of Wood Surfaces with Autonomous Material Handling
## 4 Physical Setup and Demonstrator Results  
The physical setup of the Plug and Produce cell, including robot tools, an AMR and process modules, mirrors the digital twin which is described in 3.1 Flexible Robot Cell. The physical Plug and Produce cell, including the AMR, which is used in the demonstrator, can be seen in Figure 8.  
Figure 6: This figure shows a TCP server embedded into the main OPC server.  
Figure 7: This figure shows IRC 5 to OPCUA communication layers.  
The Cognex D900 is mounted, inside a protective housing, on the IRB 6700:s tool changer, see Figure 9. The classification tool called Red Tool Classify, mentioned in Section 3.5, found all defects in the visual inspection of the surface of the CLT panels. Hence, the Red Tool Classify is proving useful. A large number of data can be extracted from the pictures using Red Tool Classify. Since it generates a heat map around every defect it finds and delivers, as previously mentioned, a 100% detection rate with a fairly accurate coordinate for the centre of the knot. For an example of heatmap see Figure 10.  
Figure 8: This figure shows the physical Plug and Produce cell, including the AMR, which is used in the demonstrator.  
Figure 9: Shows where the protective housing, for the Cognex D900 camera is fixed on the IRB 6700:s tool changer. The protective housing is seen inside the dashed circle. The figure is a snapshot from a simulation in RobotStudio.  
An off the shelf wireless router from NETGEAR, called N150, is used for the Wi-Fi system. The Wi-Fi router enables the use of an IIoT network. The router is used as a relay for both the AMR, which connects via Wi-Fi, and the Cognex D900 which connects via ethernet. A laptop is used for running the OPC UA client, OPC UA server (with embedded FTP client), OPC DA server, and the OPC bridging software. The system needs to be started in a sequence where servers are started first, then the clients, and lastly the bridging software.  
The demonstrator is conducted as follows:  
* It is made sure that all systems are online and signal testing between the servers is performed before testing the mission.
* The AMR is engaged with a transport module loaded with a CLT panel.
* The AMR ask the Plug and Produce cell if and where it can deposit the transport module with the CLT panel which is to be inspected.
* The robot cell assigns the AMR to a free slot in WZ5 and waits for confirmation from the AMR that the transport module, with the CLT panel, is deposited. The location of WZ5 is seen in Figure 1.
* The IRB 6700 then picks up the CLT panel, from the transport module, using a vacuum gripper which is seen in Figure 11.
* The IRB 6700 places the CLT panel on an inspection module in S7, see Figure 12. The location of S7 is seen in Figure 1.
* The IRB 6700 asks the camera to take a picture and receives coordinates of the defects.
* Then the IRB 6700 changes tool to a pen tool, depicted in Figure 11, and draws a circle around each detected defect. For an example see Figure 13.
* The IRB 6700 then switches back to the vacuum gripper and picks the CLT panel from the inspection module in S7, see Figure 8.
* The IRB 6700 places the inspected CLT panel on a transport module, in S5, and tells the AMR that the inspected CLT panel is ready for transport. For location of S5 see Figure 1.  
Figure 10: This figure shows a wood surface with a knot hole. An unprocessed picture is shown in (**A**,**B**) shows a processed picture where the knot hole has been detected and a heatmap has been applied, by the program, to highlight the detected defect.  
Figure 11: This figure shows two tools used by the IRB 6700 in the surface inspection. (**A**) Shows the vacuum gripper and (**B**) shows the pen tool.  
Figure 12: This figure shows the IRB 6700 placing the CLT panel in the inspection module.  
Figure 13: This figure shows the robot pen tool indicating a knot hole defect on the CLT panel by drawing a circle around it.