# Smooth Interpolation Design with Consideration of Corner Tolerance Constraints for Robotics
## 2 Linear Motion Planning  
Point-to-point (P2P) and linear motion are the two most common types of robot trajectories. P2P is often used in pick-and-place applications. For P2P motion, only the initial and final positions are set; the trajectory is not specified. Linear motion requires designing an end-effector trajectory in the task space. The interpolated points at the end-effector are transformed into joint commands through inverse kinematics to achieve linear motion. Because velocity profiles designed for linear motion must include both translation and orientation commands, these commands should by synchronized in the interpolator (Figure 1a). Table 1 presents the toolpath information for Figure 1a, namely the position, orientation, and feed rate of the robot manipulator. The orientation is represented by \(A\), \(B\), and \(C\), which indicate rotations around the \(X\)-, \(Y\)-, and \(Z\)-axes, respectively (Figure 1b). A robot's orientation is determined by a combination of rotations in the \(X\), \(Y\), and \(Z\) directions. Various methods can be used to describe the orientation of a rigid body, such as the Euler angle, roll-pitch-yaw angle, angle-axis representation, unit quaternion, and Cayley-Rodrigues parameter methods. In this study, the equivalent angle-axis representation was adopted; this method is similar to the quaternion method but involves fewer parameters. The rotation matrix in the equivalent angle-axis method can be represented by a unit vector (\(u\)) and an angle (\(\phi\)) of revolution about the \(u\) vector. The parameters \(u\) and \(\phi\) are used to rotate the orientation of the end-effector from \(XYZ\) coordinates to \(X^{\prime}Y^{\prime}Z^{\prime}\) coordinates (Figure 2a). To obtain \(u\) and \(\phi\), rotation matrices for the \(XYZ\) and \(X^{\prime}Y^{\prime}Z^{\prime}\) coordinates are defined as \(R_{1}\) and \(R_{2}\). The matrices \(R_{1}\) and \(R_{2}\) can be \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multicolumn{1}{c}{**No.**} & \multicolumn{1}{c}{**Type**} & \multicolumn{3}{c}{**Position (mm)**} & \multicolumn{3}{c}{**Orientation (deg)**} & \multicolumn{3}{c}{**Feed Rate (mm/s)**} \\ \hline P\({}_{1}\) & Linear & \(X\) 368.0 & \(Y\) 0.00 & \(Z\) 293.5 & \(A\) 180.0 & \(B\) 0.0 & C 90.0 & \(F\) 100.0 \\ \hline P\({}_{i+1}\) & Linear & \(X\) 368.0 & \(Y\) 200.0 & \(Z\) 100.0 & \(A\) 150.0 & \(B\) 0.0 & \(C\) 80.0 & \(F\) 100.0 \\ \hline P\({}_{i+2}\) & Linear & \(X\) 268.0 & \(Y\) \(-\)200.0 & \(Z\) \(-\)100.0 & \(A\) \(-\)150.0 & \(B\) \(-\)10.0 & \(C\) 100.0 & \(F\) 100.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Robot manipulator toolpath information. Figure 1: Robot manipulator. (**a**) Translation and orientation of a trajectory. (**b**) Rotations \(A\), \(B\), and \(C\) around the \(X\)-, \(Y\)-, and \(Z\)-axes. obtained from two arbitrary orientation commands (\(A\), \(B\), \(C\)) on the toolpath. A general rotation matrix \(R\) can be calculated using Equation (1). \[ \begin{array}{l}\mathbf{R}=\mathbf{R}_{z}(C)\mathbf{R }_{y}(B)\mathbf{R}_{x}(A)\\ =\left[\begin{array}{ccc}\cos C&-\sin C&0\\ \sin C&\cos C&0\\ 0&0&1\\ \end{array}\right]\left[\begin{array}{ccc}\cos B&0&\sin B\\ 0&1&0\\ -\sin B&0&\cos B\\ \end{array}\right]\left[\begin{array}{ccc}1&0&0\\ 0&\cos A&-\sin A\\ 0&\sin A&\cos A\\ \end{array}\right]\\ =\left[\begin{array}{ccc}\cos\cos B&-\sin C\cos A+\cos C\sin B\sin A&\sin C \sin A+\cos C\sin B\cos A\\ \sin C\cos B&\cos C\cos A+\sin C\sin B\sin A&-\cos C\sin A+\sin C\sin B\cos A\\ -\sin B&\cos B\sin A&\cos B\cos A\\ \end{array}\right]\\ =\left[\begin{array}{ccc}a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{22}\\ a_{31}&a_{32}&a_{33}\\ \end{array}\right]\end{array}  \tag{1}\]  
To convert a rotation matrix \(R\) back to an orientation command, the rotation matrix can be inverted by using Equations (2)-(4). \[B=-\sin^{-1}(a_{31}) \tag{2}\]  
\[A= \begin{cases}\text{atan2}(-a_{23},a_{22})&if\cos B=0\\ \text{atan2}(a_{32}/\cos B,a_{33}/\cos B)&otherwise\\ \end{cases}  \tag{3}\]  
\[C=