# A Sampling-Based Unfixed Orientation Search Method for Dual Manipulator Cooperative Manufacturing
## 4 Minimum Distance Prediction
\[\Delta d_{t+1}=\frac{\mathbf{P}_{BA}^{t  
results of single manipulator avoidance. The space coordinates of the base of manipulator A are (0, 0, 0) while manipulator B's base is situated at (0, \(-900\), 0). Six different path planning cases and the corresponding simulation results are presented and compared in Figures 7 and 8 intensively.  
Figure 8: Comparison of single manipulator avoidance simulation results for three initial path cases. These three cases yield three completely different simulation results by changing the coordinates of manipulator A on the \(Y\)-axis of the WCS while maintaining the same spatial position of manipulator B.  
Figure 7: Comparison of single manipulator avoidance simulation results for four initial path cases. As the simulation results are 3D path curves, the results are presented in a comprehensive and extensive visualization with four views: axonometric, top, front, and side views.  
Case 1: the EEF of manipulator B stays at \(\mathbf{P}_{B}=(0,-450,\ 500)\) while manipulator A moves from \(\mathbf{P}_{A}^{start}=(400,-450,\ 500)\) towards \(\mathbf{P}_{A}^{end}=(-400,-450,\ 500)\).  
Case 2: the EEF of manipulator B stays at \(\mathbf{P}_{B}=(100,-450,\ 500)\) while manipulator A moves from \(\mathbf{P}_{A}^{start}=(400,-450,\ 600)\) towards \(\mathbf{P}_{A}^{end}=(-400,-450,\ 400)\).  
Case 3: the EEF of manipulator B stays at \(\mathbf{P}_{B}=(0,-450,\ 500)\) while manipulator A moves from \(\mathbf{P}_{A}^{start}=(400,-400,\ 500)\) towards \(\mathbf{P}_{A}^{end}=(-400,-500,\ 500)\).  
Case 4: the EEF of manipulator B stays at \(\mathbf{P}_{B}=(0,-450,\ 500)\) while manipulator A moves from \(\mathbf{P}_{A}^{start}=(400,-450,\ 400)\) towards \(\mathbf{P}_{A}^{start}=(-400,-450,\ 600)\).  
Case 5: the EEF of manipulator B stays at \(\mathbf{P}_{B}=(0,-500,\ 500)\) while manipulator A moves from \(\mathbf{P}_{A}^{start}=(400,-450,\ 500)\) towards \(\mathbf{P}_{A}^{end}=(-400,-450,\ 500)\).  
Case 6: the EEF of manipulator B stays at \(\mathbf{P}_{B}=(0,-400,\ 500)\) while manipulator A moves from towards \(\mathbf{P}_{A}^{start}=(400,-500,\ 500)\) towards \(\mathbf{P}_{A}^{end}=(-400,-500,\ 500)\).  
We can simulate the effect of the algorithm proposed in this paper on the path-planning strategy of a dual manipulator system with different initial paths by using the control variables method. Take Case 1 as a benchmark case, both Cases 2 and 4 add displacement in the \(Z\)-axis direction of the world coordinate system (WCS), distinguishing the two by the opposite direction of displacement. The displacement of the manipulator A in the \(Z\)-axis is a descent from the high to the low coordinate in Case 2, while in Case 4 the situation is reversed. Similarly, and in turn, Case 3 incorporates a \(Y\)-axis movement.  
As the working space of an industrial manipulator is a finite three-dimensional space centered on the base of the manipulator, an avoidance strategy along the direction to the base is always the safest option for the obstacle avoidance of the manipulator. Figure 8 illustrates the path patterns of three different dual manipulator systems and the respective avoidance strategies. It is clear that Cases 1, 5, and 6 in Figure 7 are simulation avoidance results for each of these three path patterns.  
The space coordinate vector of an industrial manipulator arm is usually comprised of two components \(P_{B}=([x,y,z],[\alpha,\beta,\gamma])\), where \([x,y,z]\) represents the 3D space coordinates of the centre point of the manipulator EEF and \([\alpha,\beta,\gamma]\) represents the pose direction vector of the manipulator EEF. The EEF pose vectors of the manipulator A and B are assigned the values \([\alpha_{A},\beta_{A},\gamma_{A}]=[\pi/2,-\pi/2,0]\) and \([\alpha_{B},\beta_{B},\gamma_{B}]=[-\pi/2,-\pi/2,0]\) for all cases in Figures 7 and 8.  
In order to verify the generality of our algorithm, we re-simulated all cases by simply changing the corresponding EEF pose vectors without changing their individual space coordinates. When the pose vector of the EEF of manipulator \(A\) and \(B\) are set to \([\alpha_{A},\beta_{A},\gamma_{A}]=[\pi/2,\pi,0]\) and \([\alpha_{B},\beta_{B},\gamma_{B}]=[-\pi/2,\pi,0]\), the corresponding simulation results are shown in Figure 9.  
By comparing the simulation results for all cases in Figures 7-9, some apparent and obvious consensus can be quickly reached. Despite different EEF pose vectors and different initial motion states, the algorithm proposed in this paper always can adaptively generate suitable and reasonable obstacle avoidance paths. However, due to changes in the EEF pose vectors, our algorithm also produces significantly different simulated planning paths for the same case. For example, in Cases 1 and 3, the simulation results in Figures 7 and 8 both show apparently large 'bends' in the \(Z\)-axis of the WCS and relatively less pronounced 'bends' in the \(X\)-\(Y\) plane, whereas in Figure 9 the simulated paths have only small 'fluctuations' along the \(Z\)-axis and large bends in the \(X\)-\(Y\) plane. Furthermore, the simulated path results for Cases 2 and 4 in Figures 7 and 9 are exactly opposite in the \"bending\" direction along the \(Z\) axis. This discrepancy is directly due to the fact that various pose vectors of the EEF directly affect the space occupation of the manipulator bodies or in particular the end links, thus leading our algorithm to adaptively plan different obstacle avoidance paths under the planning principle of shortest paths when facing different space occupancies.  
Retrospectively, Figure 1 shows that the insights advanced in this paper are improved by the progressive sequence of the map search method \(\rightarrow\) SbOSMS \(\rightarrow\) SbUOSM. Thus, it is essential to undertake comparative simulations of these three algorithms. Figure 10 compares the simulation results of Case 1 in Figure 8 utilizing the three methods described in Section 4.2.2.  
Figure 9: Comparison of single manipulator avoidance simulation results. Compared to Figures 7 and 8, the six cases in this diagram merely modify the end-effector pose vectors of the manipulators, whilst the simulation results obtained are significantly distinctive.  
By detailed comparison of Figures 10-12, some obvious observational conclusions can be summarized briefly. In terms of the softness of the planned path curve, the proposal in this paper takes speed into account as a factor in the optimization and thus achieves a smoother solution than the map search method and SbOSMS, which only consider planning space path points. When it comes to the spatial complexity of planning path curves, the paths planned by the SbOSMS algorithm are only offset in the X-Y plane in the WCS in all three cases, the map search method (A*) is shifted in all axis directions in space, while the SbUOSM algorithm is only biased in the X-Y plane in case 1, and the remaining cases are similar to A*. This is a side effect of the greater flexibility with which our proposals operate in the face of different scenarios.  
The total deviation of the planned path from the initial path is also a key indicator of the merit of the obstacle avoidance path-planning algorithm. Assuming that the equation of the planned path curve is \(g_{0}=f_{0}(L)\) and the equation of the initial path curve is \(g=f(L)\), then the total offset of this planned path is:  
\[\Delta_{g\to g_{0}}=\int_{0}^{L}\parallel f_{0}(t)-\mathbf{f}(t)\parallel dt \tag{11}\]  
All the planning results in Figures 10-12 were used to calculate the total deviation utilizing the above equation and the results were assembled into Table 1.