# Smooth Interpolation Design with Consideration of Corner Tolerance Constraints for Robotics
## 2 Linear Motion Planning
 \tag{15}\]  
As shown in Figure 1, the toolpath can be used to compute the translation distance \(L\) and the rotational angle \(\phi\) determined using Equations (1)-(15). The S-shaped design method can be employed to generate a velocity profile for \(L\) or \(\phi\). The velocity profile can be divided into five phases (Figure 3) by Equation (16), where \(S_{i}\) represents the linear motion distance \(L\) or rotational angle \(\phi\) of the end-effector. \[ \begin{array}{ll}S_{1}=V_{s}t+{J_{m}}(t-{t_{0}})^{3}/6&t_{0}\leq t<t_{1}\\ S_{2}=S_{1}+V_{m}(t-t_{1})-0.5\cdot{J_{m}}\cdot\left[{t_{2}}^{2}(t-t_{1})-t_{2 }\left({t^{2}}-{t_{1}}^{2}\right)+\left({t^{3}}-{t_{1}}^{3}\right)/3\right]&t_ {1}\leq t<t_{2}\\ S_{3}=S_{2}+V_{m}(t-t_{2})&t_{2}\leq t<t_{3}\\ S_{4}=S_{3}+V_{m}(t-t_{3})-J_{m}(t-t_{3})/6&t_{3}\leq t<t_{4}\\ S_{5}=S_{4}+V_{e}(t_{5}-t)+0.5\cdot{J_{m}}\cdot\left[{t_{5}}^{2}(t-t_{4})-t_{5} \left({t^{2}}-{t_{4}}^{2}\right)+\left({t^{3}}-{t_{4}}^{3}\right)/3\right]&t_ {4}\leq t<t_{5}\end{array}  \tag{16}\]  
where \(J_{m}\) represents the maximum jerk, \(V_{m}\) represents the maximum feed rate, and \(V_{s}\) and \(V_{e}\) represent initial and final velocity (usually 0), respectively. For example, consider the toolpath from P\({}_{\rm i}\) to P\({}_{\rm i+1}\) for the position command for translation from (368, 0, 293.5) to (368, 200, 100) and the orientation command for rotation from (180, 0, 90) to (150, 0, 80). The interpolation should simultaneously plan both the translation and orientation commands. Table 2 presents the constraints on the interpolation parameters, where \(V_{\it ff}\) and \(V_{\it off}\) represent the maximum feed rate for translation and orientation, respectively, and \(J_{\it lm}\) and \(J_{\it om}\) represent the maximum jerk for translation and orientation, respectively. The velocity profile for the translation is planned first; Equation (17) is used to determine if the maximum jerk limit \(J_{\it lm}\) is exceeded. If so, the acceleration time can be adjusted using Equation (18), and the orientation can then be planned in accordance with the translation results. If the angular jerk still does not exceed the limit, planning is complete. However, if the angular jerk exceeds the limit, orientation must be planned first, and translation must be allocated afterwards in the same manner. In this example, the translation distance is 278.28 mm and the rotational angle is 31.58\({}^{\circ}\); the results indicate that translation can be planned first. \[J_{\it m}=V_{\it m}/\,{T_{\it rr}}^{2} \tag{17}\]  
\[T_{\it rr}=\sqrt{V_{\it m}/J_{\it m}} \tag{18}\]  
\[{}^{0}_{6}\mathbf{R}=\left[ \begin{array}{ccc}&P_{\it x}\\ &R_{\phi,\it at}R_{1}&P_{\it y}\\ &P_{\it z}\\ 0&0&0&1\end{array} \right] \tag{19}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Unit** & **Value** \\ \hline \(T_{\it rr}\) & s & 0.1 \\ \hline \(V_{\it ff}\) & mm/s & 100 \\ \hline \(V_{\it off}\) & deg/s & 100 \\ \hline \(J_{\it lm}\) & mm/s\({}^{3}\) & 10,000 \\ \hline \(J_{\it om}\) & deg/s\({}^{3}\) & 2000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Constraints on interpolation parameters. Figure 3: S-shaped ACC/DEC profile. Figure 4 reveals that the resulting single program command achieves both translation and orientation. After the interpolation points (\(P_{x}\), \(P_{y}\), \(P_{z}\)) and the rotation matrix (\(R_{\phi,u}R_{1}\)) for each sampling period are obtained, they can be substituted into Equation (19) to obtain the rotation matrix (\(Q_{0}^{0}\mathbf{R}\)). The joint commands can then be solved through inverse kinematics and used to command the motor drives, achieving synchronized translation and orientation for linear motion.