# Joints Trajectory Planning of Robot Based on Slime Mould Whale Optimization Algorithm
## 4 Trajectory Optimization of Joints Based on SMWOA
### Optimal Experiment of Path Planning  
The paper took a flexible and lightweight six-joint UR5 industrial robot developed by Universal Robots as the experimental platform, which is shown in Figure 2. The robot was equipped with a software system, control box, and visual programming control interface except manipulator. Users can program and adjust according to requirements. To verify the optimal performance of the SMWOA on joints path planning, trajectory optimization of the UR5 manipulator was carried out taking the time as the optimal object. The position sequence of each joint is shown in Table 4. \(\theta_{1}\) is the angle of the base joint. \(\theta_{2}\) is the angle of the shoulder joint. \(\theta_{3}\) is the angle of the elbow joint. \(\theta_{4}\), \(\theta_{5}\) and \(\theta_{6}\) are all wrist joints. Figure 2: UR5 experimental platform. Population size was set as 100. The number of iterations was set as 100. The path of joints was optimized, and the comparison of time before and after optimization of base joint is shown in Figure 3. The abscissa is the running time of the joint path (s), and the ordinate is the angle-value of the base joint (\({}^{\circ}\)). The cyan thin solid line represents the trajectory curve of base joint before optimization, which is represented by q1b. The cyan dotted line represents the trajectory curve of base joint after optimization, which is represented by q1a. It can be seen in Figure 3 that the consumed time before optimization is 39.526 s. The optimized time is 24.635 s. The consumed time was reduced by 37.674%, and the operation efficiency of the manipulator was improved. Angle, angular velocity, angular acceleration and angular jerk of joints after optimization are shown in Figure 4. Figure 4 represents the movement of base joint \(\theta_{1}\). Figure 4b represents the movement of shoulder joint \(\theta_{2}\). Figure 4c represents the movement of elbow joint \(\theta_{3}\). Figure 4d represents the movement of wrist joint \(\theta_{4}\). Figure 4e represents the movement of wrist joint \(\theta_{5}\). Figure 4f represents the movement of wrist joint \(\theta_{6}\). The horizontal coordinate refers to time, and the longitudinal coordinate refers to angle (\({}^{\circ}\)), angular velocity (\({}^{\circ}\)/s), angular acceleration (\({}^{\circ}\)/s\({}^{2}\)) and angular jerk (\({}^{\circ}\)/s\({}^{3}\)). The cyan thin solid line shows the change of the corresponding joint-angle, which is denoted by \(q_{i}\) (\(i=1,\,2,\,3,\,4,\,5,\,6\)). The red dot line represents the change of the corresponding joint- angular velocity, which is denoted by \(v_{i}\). The green dash dot line represents the change of the \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Nodes**} & \multicolumn{6}{c}{**Joints’ Positions**} \\ \cline{2-7}  & \(\theta_{1}\) & \(\theta_{2}\) & \(\theta_{3}\) & \(\theta_{4}\) & \(\theta_{5}\) & \(\theta_{6}\) \\ \hline
1 & 10 & 15 & 20 & 5 & 10 & 6 \\
2 & \(-110\) & \(-115\) & 60 & 50 & \(-30\) & 50 \\
3 & 40 & 95 & \(-35\) & 180 & 75 & 80 \\
4 & 150 & 120 & 80 & 100 & \(-50\) & 30 \\
5 & 120 & \(-45\) & -80 & 20 & 80 & \(-80\) \\
6 & \(-30\) & 20 & 60 & \(-60\) & 50 & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Sequence of joint\({}^{\prime}\)s positions. Figure 3: Comparison before and after optimization. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Parameters**} & \multicolumn{6}{c}{**Constraints**} \\ \cline{2-7}  & \(\theta_{1}\) & \(\theta_{2}\) & \(\theta_{3}\) & \(\theta_{4}\) & \(\theta_{5}\) & \(\theta_{6}\) \\ \hline \(\theta_{\max}\) (\({}^{\circ}\)) & 320 & 250 & 270 & 280 & 200 & 300 \\ \(\hat{\theta}_{\max}\) (\({}^{\circ}\))/s & 100 & 95 & 122 & 150 & 140 & 120 \\ \(\hat{\theta}_{max}\) (\({}^{\circ}\))/s\({}^{2}\) & 245 & 245 & 475 & 475 & 500 & 500 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Constraints of joints. corresponding joint-angular acceleration, which is denoted by \(a_{i}\).