# Bi-Objective Function Optimization for Welding Robot Parameters to Improve Manipulability
## 2 Work Object Analysis and Trajectory Planning
### Trajectory Planning
For path planning, we set a total of 14 waypoints, distinguishing between WD and AD as described above and depicted in Figure 5. The robot's reference coordinate system was defined as [0, 0, 0] and the initial joint angles of the robot are given by \(q_{initial}{}^{T}=[0^{\circ},20^{\circ},50^{\circ},0^{\circ},-50^{\circ},0^{ \circ}]^{T}\) At this configuration, the position and orientation of the robot's end-effector are represented by \(x_{initial}{}^{T}=[0.4407,0,0.3707,0,20^{\circ},0]^{T}\). Using this as the starting point, we defined the desired input for each waypoint, and to facilitate intuitive understanding, we organized this information in Table 2.  
Figure 4: General technical knowledge of welding angles—work angle (**left**) and forehand travel angle (**center**), backhand travel angle (**right**). Waypoints serve as both the starting and ending points for each path, and interpolation was performed for both position and orientation between these waypoints. For position, a 3 rd order polynomial interpolation was applied between each pair of waypoints. However, for orientation, which is represented by a direction vector, interpolating directly in terms of roll, pitch, and yaw could lead to singularities or imaginary numbers, resulting in incorrect interpolation. This paper used axis-angle representation for interpolating orientations instead of quaternions' complex system, as axis-angle representation offers a more intuitive understanding of frames. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**No**} & **Desired Trajectory** & **X (m)** & **Y (m)** & **Z (m)** & **Roll (\({}^{\circ}\))** & **Pitch (\({}^{\circ}\))** & **Yaw (\({}^{\circ}\))** \\ \hline
1 & Initial & 0.4407 & 0 & 0.3707 & 0\({}^{\circ}\) & 20\({}^{\circ}\) & 0 \\ \hline
2 & Left-down vertical & 0.6 & 0.44 & 0 & 0\({}^{\circ}\) & 45\({}^{\circ}\) & 45\({}^{\circ}\) \\ \hline
3 & Left-AD vertical & 0.6 & 0.44 & 0.1 & 0\({}^{\circ}\) & 0\({}^{\circ}\) & 45\({}^{\circ}\) \\ \hline
4 & Left-end vertical & 0.6 & 0.44 & 0.4 & 0\({}^{\circ}\) & 0\({}^{\circ}\) & 45\({}^{\circ}\) \\ \hline
5 &
\begin{tabular}{c} Collar-down vertical \\ \end{tabular} & 0.6 & 0.22 & 0 & 0\({}^{\circ}\) & 45\({}^{\circ}\) & 45\({}^{\circ}\) \\ \hline
6 & Collar-AD vertical & 0.6 & 0.22 & 0.1 & 0\({}^{\circ}\) & 0\({}^{\circ}\) & 45\({}^{\circ}\) \\ \hline
7 & Collar-end vertical & 0.6 & 0.22 & 0.4 & 0\({}^{\circ}\) & 0\({}^{\circ}\) & 45\({}^{\circ}\) \\ \hline
8 &
\begin{tabular}{c} Right-down vertical \\ \end{tabular} & 0.6 & \(-0.44\) & 0 & 0\({}^{\circ}\) & 45\({}^{\circ}\) & \(-45^{\circ}\) \\ \hline
9 & Right-AD vertical & 0.6 & \(-0.44\) & 0.1 & 0\({}^{\circ}\) & 0\({}^{\circ}\) & \(-45^{\circ}\) \\ \hline
10 & Right-end vertical & 0.6 & \(-0.44\) & 0.4 & 0\({}^{\circ}\) & 0\({}^{\circ}\) & \(-45^{\circ}\) \\ \hline
11 &
\begin{tabular}{c} Left-down horizontal \\ \end{tabular} & 0.6 & 0.44 & 0 & 30\({}^{\circ}\) & 35\({}^{\circ}\) & 45\({}^{\circ}\) \\ \hline
12 &
\begin{tabular}{c} Left-AD horizontal \\ \end{tabular} & 0.6 & 0.34 & 0 & 0\({}^{\circ}\) & 45\({}^{\circ}\) & 0\({}^{\circ}\) \\ \hline
13 &
\begin{tabular}{c} Right-AD horizontal \\ \end{tabular} & 0.6 & \(-0.34\) & 0 & 0\({}^{\circ}\) & 45\({}^{\circ}\) & 0\({}^{\circ}\) \\ \hline
14 &
\begin{tabular}{c} Right-down horizontal \\ \end{tabular} & 0.6 & 0.44 & 0 & \(-35^{\circ}\) & 30\({}^{\circ}\) & \(-54^{\circ}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Cartesian trajectory. Figure 5: Interpolated position points. (The numbers within circles represent the sequence of the Desired Trajectory in Table 2).