## 2 Spatial Similarity Analysis and Sampling Method of Robot Errors in Configuration Space
### Sampling Method of Robot Task Workspace in Configuration Space  
The theoretical workspace of a robot refers to the set of all reachable space statuses in configuration space, typically described by the angle ranges that each joint can take. In the robotic aerospace manufacturing and assembly scenarios, the actual moving range of robot is constrained by factors such as the size of the end-effector, the geometric shape of the workpiece, and objects in the surrounding environment. The configuration space is divided into free space \(\text{C}_{\text{free}}\) where the robot can move freely and obstacle space \(\text{C}_{\text{obs}}\) where the robot interferes with other entities. Only in the \(\text{C}_{\text{free}}\) can the robot movement be planned. The robot moving range is usually further restricted based on the actual motion requirements during practical operations, which is defined as the task workspace of the robot. The task workspace is simultaneously a subset of the theoretical workspace and the \(\text{C}_{\text{free}}\), and shows typical shape characteristics depending on the specific task content. Shown in Figure 8 is a typical task workspace of an aerospace hole-making robot processing a large-sized aircraft component. According to the geometric shape of the target workpiece, the TCP is confined within a rectangular prism, and the end-effector pose is limited to a fixed range based on the surface curvature and the distribution of the assembly holes. The task workspace can be respectively defined by the range of the TCP position and the range of end-effector pose variations. The range of the TCP position can be described as the value ranges along the x-axis, y-axis, and z-axis directions in the base coordinate system \(\{\text{B}\}\). The range of the pose can be described using the range of the Z-Y-X Euler angles between the tool coordinate system \(\{\text{T}\}\) and the robot's base coordinate system \(\{\text{B}\}\), as shown in Figure 8. The angle around the Z-axis of \(\{\text{T}\}\) is defined as A, the angle around the Y-axis as B, and the angle around the X-axis as C. The task workspace of the robot, denoted as \(\mathbf{W}_{\text{task}}\), can be represented in Cartesian space as  
\[\mathbf{W}_{\text{task}}=\big{\{}(X,Y,Z,A,B,C)\in\mathbb{R}^{6}\text{x}_{\text{ min}}\leq X\leq\text{x}_{\text{max}},\text{y}_{\text{min}}\leq Y\leq\text{y}_{ \text{max}},\text{z}_{\text{min}}\leq Z\leq\text{z}_{\text{max}}, \tag{11}\]  
Figure 8: A typical task workspace of a hole-making robot in Cartesian space. Define the range of \(\mathbf{W}_{\text{task}}\) in Cartesian space,  
\([x_{min},y_{min},z_{min},A_{min},B_{min},C_{min}]\), \([x_{max},y_{max},z_{max},A_{max},B_{max},C_{max}]\)  
Uniformly sample N points within the range of \(\mathbf{W}_{\text{task}}\) to form the origin set  
\(\mathbf{S}_{\text{origin}}^{\text{Cartesian}}=\{\mathbf{P}_{1},\mathbf{P}_{2},\,...,\, \mathbf{P}_{N}\}\) where \(\mathbf{P}_{t}=[x_{i},y_{i},z_{i},A_{i},B_{i},C_{i}]\)  
\(\mathbf{S}_{\text{origin}}^{\text{Cartesian}}\)  
Inverse kinematics model  
\(\mathbf{S}_{\text{origin}}^{\text{joint}}=\{\mathbf{Q}_{1},\mathbf{Q}_{2},\,...,\,\mathbf{ Q}_{N}\}\),where \(\mathbf{Q}_{t}=[\theta_{i1},\theta_{i2},\theta_{i3},\theta_{i4},\theta_{i5},\theta_ {i6}]\)  
\(\mathbf{S}_{\text{origin}}^{\text{joint}}\)  
Sort \(\mathbf{S}_{\text{origin}}^{\text{joint}}\) separately in the six joint dimensions to obtain \(\mathbf{S}_{\text{origin}}^{j}\in\mathbb{R}^{6\times N}\),  
\(\mathbf{S}_{\text{origin}}^{j}= \begin{bmatrix}\theta_{11}&\cdots&\theta_{1j}& \cdots&\theta_{16}\\ \vdots&&\vdots&&\vdots\\ \theta_{N1}&\cdots&\theta_{Nj}&\cdots&\theta_{N6}\end{bmatrix} \)  
For the sorted point sets in the direction of joint \(j\)\(\mathbf{S}_{\text{origin}}^{j}= \begin{bmatrix}\theta_{11}&\cdots&\theta_{1j}& \cdots&\theta_{16}\\ \vdots&&\vdots&&\vdots\\ \theta_{k1}&\cdots&\theta_{kj}&\cdots&\theta_{k6}\\ \vdots&&\vdots&&\vdots\\ \theta_{N1}&\cdots&\theta_{Nj}&\cdots&\theta_{N6}\end{bmatrix}