# Automatic Assembly Technology of Dense Small Screws for Flat Panel Parts
## 2 Methods
### Definition of Coordinate System  
In this section, the key coordinate systems necessary for the automatic assembly of screws are defined. These systems include the basic coordinate system, \(\{B\}\), of the manipulator, flange coordinate system, \(\{f\}\), camera coordinate system, \(\{C\}\), pixel coordinate system, \(\{p\}\), and workpiece coordinate system, \(\{F\}\). The three-point positioning method and nine-point calibration method were employed to determine the relationships between \(\{F\}\) and \(\{B\}\) and between \(\{F\}\) and \(\{p\}\).  
2.1 The Three-Point Positioning Method to Determine the Relationship between \(\{F\}\) and \(\{B\}\)  
The three-point positioning method was used to establish \(\{F\}\)[19]. First, the industrial manipulator carries the laser distance measurer to position points \(a\), \(b\), and \(c\) on the workpiece. As shown in Figure 4, points \(a\) and \(b\) are two points on one side of the working plane; generally, two points on one side of the workpiece are considered. Point \(c\) is a point on the working plane located as far as possible from points \(a\) and \(b\). By adjusting the manipulator, the reading of the laser distance measurer at the three positions becomes consistent.  
Figure 3: Automatic assembly process of screws.  
Point \(a\) is the origin of \(\{F\}\), and \(\overset{\rightarrow}{ab}\) is the direction vector of the \(X\) axis of \(\{F\}\). The coordinates of points \(a\), \(b\), and \(c\) are set as \((x_{a},y_{a},z_{a})\),\((x_{b},y_{b},z_{b})\), and \((x_{c},y_{c},z_{c})\), respectively. Starting from point \(a\), direction vectors \(\overset{\rightarrow}{ab}\) and \(\overset{\rightarrow}{ac}\) are established and obtained by Equation (1):  
\[\left\{\begin{array}{l}\overset{\rightarrow}{ab}=(x_{b}-x_{a},y_{b}-y_{a}, z_{b}-z_{a})\\ \overset{\rightarrow}{ac}=(x_{c}-x_{a},y_{c}-y_{a},z_{c}-z_{a})\end{array}\right. \tag{1}\]  
The direction vector, \(\overset{\rightarrow}{z}_{F}\), is obtained by cross-multiplying direction vectors \(\overset{\rightarrow}{ab}\) and \(\overset{\rightarrow}{ac}\), as shown in Equation (2):  
\[\overset{\rightarrow}{z}_{F}=\overset{\rightarrow}{ab}\times\overset{ \rightarrow}{ac} \tag{2}\]  
The direction vector, \(\overset{\rightarrow}{y}_{F}\), is obtained by cross-multiplying direction vectors \(\overset{\rightarrow}{z}_{F}\) and \(\overset{\rightarrow}{ab}\), as given in Equation (3):  
\[\overset{\rightarrow}{y}_{F}=\overset{\rightarrow}{z}_{F}\times\overset{ \rightarrow}{ab} \tag{3}\]  
The attitude relationship, \(\overset{B}{F}H\), of \(\{F\}\) relative to the base coordinate system, \(\{B\}\), can be obtained by converting direction vectors \(\overset{\rightarrow}{x}_{F}\), \(\overset{\rightarrow}{y}_{F}\), and \(\overset{\rightarrow}{z}_{F}\) into unit vectors, as given by Equation (4):  
\[\overset{B}{F}H=\left[\begin{array}{cc}\overset{\rightarrow}{x}_{F}^{c}& \overset{\rightarrow}{|y}_{F}^{c}&\overset{\rightarrow}{|z}_{F}^{c}\\ \overset{\rightarrow}{|x}_{F}^{c}&\overset{\rightarrow}{|y}_{F}^{c}& \overset{\rightarrow}{|z}_{F}^{c}\\ \end{array}\right] \tag{4}\]