# Predictable Trajectory Planning of Industrial Robots with Constraints
## 2 Predictable Trajectory Planning with Constraints  
### Predictable Trajectory Planning with End-Effector Constraints  
The robot end-effector moves under some constraints to accomplish some tasks in practical applications. The end-effector position constraint \(H\) and orientation constraint \(F\) can be described by  
\[\left\{ \begin{array}{c}H(p)=0\\ F(n,o,a)=0\end{array} \right. \tag{1}\]  
where \(p\) and \(\left\{ \begin{array}{cc}n&o&a\end{array} \right\}\) are the end-effector position and orientation respectively. The end-effector trajectories in Cartesian space can be predicted without forward kinematics. The prediction is independent of the joint trajectories and can be made before the calculation of the proposed geodesic method. The prediction can adjust the end-effector motion properties and has light computational burdens. First of all, the corresponding Cartesian paths meet the end-effector constraints defined in Equation (1). In Cartesian space, the end-effector moves the shortest paths that are usually not linear paths. Because the linear paths may not satisfy the end-effector constraints the shapes of the Cartesian paths are determined by the constraints. Secondly, the Cartesian velocity is constant. Because the velocity of a geodesic is constant, the velocity always equal to the initial velocity. The velocity of a geodesic trajectory \(v\) is  
\[v=\frac{L_{d}}{t_{w}}=v_{0}, \tag{2}\]  
where \(L_{d}\), \(t_{w}\) and \(v_{0}\) are the path length, the motion time, and the initial velocity, respectively. Because the velocity of a geodesic is constant, the end-effector performs a uniform curved motion. The tangential acceleration is zero. The centripetal acceleration \(a\) is  
\[a=\frac{v^{2}}{r}, \tag{3}\]  
where \(r\) is the radius of the curvature of a geodesic path. Finally, the joint and Cartesian trajectories are both smooth. Because the solutions of the geodesic equations are \(C^{3}\) continuous [10], the joint trajectories are smooth as are the Cartesian trajectories. The joint trajectories are calculated by the geodesic method. The position and orientation are the functions of the joint variables,  
\[ \begin{array}{l}p=p(q_{1}\cdots q_{k})\\ n=n(q_{k+1}\cdots q_{n})\\ o=o(q_{k+1}\cdots q_{n})\\ a=a(q_{k+1}\cdots q_{n})\end{array}  \tag{4}\]  
where \(q_{i}\) are joint variables. By the implicit function theorem [17], there are \(q_{i_{0}}\) and \(q_{j_{0}}\) which are derived from Equation (1)  
\[ \begin{array}{l}q_{i_{0}}=q_{i_{0}}(q_{1},\cdots q_{i_{0}-1},q_{i_{0}+1}, \cdots q_{k_{0}})\\ q_{j_{0}}=q_{j_{0}}(q_{k_{0}+1},\cdots q_{j_{0}-1},q_{j_{0}+1},\cdots q_{n}) \end{array}  \tag{5}\]  
The position and orientation vectors can be described as,  
\[ \begin{array}{l}p=p(q_{1},\cdots q_{i_{0}-1},q_{i_{0}+1},\cdots q_{k_{0}})\\ \mathrm{O}\cong n+o+a=\mathrm{O}(q_{k_{0}+1},\cdots q_{j_{0}-1},q_{j_{0}+1}, \cdots q_{n})\end{array}  \tag{6}\]  
In this way, the end-effector constraints are implicit in the position and orientation vector. For simplicity, they can be denoted as,  
\[ \begin{array}{l}u_{i}=\left\{\begin{array}{c}q_{i},i\leq i_{0}-1\\ q_{i+1},k_{0}\geq i\geq i_{0}+1\end{array}\right.\\ v_{i}=\left\{\begin{array}{c}q_{k+i},i\leq j_{0}-k_{0}-1\\ q_{k+i+1},n\geq i\geq j_{0}+1\end{array}\right.\\ p=(p_{1},p_{2},p_{3})\\ \mathrm{O}=(\mathrm{O}_{1},\mathrm{O}_{2},\mathrm{O}_{3})\end{array}  \tag{7}\]  
Define Riemannian metrics as  
\[ \begin{array}{l}{}^{d}g=\sum\limits_{\alpha,i,j}\frac{\partial p_{k}}{ \partial u_{i}}\frac{\partial p_{\alpha}}{\partial u_{j}}du_{i}du_{j}=\sum \limits_{i,j}{}^{d}g_{ij}du_{i}du_{j}\\ {}^{o}g=\sum\limits_{\alpha,i,j}\frac{\partial\mathrm{O}_{i}}{\partial v_{i}} \frac{\partial\mathrm{O}_{\alpha}}{\partial v_{j}}dv_{j}=\sum\limits_{i,j}{}^{ o}g_{ij}dv_{i}dv_{j}\end{array}  \tag{8}\]  
where \(du_{i}\) is the differential of \(u_{i}\), and \(\Sigma_{\alpha,i,j}\) is the summation notation with the index \(\alpha,i,j\). The quantities relevant position and orientation with superscript are \(d\) and \(o\), respectively.