Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

11.1 Introduction

As a follow-up to Chap. 6, where we studied trajectory planning for pick-and-place operations (PPO), we study in this chapter continuous-path operations. In PPO, the pose, twist, and twist-rate of the EE are specified only at the two ends of the trajectory, the purpose of trajectory planning then being to blend the two end poses with a smooth motion. When this blending is done in the joint-variable space, the problem is straightforward, as demonstrated in Chap. 6. There are instances in which the blending must be made in Cartesian space, in which advanced notions of interpolation in what is known as the image space of spatial displacements, as introduced by Ravani and Roth (1984), are needed. The image space of spatial displacements is a projective space with three dual dimensions, which means that a point of this space is specified by four coordinates—similar to the homogeneous coordinates introduced in Sect. 2.5—of the form x i +ε ξ i , for i = 1, 2, 3, 4, where ε is the dual unity, which has the property that ε 2 = 0. The foregoing coordinates are thus dual numbers, their purpose being to represent both rotation and translation in one single quantity. In following Ravani and Roth’s work, Ge and Kang (1995) proposed an interpolation scheme that produces curves in the image space with second-order geometric continuity, which are referred to as G 2 curves. These interpolation techniques lie beyond the scope of the book and will be left aside. The interested reader will find a comprehensive and up-to-date review of these techniques in (Srinivasan and Ge 1997).

The purpose of this chapter is to develop motion interpolation techniques in Cartesian space that produce smooth motions in both Cartesian and joint spaces. Motion interpolation in joint space was discussed in Chap. 6, the present chapter being devoted to motion interpolation in Cartesian space. To this end, we resort to basic notions of differential geometry.

11.2 Curve Geometry

Continuous-path robotics applications appear in operations such as arc-welding, flame-cutting, deburring, and routing. In these operations, a tool is rigidly attached to the end-effector of a robotic manipulator, the tool being meant to trace a continuous and smooth trajectory in a six-dimensional configuration space. Three dimensions of this space describe the spatial path followed by the operation point of the EE, while the remaining three describe the orientation of the EE. Some applications require that this task take place along a warped curve, such as those encountered at the intersections of warped surfaces, e.g., in aircraft fuselages, while the path is to be traversed as a prescribed function of time. This function, moreover, is task-dependent; e.g., in arc-welding, the electrode must traverse the path at a constant speed, if no compensation for gravity is taken into account. If gravity compensation is warranted, then the speed varies with the orientation of the path with respect to the vertical. Below we will define this orientation as that of the Frenet–Serret frame associated with every point of the path where the path is smooth.

Moreover, for functional reasons, the orientation of the EE is given as a rotation matrix that is, in turn, a prescribed smooth function of time. In arc-welding, for example, the orientation of the electrode with respect to the curve must be constant. The trajectory planning of the configuration subspace associated with the warped path is more or less straightforward, but the planning of the trajectory associated with the orientation subspace is less so.

While most methods of trajectory planning at the Cartesian-coordinate level focus on the path followed by the operation point, the underlying inverse kinematics of a six-axis robotic manipulator requires the specification of the orientation of the EE as well. In the presence of simple manipulators with a spherical wrist, as those studied in Sect. 4.4.2, the positioning and the orientation tasks are readily separable, and hence, the planning of the two tasks can be done one at a time. In other instances, e.g., in most arc-welding robots, such a separation is not possible, and both tasks must be planned concurrently, which is the focus of our discussion below. Here, we follow the technique presented in Angeles et al. (1988).

Crucial to our discussion is the concept of path orientation. Let Γ be a warped curve in three-dimensional space that is smooth in a certain interval of interest for our discussion. Under these conditions, we can associate with every point of this interval an orthonormal triad of vectors, i.e., a set of unit vectors that are mutually orthogonal, namely, the tangent, the normal, and the binormal vectors of Γ. Therefore, when this set of vectors is properly arranged in a 3 × 3 array, a rotation matrix is obtained. This matrix thus represents the orientation of Γ. In order to parameterize these vectors, let s be the arc length measured along Γ from a certain reference point on this curve. Below we review the basic differential-geometric concepts pertaining to our discussion.

The tangent, normal, and binormal unit vectors, e t , e n , and e b , respectively, associated with every point of Γ where this curve is smooth, are generically termed here the Frenet–Serret vectors. These vectors are defined as

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{t}& \equiv &{ \mathbf{r}}^{{\prime}}{}\end{array}$$
(11.1a)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{b}& \equiv & \frac{{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}} {\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\|}{}\end{array}$$
(11.1b)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{n}& \equiv & \mathbf{e}_{b} \times \mathbf{e}_{t}{}\end{array}$$
(11.1c)

where r stands for d rds and r ′ ′ for d 2 rds 2. Now the Frenet–Serret relations among the three foregoing unit vectors and the curvature κ and torsion τ of Γ are recalled (Brand 1965):

$$\displaystyle\begin{array}{rcl} \frac{d\mathbf{e}_{t}} {ds} & =& \kappa \mathbf{e}_{n}{}\end{array}$$
(11.2a)
$$\displaystyle\begin{array}{rcl} \frac{d\mathbf{e}_{n}} {ds} & =& -\kappa \mathbf{e}_{t} +\tau \mathbf{e}_{b}{}\end{array}$$
(11.2b)
$$\displaystyle\begin{array}{rcl} \frac{d\mathbf{e}_{b}} {ds} & =& -\tau \mathbf{e}_{n}{}\end{array}$$
(11.2c)

Moreover, the curvature and torsion can be calculated with the aid of the formulas

$$\displaystyle\begin{array}{rcl} \kappa & =& \|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\|{}\end{array}$$
(11.3a)
$$\displaystyle\begin{array}{rcl} \tau & =&{ \frac{{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\cdot {\mathbf{r}}^{{\prime\prime\prime}}} {\kappa }^{2}}{}\end{array}$$
(11.3b)

where r ′ ′ ′ stands for \({d}^{3}\mathbf{r}/d{s}^{3}\). Furthermore, differentiation of κ and τ, as given above, with respect to s, yields

$$ \displaystyle\begin{array}{rcl} {\kappa }^{{\prime}}(s)& =& ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}) \cdot \frac{({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime\prime}})} {\kappa }{}\end{array}$$
(11.4a)
$$ \displaystyle\begin{array}{rcl} {\tau }^{{\prime}}(s)& =&{ \frac{{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\cdot {\mathbf{r}}^{(iv)} - 2\tau ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}) \cdot ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime\prime}})} {\kappa }^{2}} {}\end{array}$$
(11.4b)

where r (iv) stands for d 4 rds 4. The geometric interpretation of the curvature is the rate of change of orientation of the tangent vector with respect to the arc length; that of the torsion is the rate at which the curve quits the plane of the tangent and normal vectors. Thus, at points where the curvature vanishes, the curve approximates a line to a second order, i.e., up to second-order derivatives, whereas at points where the torsion vanishes, the curve approximates a planar curve to a third order—Notice that the torsion involves third-order derivatives. Now, from the Frenet–Serret formulas and the chain rule, we can derive the time-rate of change of the Frenet–Serret vectors, namely,

$$\displaystyle\begin{array}{rcl} \dot{\mathbf{e}}_{t}& \equiv \frac{d\mathbf{e}_{t}} {ds} \dot{s}& = \dot{s}\kappa \mathbf{e}_{n}{}\end{array}$$
(11.5a)
$$\displaystyle\begin{array}{rcl} \dot{\mathbf{e}}_{n}& \equiv \frac{d\mathbf{e}_{n}} {ds} \dot{s}& = -\dot{s}\kappa \mathbf{e}_{t} + \dot{s}\tau \mathbf{e}_{b}{}\end{array}$$
(11.5b)
$$\displaystyle\begin{array}{rcl} \dot{\mathbf{e}}_{b}& \equiv \frac{d\mathbf{e}_{b}} {ds} \dot{s}& = -\dot{s}\tau \mathbf{e}_{n}{}\end{array}$$
(11.5c)

Furthermore, let \(\boldsymbol{\omega }\) be the angular velocity of the Frenet–Serret frame. Then, clearly,

$$\displaystyle\begin{array}{rcl} \dot{\mathbf{e}}_{t}& \equiv & \boldsymbol{\omega }\times \mathbf{e}_{t}{}\end{array}$$
(11.6a)
$$\displaystyle\begin{array}{rcl} \dot{\mathbf{e}}_{n}& \equiv & \boldsymbol{\omega }\times \mathbf{e}_{n}{}\end{array}$$
(11.6b)
$$\displaystyle\begin{array}{rcl} \dot{\mathbf{e}}_{b}& \equiv & \boldsymbol{\omega }\times \mathbf{e}_{b}{}\end{array}$$
(11.6c)

Upon equating pairwise the right-hand sides of Eqs. (11.5a–c) and Eqs. (11.6a–c), we obtain three vector equations determining \(\boldsymbol{\omega }\), namely,

$$\displaystyle\begin{array}{rcl} -\mathbf{E}t\boldsymbol{\omega }& =& \dot{s}\kappa \mathbf{e}_{n}{}\end{array}$$
(11.7a)
$$\displaystyle\begin{array}{rcl} -\mathbf{E}n\boldsymbol{\omega }& =& -\dot{s}\kappa \mathbf{e}_{t} + \dot{s}\tau \mathbf{e}_{b}{}\end{array}$$
(11.7b)
$$\displaystyle\begin{array}{rcl} -\mathbf{E}b\boldsymbol{\omega }& =& -\dot{s}\tau \mathbf{e}_{n}{}\end{array}$$
(11.7c)

where we have introduced the cross-product matrices E t, E n , and E b of vectors e t , e n , and e b , respectively, thereby obtaining a system of nine scalar equations in the three unknown components of \(\boldsymbol{\omega }\), i.e.,

$$\displaystyle\begin{array}{rcl} \mathbf{A}\boldsymbol{\omega } = \mathbf{b}& &{}\end{array}$$
(11.8a)

with A defined as the 9 × 3 matrix and b as the nine-dimensional vector displayed below:

$$\displaystyle\begin{array}{rcl} \mathbf{A} \equiv -\left [\begin{array}{c} \mathbf{E}t\\ \mathbf{E} n \\ \mathbf{E}b\\ \end{array} \right ],\quad \mathbf{b} \equiv \left [\begin{array}{c} \dot{s}\kappa \mathbf{e}_{n} \\ \dot{s}(-\kappa \mathbf{e}_{t} +\tau \mathbf{e}_{b}) \\ -\dot{s}\tau \mathbf{e}_{n}\\ \end{array} \right ]& &{}\end{array}$$
(11.8b)

Although the foregoing system is overdetermined, it is consistent, and hence it comprises exactly three linearly independent equations, the remaining six being dependent on the former. One way to reduce system (11.8a) to only three equations consists in multiplying both sides of this equation by A T. Now, the product A T A greatly simplifies because matrix A turns out to be isotropic, as per the discussion of Sect. 5.8, i.e., its three columns are mutually orthogonal and all have the same magnitude. This fact can become apparent if we realize that the three 3 × 3 blocks of A are cross-product matrices of three orthonormal vectors. Thus,

$$\displaystyle{{\mathbf{A}}^{T}\mathbf{A} = \mathbf{E}_{ t}^{T}\mathbf{E}_{ t} + \mathbf{E}_{n}^{T}\mathbf{E}_{ n} + \mathbf{E}_{b}^{T}\mathbf{E}_{ b}}$$

If we now recall Theorem 2.3.4, the foregoing products take on quite simple forms, namely,

$$\displaystyle\begin{array}{rcl} \mathbf{E}_{t}^{T}\mathbf{E}_{ t}& =& -\mathbf{E}_{t}^{2} = -(-\mathbf{1} + \mathbf{e}_{ t}\mathbf{e}_{t}^{T}) {}\\ \mathbf{E}_{n}^{T}\mathbf{E}_{ n}& =& -\mathbf{E}_{n}^{2} = -(-\mathbf{1} + \mathbf{e}_{ n}\mathbf{e}_{n}^{T}) {}\\ \mathbf{E}_{b}^{T}\mathbf{E}_{ b}& =& -\mathbf{E}_{b}^{2} = -(-\mathbf{1} + \mathbf{e}_{ b}\mathbf{e}_{b}^{T}) {}\\ \end{array}$$

Moreover, for any three-dimensional vector v, we have

$$\displaystyle{(\mathbf{e}_{t}\mathbf{e}_{t}^{T} + \mathbf{e}_{ n}\mathbf{e}_{n}^{T} + \mathbf{e}_{ b}\mathbf{e}_{b}^{T})\mathbf{v} \equiv \mathbf{v}}$$

and hence, the above sum in parentheses reduces to the identity matrix, i.e.,

$$\displaystyle{\mathbf{e}_{t}\mathbf{e}_{t}^{T} + \mathbf{e}_{ n}\mathbf{e}_{n}^{T} + \mathbf{e}_{ b}\mathbf{e}_{b}^{T} \equiv \mathbf{1}}$$

the product A T A thus reducing to

$$\displaystyle{{\mathbf{A}}^{T}\mathbf{A} = (2)\mathbf{1}}$$

Therefore, \(\boldsymbol{\omega }\) takes on the form

$$\displaystyle{\boldsymbol{\omega } = \frac{1} {2}\left [\begin{array}{ccc} \mathbf{E}t&\mathbf{E}n&\mathbf{E}b\\ \end{array} \right ]\left [\begin{array}{c} \dot{s}\kappa \mathbf{e}_{n} \\ \dot{s}(-\kappa \mathbf{e}_{t} +\tau \mathbf{e}_{b}) \\ -\dot{s}\tau \mathbf{e}_{n}\\ \end{array} \right ]}$$

or upon expansion,

$$\displaystyle{ \boldsymbol{\omega } = \frac{\dot{s}} {2}\left [\kappa \mathbf{e}_{t} \times \mathbf{e}_{n} + \mathbf{e}_{n} \times (\tau \mathbf{e}_{b} -\kappa \mathbf{e}_{t}) -\tau \mathbf{e}_{b} \times \mathbf{e}_{n}\right ] }$$
(11.10)

However, since the Frenet–Serret triad is orthonormal, we have

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{t} \times \mathbf{e}_{n} = \mathbf{e}_{b},\quad \mathbf{e}_{n} \times \mathbf{e}_{b} = \mathbf{e}_{t},\quad \mathbf{e}_{b} \times \mathbf{e}_{t} = \mathbf{e}_{n}& &{}\end{array}$$
(11.11)

Upon substitution of expressions (11.11) into the expression for \(\boldsymbol{\omega }\) given in Eq. (11.10), we obtain

$$\displaystyle\begin{array}{rcl} \boldsymbol{\omega } = \dot{s}\boldsymbol{\delta }& &{}\end{array}$$
(11.12)

where \(\boldsymbol{\delta }\) is the Darboux vector, defined as

$$\displaystyle\begin{array}{rcl} \boldsymbol{\delta } =\tau \mathbf{e}_{t} +\kappa \mathbf{e}_{b}& &{}\end{array}$$
(11.13)

Expressions for the curvature and torsion in terms of the time-derivatives of the position vector are readily derived using the chain rule, which leads to

$$\displaystyle\begin{array}{rcl} \kappa & =& \frac{\|\dot{\mathbf{r}} \times \ddot{\mathbf{r}}\|} {\|{\dot{\mathbf{r}}\|}^{3}}{}\end{array}$$
(11.14a)
$$\displaystyle\begin{array}{rcl} \tau & =& \frac{\dot{\mathbf{r}} \times \ddot{\mathbf{r}} \cdot \stackrel{...}{\mathbf{r}}} {\|\dot{\mathbf{r}} \times \ddot{{\mathbf{r}}\|}^{2}}{}\end{array}$$
(11.14b)

Upon differentiation of both sides of Eq. (11.12), the angular acceleration \(\dot{\boldsymbol{\omega }}\) is derived as

$$\displaystyle\begin{array}{rcl} \dot{\boldsymbol{\omega }} = \ddot{s}\boldsymbol{\delta } + \dot{s}\dot{\boldsymbol{\delta }}& &{}\end{array}$$
(11.15)

where the time-derivative of the Darboux vector is given, in turn, as

$$\displaystyle\begin{array}{rcl} \dot{\boldsymbol{\delta }} = \dot{\tau }\mathbf{e}_{t} + \dot{\kappa }\mathbf{e}_{b}& &{}\end{array}$$
(11.16)

in which Eqs. (11.5a–c) have contributed to the simplification of the above expression. The time-derivatives of the curvature and torsion are readily derived by application of the chain rule, thereby obtaining

$$\displaystyle\begin{array}{rcl} \dot{\kappa }& \equiv {\dot{s}\kappa }^{{\prime}}(s)& = \frac{\dot{s}} {\kappa } ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime\prime}}) \cdot ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}){}\end{array}$$
(11.17a)
$$\displaystyle\begin{array}{rcl} \dot{\tau }& \equiv {\dot{s}\tau }^{{\prime}}(s)& ={ \frac{\dot{s}} {\kappa }^{2}}[{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\cdot {\mathbf{r}}^{(iv)} - 2\tau ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime\prime}}) \cdot ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}})]{}\end{array}$$
(11.17b)

The time-derivative of the Darboux vector thus reduces to

$$\displaystyle\begin{array}{rcl} \dot{\boldsymbol{\delta }} = \dot{s}(A\mathbf{e}_{t} + B\mathbf{e}_{b})& &{}\end{array}$$
(11.18a)

where scalars A and B are computed as

$$\displaystyle\begin{array}{rcl} A& \equiv &{ \frac{{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\cdot {\mathbf{r}}^{(iv)} - 2\tau ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime\prime}}) \cdot ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}})} {\kappa }^{2}} {}\end{array}$$
(11.18b)
$$\displaystyle\begin{array}{rcl} B& \equiv & \frac{({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime\prime}}) \cdot ({\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}})} {\kappa } {}\end{array}$$
(11.18c)

and hence, the angular acceleration reduces to

$$\displaystyle\begin{array}{rcl} \dot{\boldsymbol{\omega }} = \ddot{s}\boldsymbol{\delta } +{ \dot{s}}^{2}(A\mathbf{e}_{ t} + B\mathbf{e}_{b})& &{}\end{array}$$
(11.19)

From the relations derived above, it is apparent that the angular velocity is a bilinear function of the Darboux vector and \(\dot{s}\), while the angular acceleration is linear in \(\ddot{s}\) and quadratic in \(\dot{s}\). The computational costs involved in the calculation of the angular velocity and its time-derivative amount to 31 multiplications and 13 additions for the former, and 28 multiplications with 14 additions for the latter (Angeles et al. 1988). Notice that the angular velocity requires, additionally, one square root.

In the above discussion, it is assumed that explicit formulas for the two time-derivatives of the arc length s are available. This is often not the case, as we show with the examples below, whereby an intermediate parameter, which is easier to handle, is introduced. What we will need are, in fact, alternative expressions for the quantities involved, in terms of kinematic variables; i.e., we need time-derivatives of the position vector r rather than derivatives of this vector with respect to the arc length s. Below we derive these expressions.

First, note that e t can be obtained by simply normalizing the velocity vector \(\dot{\mathbf{r}}\), namely, as

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{t} = \frac{\dot{\mathbf{r}}} {\|\dot{\mathbf{r}}\|}& &{}\end{array}$$
(11.20)

where it is not difficult to realize that

$$\displaystyle\begin{array}{rcl} \dot{s} =\|\dot{ \mathbf{r}}\|& &{}\end{array}$$
(11.21)

Moreover, the binormal vector e b can be derived by application of the chain rule to vector r , namely,

$$\displaystyle{{ \mathbf{r}}^{{\prime\prime}} = \frac{d{\mathbf{r}}^{{\prime}}} {ds} \equiv \frac{d{\mathbf{r}}^{{\prime}}/dt} {ds/dt} \equiv \frac{1} {\dot{s}} \frac{d} {dt}({\mathbf{r}}^{{\prime}}) }$$
(11.22a)

But

$$\displaystyle{{ \mathbf{r}}^{{\prime}}(s) \equiv \frac{d\mathbf{r}} {ds} \equiv \frac{\mathbf{\dot{r}}} {\dot{s}} }$$
(11.22b)

and hence,

$$\displaystyle\begin{array}{rcl}{ \mathbf{r}}^{{\prime\prime}} = \frac{1} {\dot{s}}\left [ \frac{d} {dt}\left (\frac{\dot{\mathbf{r}}} {\dot{s}}\right )\right ] = \frac{\dot{s}\ddot{\mathbf{r}} -\ddot{s}\dot{\mathbf{r}}} {{\dot{s}}^{3}} & &{}\end{array}$$
(11.22c)

Now, upon substitution of expressions (11.22b and c) into Eq. (11.1b), an alternative expression for e b is derived, in terms of time-derivatives of the position vector, namely,

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{b} = \frac{\dot{\mathbf{r}} \times \ddot{\mathbf{r}}} {\|\dot{\mathbf{r}} \times \ddot{\mathbf{r}}\|}& &{}\end{array}$$
(11.23)

Finally, e n can be readily computed as the cross product of the first two vectors of the Frenet–Serret triad, namely,

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{n} \equiv \mathbf{e}_{b} \times \mathbf{e}_{t} = \frac{(\dot{\mathbf{r}} \times \ddot{\mathbf{r}}) \times \dot{\mathbf{r}}} {\|\dot{\mathbf{r}} \times \ddot{\mathbf{r}}\|\|\dot{\mathbf{r}}\|} & &{}\end{array}$$
(11.24)

The time-derivatives of the Frenet–Serret vectors can be computed by direct differentiation of the expressions given above, namely, Eqs. (11.20), (11.23), and (11.24).

11.3 Parametric Path Representation

Only seldom is an explicit representation of the position vector r of a geometric curve possible in terms of the arc length. In most practical cases, alternative representations should be used. The representation of the position vector in terms of a parameter σ, whatever its geometric interpretation may be, whether length or angle, will henceforth be termed a parametric representation of the curve at hand. The choice of σ is problem-dependent, as we illustrate with examples.

Below we derive expressions for (a) the Frenet–Serret triad; (b) the curvature and torsion; and (c) the derivatives of the latter with respect to the arc length. All these expressions, moreover, will be given in terms of derivatives with respect to the working parameter σ. The key relation that we will use is based on the chain rule, already recalled several times earlier. Thus, for any vector v(σ),

$$\displaystyle{\frac{d\mathbf{v}} {ds} = \frac{d\mathbf{v}} {d\sigma } \frac{d\sigma } {ds}}$$

However, the foregoing relation is not very useful because we do not have an explicit representation of parameter σ in terms of the arc length. Nevertheless, we will assume that these two variables, s and σ, obey a monotonic relation. What this means is that

$$\displaystyle{ \frac{d\sigma } {ds} > 0 }$$
(11.25)

which is normally the case. Under this assumption, moreover, we can write the derivative of v as

$$\displaystyle{\frac{d\mathbf{v}} {ds} = \frac{d\mathbf{v}/d\sigma } {ds/d\sigma } }$$

where, apparently,

$$\displaystyle{\frac{ds} {d\sigma } = \left \|\frac{d\mathbf{r}} {d\sigma } \right \| =\|{ \mathbf{r}}^{{\prime}}(\sigma )\|}$$

Therefore, the derivative sought takes the form

$$\displaystyle{ \frac{d\mathbf{v}} {ds} = \frac{{\mathbf{v}}^{{\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma )\|} }$$
(11.26a)

It goes without saying that the same relation holds for scalars, i.e.,

$$\displaystyle{ \frac{dv} {ds} = \frac{{v}^{{\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma )\|} }$$
(11.26b)

Expressions for the Frenet–Serret triad now follow immediately, i.e.,

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{t}& =& \frac{{\mathbf{r}}^{{\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma )\|}{}\end{array}$$
(11.27a)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{b}& =& \frac{{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )\|}{}\end{array}$$
(11.27b)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{n}& =& \mathbf{e}_{b} \times \mathbf{e}_{t} = \frac{[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )] \times {\mathbf{r}}^{{\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )\|\|{\mathbf{r}}^{{\prime}}(\sigma )\|}{}\end{array}$$
(11.27c)

Now, paraphrasing relations (11.14a and b), we have

$$\displaystyle\begin{array}{rcl} \kappa & =& \frac{\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )\|} {\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{3}}{}\end{array}$$
(11.28a)
$$\displaystyle\begin{array}{rcl} \tau & =& \frac{{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime\prime\prime}}} {\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}{(\sigma )\|}^{2}}{}\end{array}$$
(11.28b)

the partial derivatives of the curvature and torsion with respect to the arc length being computed in terms of the corresponding partial derivatives with respect to the parameter σ, which is done with the aid of the chain rule, i.e.,

$$\displaystyle{{ \kappa }^{{\prime}}(s) = \frac{{\kappa }^{{\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma )\|},{\quad \tau }^{{\prime}}(s) = \frac{{\tau }^{{\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma )\|} }$$
(11.29)

Expressions for κ (σ) and τ (σ), in turn, are derived by a straightforward differentiation of the expressions for κ and τ in terms of σ, as given in Eqs. (11.28a and b). To this end, we first recall a useful expression for the derivative of a rational expression q(x) whose numerator and denominator are denoted by N(x) and D(x), respectively. This expression is

$$\displaystyle{ {q}^{{\prime}}(x) = \frac{1} {D(x)}[{N}^{{\prime}}(x) - q(x){D}^{{\prime}}(x)] }$$
(11.30a)

Note that nothing prevents the numerator of the foregoing rational expression from being a vector, and hence, a similar formula can be applied to vector ratios as well. Consider the vector rational function \(\mathbf{q}(x) = \mathbf{n}(x)/D(x)\). Hence,

$$\displaystyle{{ \mathbf{q}}^{{\prime}}(x) = \frac{1} {D(x)}[{\mathbf{n}}^{{\prime}}(x) -\mathbf{q}(x){D}^{{\prime}}(x)] }$$
(11.30b)

As a matter of fact, the above relation can be extended to matrix numerators. Not only is this possible, but the argument can likewise be a vector or a matrix variable, and similar formulas would apply correspondingly.

We thus have, for the derivative of the curvature,

$$\displaystyle{{ \kappa }^{{\prime}}(\sigma ) = \frac{1} {\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{3}}\left [\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )\| -\kappa \frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{3}\right ] }$$
(11.31)

Now we find the first term inside the brackets of the foregoing expression from the relation

$$\displaystyle{\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}{(\sigma )\|}^{2} = 2\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\|\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\|}$$

which yields

$$\displaystyle{\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\| = \frac{1} {2\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\|}\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}{(\sigma )\|}^{2}}$$

But

$$\displaystyle\begin{array}{rcl} \frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}{(\sigma )\|}^{2}& =& \frac{d} {d\sigma }\{[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )] \cdot [{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )]\} \\ & =& 2[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )] \cdot \frac{d} {d\sigma }[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )]{}\end{array}$$
(11.32)

the derivative of the above term in brackets reducing to

$$\displaystyle{\frac{d} {d\sigma }[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )] ={ \mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime\prime}}(\sigma )}$$

and hence,

$$\displaystyle{ \frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\| = \frac{[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )] \cdot [{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime\prime}}(\sigma )]} {\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\|} }$$
(11.33a)

Furthermore,

$$\displaystyle{\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{3} = 3\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{2}\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma )\|}$$

the last derivative again being found from an intermediate relation, namely,

$$\displaystyle{\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{2} = 2\|{\mathbf{r}}^{{\prime}}(\sigma )\|\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma )\|}$$

whence,

$$\displaystyle{\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma )\| = \frac{1} {2\|{\mathbf{r}}^{{\prime}}(\sigma )\|} \frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{2}}$$

with

$$\displaystyle{\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{2} = \frac{d} {d\sigma }[{\mathbf{r}}^{{\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime}}(\sigma )] = 2{\mathbf{r}}^{{\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime\prime}}(\sigma )}$$

and so,

$$\displaystyle{\frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma )\| = \frac{{\mathbf{r}}^{{\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}(\sigma )\|} \frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{2}}$$

Therefore,

$$\displaystyle{ \frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{3} = 3\|{\mathbf{r}}^{{\prime}}(\sigma )\|{\mathbf{r}}^{{\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime\prime}}(\sigma ) }$$
(11.33b)

Substitution of Eqs. (11.33a and b) into Eq. (11.31) yields the desired expression, namely,

$$\displaystyle{{ \kappa }^{{\prime}}(\sigma ) = \frac{[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma )] \cdot [{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime\prime}}(\sigma )]} {\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{3}\|{\mathbf{r}}^{{\prime}}\times {\mathbf{r}}^{{\prime\prime}}\|} - 3\kappa \frac{{\mathbf{r}}^{{\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime\prime}}(\sigma )} {\|{\mathbf{r}}^{{\prime}}{(\sigma )\|}^{2}} }$$
(11.34)

Likewise,

$$\displaystyle{{ \tau }^{{\prime}}(\sigma ) = \frac{N} {D} }$$
(11.35a)

with N and D defined as

$$\displaystyle\begin{array}{rcl} N& \equiv & \frac{d} {d\sigma }[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime\prime\prime}}(\sigma )] -\tau \frac{d} {d\sigma }\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}{(\sigma )\|}^{2}{}\end{array}$$
(11.35b)
$$\displaystyle\begin{array}{rcl} D& \equiv & \|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}{(\sigma )\|}^{2}{}\end{array}$$
(11.35c)

The first term of the numerator N of the foregoing expression can be readily calculated as

$$\displaystyle{ \frac{d} {d\sigma }[{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma ) \cdot {\mathbf{r}}^{{\prime\prime\prime}}(\sigma )] ={ \mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma ) \cdot {\mathbf{r}}^{(iv)}(\sigma ) }$$
(11.35d)

while the derivative appearing in the second term of the same numerator was obtained previously, as displayed in Eq. (11.32). Upon substitution of the expressions appearing in Eqs. (11.32) and (11.35d) into Eq. (11.35a), we obtain the desired expression:

$$\displaystyle{{ \tau }^{{\prime}}(\sigma ) = \frac{{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}(\sigma ) \cdot [{\mathbf{r}}^{(iv)}(\sigma ) - 2\tau {\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime\prime}}(\sigma )]} {\|{\mathbf{r}}^{{\prime}}(\sigma ) \times {\mathbf{r}}^{{\prime\prime}}{(\sigma )\|}^{2}} }$$
(11.35e)

thereby completing the desired relations.

Example 11.3.1 (Planning of a Gluing Operation).

A robot used for a gluing operation is required to guide the glue nozzle fixed to its end-effector through a helicoidal path so that the tip of the nozzle traverses the helix at a constant speed v 0 = 0. 8 m/s and the end-effector maintains a fixed orientation with respect to the curve, i.e., with respect to the Frenet–Serret triad of the helix. Determine the orientation matrix Q of the end-effector with respect to a frame \(\{x,\,y,\,z\}\) fixed to the robot base, as well as the angular velocity and angular acceleration of the end-effector. The operation is to be performed with a Fanuc S-300 robot, whose Denavit–Hartenberg (DH) parameters are given in Table 11.1, while the axis of the helix is chosen to be parallel to the first axis of the robot and beginning at point P 0 (2, −2, 1. 2) in meters. Find the joint trajectories of the robot as well as the associated joint rates and joint accelerations from Cartesian position, velocity, and acceleration data. Verify that the joint-rate and joint-acceleration profiles are compatible with those of the joint variables. It is known that the radius of the helix is a = 1. 6 m and that its pitch is b = 2. 5 m/turn. Finally, the gluing operation takes place in 10 s.

Table 11.1 DH parameters of a Fanuc S-300 Robot

Solution: We will use a Cartesian frame fixed to the base of the robot such that its z axis coincides with the axis of the first revolute. The helix can then be given in the parametric representation shown below:

$$\displaystyle\begin{array}{rcl} x& =& 2 + a\cos \varphi {}\\ y& =& -2 + a\sin \varphi {}\\ z& =& 1.2 + \frac{b\varphi } {2\pi } {}\\ \end{array}$$

where the parameter \(\varphi\) is the angle made by the projection, onto the XY plane, of the position vector of a point P of the helix with the x axis.

In the process, we will need first and second time-derivatives of the foregoing Cartesian coordinates. These are given below for quick reference:

$$\displaystyle\begin{array}{rcl} \dot{x}& =& -a\dot{\varphi }\sin \varphi {}\\ \dot{y}& =& a\dot{\varphi }\cos \varphi {}\\ \dot{z}& =& \frac{b} {2\pi }\dot{\varphi } {}\\ \end{array}$$

and

$$\displaystyle\begin{array}{rcl} \ddot{x}& =& -a{\dot{\varphi }}^{2}\cos \varphi - a\ddot{\varphi }\sin \varphi {}\\ \ddot{y}& =& -a{\dot{\varphi }}^{2}\sin \varphi + a\ddot{\varphi }\cos \varphi {}\\ \ddot{z}& =& \frac{b} {2\pi }\ddot{\varphi } {}\\ \end{array}$$

We now impose the constant-speed condition, which leads to

$$\displaystyle{{\dot{x}}^{2} +{ \dot{y}}^{2} +{ \dot{z}}^{2} \equiv {a}^{2}{\dot{\varphi }}^{2} + \frac{{b}^{2}} {{4\pi }^{2}}{\dot{\varphi }}^{2} = v_{ 0}^{2}}$$

and hence,

$$\displaystyle{\dot{\varphi } = c}$$

where the constant c is defined as

$$\displaystyle{c \equiv v_{0}\sqrt{ \frac{{4\pi }^{2 } } {{4\pi }^{2}{a}^{2} + {b}^{2}}}}$$

Thus, \(\dot{\varphi }\) is constant, and hence,

$$\displaystyle{\varphi = ct}$$

Moreover, in terms of constant c, the Cartesian coordinates of a point of the helix take on the forms

$$\displaystyle\begin{array}{rcl} x& =& 2 + a\cos ct {}\\ y& =& -2 + a\sin ct {}\\ z& =& 1.2 + \frac{bc} {2\pi } t {}\\ \end{array}$$

the first time-derivatives of these coordinates becoming

$$\displaystyle\begin{array}{rcl} \dot{x}& =& -ac\sin ct {}\\ \dot{y}& =& ac\cos ct {}\\ \dot{z}& =& \frac{bc} {2\pi } {}\\ \end{array}$$

and the corresponding second time-derivatives

$$\displaystyle\begin{array}{rcl} \ddot{x}& =& -a{c}^{2}\cos ct {}\\ \ddot{y}& =& -a{c}^{2}\sin ct {}\\ \ddot{z}& =& 0 {}\\ \end{array}$$

Now the Frenet–Serret triad is readily calculated as

$$\displaystyle{\mathbf{e}_{t} \equiv \frac{d\mathbf{r}} {ds} \equiv \frac{\dot{\mathbf{r}}} {\dot{s}} = \frac{c} {v_{0}}\left [\begin{array}{c} - a\sin ct\\ a\cos ct \\ b/2\pi \\ \end{array} \right ]}$$

Furthermore,

$$\displaystyle{\frac{d\mathbf{e}_{t}} {ds} \equiv \frac{\dot{\mathbf{e}}_{t}} {\dot{s}} = \frac{a{c}^{2}} {v_{0}^{2}}\left [\begin{array}{c} -\cos ct\\ -\sin ct \\ 0\\ \end{array} \right ] \equiv \kappa \mathbf{e}_{n}}$$

from which it is apparent that

$$\displaystyle{\kappa = a \frac{{c}^{2}} {v_{0}^{2}} \equiv \frac{{4\pi }^{2}a} {{4\pi }^{2}{a}^{2} + {b}^{2}},\quad \mathbf{e}_{n} = -\left [\begin{array}{c} \cos ct\\ \sin ct \\ 0\\ \end{array} \right ]}$$

Thus, the binormal vector e b is calculated simply as the cross product of the first two vectors of the Frenet–Serret triad, namely,

$$\displaystyle{\mathbf{e}_{b} \equiv \mathbf{e}_{t}\times \mathbf{e}_{n} = - \frac{c} {v_{0}}\left [\begin{array}{c} - (b/2\pi )\sin ct \\ (b/2\pi )\cos ct \\ - a\\ \end{array} \right ]}$$

and hence, the orientation matrix Q of the gluing nozzle, or of the end-effector for that matter, is given by

$$\displaystyle{\mathbf{Q} \equiv \left [\begin{array}{ccc} \mathbf{e}_{t}&\mathbf{e}_{n}&\mathbf{e}_{b}\\ \end{array} \right ]}$$

Hence,

$$\displaystyle{\mathbf{Q} = \frac{c} {v_{0}}\left [\begin{array}{ccc} - a\sin ct& - (v_{0}/c)\cos ct& (b/2\pi )\sin ct \\ a\cos ct & - (v_{0}/c)\sin ct& - (b/2\pi )\cos ct \\ (b/2\pi ) & 0 & a\\ \end{array} \right ]}$$

Now, the angular velocity is determined from Eq. (11.12), which requires the calculation of the Darboux vector, as given in Eq. (11.13). Upon calculation of the Darboux vector and substitution of the expression thus resulting into Eq. (11.12), we obtain

$$\displaystyle{\boldsymbol{\omega } = \frac{{c}^{3}} {v_{0}^{2}}\left [\begin{array}{c} 0\\ 0 \\ ({4\pi }^{2}{a}^{2} + {b}^{2})/{4\pi }^{2}\\ \end{array} \right ] = c\left [\begin{array}{c} 0\\ 0 \\ 1\\ \end{array} \right ]}$$

which is thus constant, and hence,

$$\displaystyle{\dot{\boldsymbol{\omega }} = \mathbf{0}}$$

Now, the coordinates of the center of the wrist, C, are determined with the aid of relation (4.18c), where the operation point is a point on the helix, i.e., \(\mathbf{p} = x\mathbf{i} + y\mathbf{j} + z\mathbf{k}\), parameters b 6, λ 6, and μ 6 being obtained from Table 11.1, namely,

$$\displaystyle{b_{6} = 0.440\,\mathrm{m},\quad \lambda _{6} =\cos \alpha _{6} = 0,\quad \mu _{6} =\sin \alpha _{6} = -1}$$

Furthermore, the numerical value of c is obtained from the helix geometry, namely,

$$\displaystyle{c = 0.8\sqrt{ \frac{{4\pi }^{2 } } {{4\pi }^{2} \times 1.{6}^{2} + 2.{5}^{2}}} = 0.48522\,{\mathrm{s}}^{-1}}$$

Upon substitution in Eq. (4.18c) of the entries found above for Q, along with the numerical values, we obtain the Cartesian coordinates of the center C of the spherical wrist of the robot as

$$\displaystyle{\left [\begin{array}{c} x_{C} \\ y_{C} \\ z_{C}\\ \end{array} \right ] = \left [\begin{array}{c} 2 + 1.16\cos (0.48522t) \\ - 2 + 1.16\sin (0.48522t) \\ 1.2 + 0.19306t\\ \end{array} \right ]}$$

in meters. Apparently, point C describes a helicoidal path as well, although of a smaller radius, that is coaxial with the given helix.

Now the time-histories of the joint angles are computed from inverse kinematics. Note that the robot at hand being of the decoupled type, it allows for a simple inverse kinematics solution. The details of the solution were discussed extensively in Sect. 4.4 and are left as an exercise to the reader.

Of the four inverse kinematics solutions of the arm, three were found to lead to link interferences, when these trajectories were tested with the aid of RVS, the package for robot visualization developed at McGill University (Darcovich et al. 1999). Hence, only one such solution is physically possible. This solution, along with one of the two wrist solutions, is plotted in Fig. 11.1, with Figs. 11.2 and 11.3 showing, respectively, the corresponding joint rates and joint accelerations.

Note that the maxima and minima of the joint-variables occur at instants where the corresponding joint rates vanish. Likewise, the maxima and minima of joint rates occur at instants where the associated joint accelerations vanish, thereby verifying that the computed results are compatible. A more detailed verification can be done by numerical differentiation of the joint-variable time-histories.

Example 11.3.2 (Planning of an Arc-Welding Operation).

A spherical reservoir of radius R is to be arc-welded to a cylindrical pipe of radius r, with the axis of the cylinder located a distance d from the center of the sphere, all elements of the cylinder piercing the sphere, i.e., d + r ≤ R, as shown in Fig. 11.4. Note that two intersection curves are geometrically possible, but the welding will take place only along the upper curve. Moreover, the welding electrode is to traverse the intersection curve, while the tool carrying the electrode is to keep a constant orientation with respect to that curve. In the coordinate frame shown in Fig. 11.4, find an expression for the rotation matrix defining the orientation of the end-effector, to which the electrode is rigidly attached.

Fig. 11.1
figure 1

Joint trajectories for a Fanuc S-300

Fig. 11.2
figure 2

Joint velocities for a Fanuc S-300

Fig. 11.3
figure 3

Joint accelerations for a Fanuc S-300

Fig. 11.4
figure 4

Intersection curve between a spherical reservoir and a cylindrical pipes

Solution: Note that the X axis of the coordinate frame indicated in Fig. 11.4 intersects the \(\mathcal{A}\) axis of the cylinder, this axis being parallel to the Z axis. Moreover, we define \(\varphi\) as the angle shown in Fig 11.4b. Now, the x and y coordinates of an arbitrary point of the intersection curve are given by

$$\displaystyle\begin{array}{rcl} x& =& d + r\cos \varphi {}\end{array}$$
(11.36a)
$$\displaystyle\begin{array}{rcl} y& =& r\sin \varphi {}\end{array}$$
(11.36b)

Further, in order to find the remaining z coordinate, we use the equation of the sphere, \(\mathcal{S}\), namely,

$$\displaystyle\begin{array}{rcl} \mathcal{S}: \quad {x}^{2} + {y}^{2} + {z}^{2} = {R}^{2}& & {}\\ \end{array}$$

If we substitute the x and y coordinates of the intersection curve in the above equation and then solve for the z coordinate in terms of \(\varphi\), we obtain

$$\displaystyle{ z = \pm \sqrt{{R}^{2 } - {r}^{2 } - {d}^{2 } - 2dr\cos \varphi } }$$
(11.36c)

In the above relation, the plus and minus signs correspond to the upper and lower portions of the intersection curve, respectively. Since we are interested in only the upper intersection, we will take only the positive sign in that relation. Furthermore, we define

$$\displaystyle{d \equiv \lambda r,\quad R \equiv \mu r}$$

where λ and μ are nondimensional constants. Moreover, let

$$ \displaystyle\begin{array}{rcl} {\rho }^{2}& \equiv & {\mu }^{2} {-\lambda }^{2} - 1 > 0 {}\\ \hat{\varphi }& \equiv & \frac{1} {\sqrt{{\rho }^{2 } - 2\lambda \cos \varphi }} {}\\ \end{array}$$

the inequality following from the geometry of Fig.11.4b. Then, the position vector r of any point on the intersection curve can be expressed in the form

$$\displaystyle{ \mathbf{r} = r\left [\begin{array}{c} \lambda +\cos \varphi \\ \sin \varphi \\ 1/\hat{\varphi }\end{array} \right ] }$$
(11.37)

Now, upon differentiation of r with respect to \(\varphi\), we obtain

$$\displaystyle\begin{array}{rcl}{ \mathbf{r}}^{{\prime}}(\varphi )& =& r\left [\begin{array}{c} -\sin \varphi \\ \cos \varphi \\ \lambda \hat{\varphi }\sin \varphi \end{array} \right ]{}\end{array}$$
(11.38a)
$$\displaystyle\begin{array}{rcl}{ \mathbf{r}}^{{\prime\prime}}(\varphi )& =& r\left [\begin{array}{c} -\cos \varphi \\ -\sin \varphi \\ \lambda \hat{\varphi }\cos \varphi - {{(\lambda {}^{2}\sin }^{2}\varphi )\hat{\varphi }}^{3}\\ \end{array} \right ]{}\end{array}$$
(11.38b)

where we have used the relation

$$\displaystyle{\hat{{\varphi }}^{{\prime}}(\varphi ) = -{(\lambda \sin \varphi )\hat{\varphi }}^{3}}$$

In addition, using Eqs. (11.38a and b), we derive the items needed to compute the Frenet–Serret triad, from which we will derive the required orientation matrix, i.e.,

$$\displaystyle\begin{array}{rcl}{ \mathbf{r}}^{{\prime}}(\varphi ) \times {\mathbf{r}}^{{\prime\prime}}(\varphi )& =& {r}^{2}\left [\begin{array}{c} \lambda \hat{\varphi } {-\lambda {}^{2}\hat{\varphi }{}^{3}\cos \varphi \sin }^{2}\varphi {-\lambda {}^{2}\hat{\varphi }{}^{3}\sin }^{3}\varphi \\ 1\\ \end{array} \right ]{}\end{array}$$
(11.39a)
$$\displaystyle\begin{array}{rcl} \|{\mathbf{r}}^{{\prime}}(\varphi )\|& =& rG(\varphi ){}\end{array}$$
(11.39b)
$$\displaystyle\begin{array}{rcl} \|{\mathbf{r}}^{{\prime}}(\varphi ) \times {\mathbf{r}}^{{\prime\prime}}(\varphi )\|& =& {r{}^{2}\hat{\varphi }}^{3}\sqrt{D(\varphi )}{}\end{array}$$
(11.39c)

with functions \(D(\varphi )\) and \(G(\varphi )\) defined as

$$\displaystyle\begin{array}{rcl} D& \equiv & \rho {}^{4}{\lambda }^{2} {+\lambda }^{4} {+\rho }^{6} - {6\rho }^{2}\lambda {(\lambda }^{2} {+\rho }^{2})\cos \varphi + {6\lambda }^{2}{{(\lambda }^{2} + {2\rho }^{2})\cos }^{2}\varphi \\ & & +\,{2\lambda }^{3}{{(\rho }^{2} - 4)\cos }^{3}\varphi - {3\lambda {}^{4}\cos }^{4}\varphi {}\end{array}$$
(11.39d)
$$\displaystyle\begin{array}{rcl} G& \equiv & \sqrt{1 {+\lambda { }^{2 } \hat{\varphi }{}^{2 } \sin }^{2}\varphi }{}\end{array}$$
(11.39e)

Now e t , e b , and e n are obtained as

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{t}& \equiv & \frac{{\mathbf{r}}^{{\prime}}(\varphi )} {\|{\mathbf{r}}^{{\prime}}(\varphi )\|} = \frac{1} {G}\left [\begin{array}{c} -\sin \varphi \\ \cos \varphi \\ \lambda \hat{\varphi }\sin \varphi \\ \end{array} \right ] \equiv \frac{\mathbf{n}_{t}} {G}{}\end{array}$$
(11.40a)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{b}& \equiv & \frac{{\mathbf{r}}^{{\prime}}(\varphi ) \times {\mathbf{r}}^{{\prime\prime}}(\varphi )} {\|{\mathbf{r}}^{{\prime}}(\varphi ) \times {\mathbf{r}}^{{\prime\prime}}(\varphi )\|} ={ \frac{1} {\hat{\varphi }}^{3}\sqrt{D}}\left [\begin{array}{c} \lambda \hat{\varphi } {-\lambda {}^{2}\hat{\varphi }{}^{3}\cos \varphi \sin }^{2}\varphi \\ {-\lambda {}^{2}\hat{\varphi }{}^{3}\sin }^{3}\varphi \\ 1 \end{array} \right ] \equiv { \frac{\mathbf{n}_{b}} {\hat{\varphi }}^{3}\sqrt{D}}\quad \quad \quad \ {}\end{array}$$
(11.40b)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{n}& \equiv &{ \frac{1} {\hat{\varphi }}^{3}\sqrt{D}\,G}\left [\begin{array}{c} {-\lambda {}^{3}\hat{\varphi }{}^{4}\sin }^{4}\varphi -\cos \varphi \\ {\lambda {}^{3}\hat{\varphi }{}^{4}\cos \varphi \sin }^{3}\varphi {-\lambda {}^{2}\hat{\varphi }}^{2}\sin \varphi -\sin \varphi \\ \lambda \hat{\varphi }\cos \varphi {-\lambda {}^{2}\hat{\varphi }{}^{3}\sin }^{2}\varphi \\ \end{array} \right ] \equiv { \frac{\mathbf{n}_{n}} {\hat{\varphi }}^{3}\sqrt{D}G}{}\end{array}$$
(11.40c)

where e n has been calculated as \(\mathbf{e}_{n} = \mathbf{e}_{b} \times \mathbf{e}_{t}\).

The orthogonal matrix defining the orientation of the end-effector can now be readily computed as

$$\displaystyle{\mathbf{Q} \equiv \left [\begin{array}{ccc} \mathbf{e}_{t}&\mathbf{e}_{n}&\mathbf{e}_{b}\\ \end{array} \right ]}$$

for we have all the necessary expressions. Note, however, that these expressions allow us to find Q for any value of \(\varphi\), but we do not have, as yet, an expression of the form \(\varphi (t)\) that would allow us to obtain Q(t). Such an expression is derived in Example 11.5.1.

Example 11.3.3 (Calculation of Torsion, Curvature, and Darboux Vector).

We refer here to the intersection curve of Example 11.3.2, for which we want to find expressions for its curvature, torsion, and Darboux vector.

Solution: We can use directly the expressions derived above, Eqs. (11.28a and b), to obtain the curvature and torsion in terms of derivatives with respect to parameter \(\varphi\). With these expressions and those for the Frenet–Serret triad, the Darboux vector would follow. However, we can take shortcuts, for we already have expressions for the Frenet–Serret triad, if we express the curvature and torsion in terms of this triad and its derivatives with respect to \(\varphi\), as we explain below. Indeed, from the Frenet–Serret relations, Eqs. (11.2b), we can express the curvature and torsion in the forms

$$\displaystyle\begin{array}{rcl} \kappa & =& \mathbf{e}_{t}^{{\prime}}(s) \cdot \mathbf{e}_{ n}{}\end{array}$$
(11.41a)
$$\displaystyle\begin{array}{rcl} \tau & =& -\mathbf{e}_{b}^{{\prime}}(s) \cdot \mathbf{e}_{ n}{}\end{array}$$
(11.41b)

and hence, all we need now are the derivatives of the tangent and normal vectors with respect to s. These are readily derived using relation (11.26a), i.e.,

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{t}^{{\prime}}(s)& =& \frac{\mathbf{e}_{t}^{{\prime}}(\varphi )} {\|{\mathbf{r}}^{{\prime}}(\varphi )\|}{}\end{array}$$
(11.42a)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{b}^{{\prime}}(s)& =& \frac{\mathbf{e}_{b}^{{\prime}}(\varphi )} {\|{\mathbf{r}}^{{\prime}}(\varphi )\|}{}\end{array}$$
(11.42b)

Now, in order to differentiate the Frenet–Serret triad with respect to \(\varphi\), we first note, from Eqs. (11.40a–c), that these three expressions are vector rational functions, and hence, their derivatives with respect to \(\varphi\) are derived by applying Eq. (11.30b), thereby obtaining

$$\displaystyle\begin{array}{rcl} \mathbf{e}_{t}^{{\prime}}(\varphi )& =& \frac{1} {G}[\mathbf{n}_{t}^{{\prime}}(\varphi ) -\mathbf{e}_{ t}{G}^{\,{\prime}}(\varphi )]{}\end{array}$$
(11.43)
$$\displaystyle\begin{array}{rcl} \mathbf{e}_{b}^{{\prime}}(\varphi )& =&{ \frac{1} {\hat{\varphi }}^{3}\sqrt{D}}\left \{\mathbf{n}_{b}^{{\prime}}(\varphi ) -\mathbf{e}_{ b}\left [{3\hat{\varphi }{}^{2}\hat{\varphi }}^{{\prime}}(\varphi )\sqrt{D} {+\hat{\varphi } }^{3} \frac{{D}^{\,{\prime}}(\varphi )} {2\sqrt{D}}\right ]\right \}{}\end{array}$$
(11.44)

where n t and n b are the numerators of the vector rational expressions of e t and e b , respectively, given in Eq. (11.40a and b). Below we calculate the foregoing derivatives with respect to \(\varphi\):

$$\displaystyle\begin{array}{rcl} \mathbf{n}_{t}^{{\prime}}(\varphi )& =& \left [\begin{array}{c} -\cos \varphi \\ -\sin \varphi \\ \lambda \hat{\varphi }(\cos \varphi {-\lambda \hat{\varphi }{}^{2}\sin }^{2}\varphi )\\ \end{array} \right ] {}\\ \mathbf{n}_{b}^{{\prime}}(\varphi )& =& \lambda \left [\begin{array}{c} {\hat{\varphi }}^{{\prime}}{-\lambda \hat{\varphi }}^{2}\sin \varphi [{3\hat{\varphi }}^{{\prime}}\cos \varphi \sin \varphi +\hat{\varphi } ({3\cos }^{2}\varphi - 1)] \\ - {3\lambda \hat{\varphi }{}^{2}\sin }^{2}\varphi {[\hat{\varphi }}^{{\prime}}\sin \varphi +\hat{\varphi }\cos \varphi ] \\ 0\\ \end{array} \right ] {}\\ \hat{{\varphi }}^{{\prime}}& \equiv & \hat{{\varphi }}^{{\prime}}(\varphi ) = \frac{-\lambda \sin \varphi } {{{(\rho }^{2} - 2\lambda \cos \varphi )}^{3/2}} {}\\ {D}^{\,{\prime}}(\varphi )& =& {6\rho }^{2}\lambda {(\lambda }^{2} {+\rho }^{2})\sin \varphi - 1{2\lambda }^{2}{(\lambda }^{2} + {2\rho }^{2})\cos \varphi \sin \varphi {}\\ & & -\,{6\lambda }^{3}{{(\rho }^{2} - 4)\cos }^{2}\varphi \sin \varphi + 1{2\lambda {}^{4}\cos }^{3}\varphi \sin \varphi {}\\ {G}^{\,{\prime}}(\varphi )& =& \frac{{\lambda }^{2}\sin \varphi } {2G}(2\hat{\varphi }\cos \varphi {+\hat{\varphi } }^{{\prime}}\sin \varphi ) {}\\ \end{array}$$

and \(\|{\mathbf{r}}^{{\prime}}(\varphi )\|\) was already calculated in Example 11.3.2.

If we now substitute all the foregoing expressions into Eqs. (11.42a and b), we obtain, after intensive simplifications,

$$\displaystyle\begin{array}{rcl} \kappa & =& \frac{{\sqrt{D}\hat{\varphi }}^{3}} {{G}^{3}r}{}\end{array}$$
(11.45a)
$$\displaystyle\begin{array}{rcl} \tau & =& -3 \frac{{\lambda }^{2}\hat{\varphi }E\sin \varphi } {rD{G}^{2}}{}\end{array}$$
(11.45b)

with function \(E(\varphi )\) defined, in turn, as

$$\displaystyle{ E(\varphi ) \equiv { \frac{1} {\hat{\varphi }}^{4}} [{-\lambda {}^{3}\hat{\varphi }{}^{4}\sin }^{4}\varphi {+\lambda \hat{\varphi }{ }^{2}\sin }^{2}\varphi (\lambda \cos \varphi -1)+\cos \varphi ] }$$
(11.46)

With the foregoing expressions for e t , e b , τ, and κ, computing the Darboux vector of the intersection curve reduces to a routine substitution of the foregoing expressions into Eq. (11.13).

11.4 Parametric Splines in Trajectory Planning

Sometimes the path to be followed by the tip of the end-effector is given only as a discrete set of sampled points \(\{P_{i}\}_{1}^{N}\). This is the case, for example, if the path is the intersection of two warped surfaces, as in the arc-welding of two plates of the hull of a vessel or the spot-welding of two sheets of the fuselage of an airplane. In these instances, the coordinates of the sampled points are either calculated numerically via nonlinear-equation solving or estimated using a vision system. In either case, it is clear that only point coordinates are available, while trajectory planning calls for information on derivatives of the position vector of points along the path with respect to the arc length. These derivatives can be estimated via a suitable interpolation of the given coordinates. Various interpolation schemes are available (Foley and Van Dam 1982; Hoschek and Lasser 1992), the most widely accepted ones being based on spline functions, which were introduced in Sect. 6.6. The splines introduced therein are applicable whenever a function, not a geometric curve, is to be interpolated. However, in trajectory planning, geometric curves in three-dimensional space come into play, and hence, those splines, termed nonparametric, are no longer applicable. What we need here are parametric splines, as described below.

Although parametric splines, in turn, can be of various types (Dierckx 1993), we will focus here on cubic parametric splines because of their simplicity.

Let \(P_{i}(x_{i},\,y_{i},\,z_{i})\), for i = 1, , N, be the set of sampled points on the path to be traced by the tip of the end-effector, \(\{\mathbf{p}_{i}\}_{1}^{N}\) being the set of corresponding position vectors. Our purpose in this section is to produce a smooth curve Γ that passes through \(\{P_{i}\}_{1}^{N}\) and that has a continuous Frenet–Serret triad. To this end, we will resort to the expressions derived in Sect. 11.3, in terms of a parameter σ, which we will define presently.

We first introduce a few definitions: Let the kth derivative of the position vector p of an arbitrary point P of Γ with respect to σ, evaluated at P i , be denoted by \(\mathbf{p}_{i}^{(k)}\), its components being denoted correspondingly by \(x_{i}^{(k)}\), \(y_{i}^{(k)}\), and \(z_{i}^{(k)}\). Next, the coordinates of P are expressed as piecewise cubic polynomials of σ, namely,

$$\displaystyle\begin{array}{rcl} x(\sigma )& =& A_{xi}{(\sigma -\sigma _{i})}^{3} + B_{ xi}{(\sigma -\sigma _{i})}^{2} + C_{ xi}(\sigma -\sigma _{i}) + D_{xi}{}\end{array}$$
(11.47a)
$$\displaystyle\begin{array}{rcl} y(\sigma )& =& A_{yi}{(\sigma -\sigma _{i})}^{3} + B_{ yi}{(\sigma -\sigma _{i})}^{2} + C_{ yi}(\sigma -\sigma _{i}) + D_{yi}{}\end{array}$$
(11.47b)
$$\displaystyle\begin{array}{rcl} z(\sigma )& =& A_{zi}{(\sigma -\sigma _{i})}^{3} + B_{ zi}{(\sigma -\sigma _{i})}^{2} + C_{ zi}(\sigma -\sigma _{i}) + D_{zi}{}\end{array}$$
(11.47c)

for a real parameter σ, such that \(\sigma _{i} \leq \sigma \leq \sigma _{i+1},\) and \(i = 1,\ldots,N - 1\), with σ i defined as

$$\displaystyle\begin{array}{rcl} \sigma _{1}& =& 0,\quad \sigma _{i+1} \equiv \sigma _{i} + \Delta \sigma _{i},\quad \Delta \sigma _{i} \equiv \sqrt{\Delta x_{i }^{2 } + \Delta y_{i }^{2 } + \Delta z_{i }^{2}}{}\end{array}$$
(11.47d)
$$\displaystyle\begin{array}{rcl} \Delta x_{i}& \equiv & x_{i+1} - x_{i},\qquad \Delta y_{i} \equiv y_{i+1} - y_{i},\qquad \Delta z_{i} \equiv z_{i+1} - z_{i}{}\end{array}$$
(11.47e)

and hence, \(\Delta \sigma _{i}\) represents the length of the chord subtended by the arc of path between P i and P i+1. Likewise, σ denotes a path length measured along the spatial polygonal joining the N points \(\{\,P_{i}\}_{1}^{N}\). Thus, the closer the aforementioned points, the closer the approximation of \(\Delta \sigma _{i}\) to the arc length between these two points, and hence, the better the approximations of the curve properties.

The foregoing spline coefficients \(A_{xi},\,A_{yi},\,\ldots,\,D_{zi}\), for \(i = 1,\ldots,N - 1\), are determined as explained below. Let us define the N-dimensional vectors

$$\displaystyle\begin{array}{rcl} \mathbf{x}& \equiv & {[x_{1},\ldots,x_{N}]}^{T},\qquad {\mathbf{x}}^{{\prime\prime}}\equiv {[x^{\prime\prime}_{ 1},\ldots,x^{\prime\prime}_{N}]}^{T}{}\end{array}$$
(11.48a)
$$\displaystyle\begin{array}{rcl} \mathbf{y}& \equiv & {[y_{1},\ldots,y_{N}]}^{T},\qquad {\mathbf{y}}^{{\prime\prime}}\equiv {[y^{\prime\prime}_{ 1},\ldots,y^{\prime\prime}_{N}]}^{T}{}\end{array}$$
(11.48b)
$$\displaystyle\begin{array}{rcl} \mathbf{z}& \equiv & {[z_{1},\ldots,z_{N}]}^{T},\qquad {\mathbf{z}}^{{\prime\prime}}\equiv {[z^{\prime\prime}_{ 1},\ldots,z^{\prime\prime}_{N}]}^{T}{}\end{array}$$
(11.48c)

The relationships between x, y, and z and their counterparts \({\mathbf{x}}^{{\prime\prime}}\), \({\mathbf{y}}^{{\prime\prime}}\), and \({\mathbf{z}}^{{\prime\prime}}\) are the same as those found for nonparametric splines in Eq. (6.58a), namely,

$$\displaystyle\begin{array}{rcl} \mathbf{A}\mathbf{x}^{\prime\prime}& =& 6\mathbf{C}\mathbf{x}{}\end{array}$$
(11.49a)
$$\displaystyle\begin{array}{rcl} \mathbf{A}\mathbf{y}^{\prime\prime}& =& 6\mathbf{C}\mathbf{y}{}\end{array}$$
(11.49b)
$$\displaystyle\begin{array}{rcl} \mathbf{A}\mathbf{z}^{\prime\prime}& =& 6\mathbf{C}\mathbf{z}{}\end{array}$$
(11.49c)

which are expressions similar to those of Eq. (6.58a), except that the A and C matrices appearing in Eq. (11.49b) are now themselves functions of the coordinates of the supporting points (SP) of the spline. In fact, the (N − 2) × N matrices A and C are defined exactly as in Eqs. (6.58b and c), repeated below for quick reference:

$$\displaystyle{ \mathbf{A} = \left [\begin{array}{ccccccc} \alpha _{1} & 2\alpha _{1,2} & \alpha _{2} & 0 & \cdots & 0 & 0 \\ 0& \alpha _{2} & 2\alpha _{2,3} & \alpha _{3} & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \ddots & \ddots & \vdots & \vdots \\ 0& 0 & \ldots &\alpha _{N^{\prime\prime\prime}}&2\alpha _{N^\prime,^{\prime\prime}N^{\prime\prime}}& \alpha _{N^{\prime\prime}} & 0 \\ 0& 0 & 0 & \cdots & \alpha _{N^{\prime\prime}} &2\alpha _{N,^{\prime\prime}N^\prime}&\alpha _{N^\prime}\\ \end{array} \right ] }$$
(11.49d)

and

$$\displaystyle{ \mathbf{C} = \left [\begin{array}{ccccccc} \beta _{1} & -\beta _{1,2} & \beta _{2} & 0 & \cdots & 0 & 0 \\ 0& \beta _{2} & -\beta _{2,3} & \beta _{3} & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \ddots & \ddots & \vdots & \vdots \\ 0& 0 & \cdots &\beta _{N^{\prime\prime\prime}}& -\beta _{N^\prime,^{\prime\prime}N^{\prime\prime}}& \beta _{N^{\prime\prime}} & 0 \\ 0& 0 & 0 & \cdots & \beta _{N^{\prime\prime}} & -\beta _{N,^{\prime\prime}N^\prime}&\beta _{N^\prime}\\ \end{array} \right ] }$$
(11.49e)

where α k and β k are now defined correspondingly, i.e., for i, j, k = 1, , N′,

$$\displaystyle\begin{array}{rcl} \alpha _{k} = \Delta \sigma _{k},\quad \alpha _{i,j} =\alpha _{i} +\alpha _{j},\quad \beta _{k} = 1/\alpha _{k},\quad \beta _{i,j} =\beta _{i} +\beta _{j}& &{}\end{array}$$
(11.50)

while N , N ′ ′, and N ′ ′ ′ are defined as in Eq. (6.58f), i.e., as

$$\displaystyle{ {N}^{{\prime}}\equiv N - 1,\quad {N}^{{\prime\prime}}\equiv N - 2,\quad \quad {N}^{{\prime\prime\prime}}\equiv N - 3 }$$
(11.51)

Note that the spline p(σ) is fully determined once its coefficients are known. These are computed exactly as their counterparts for nonparametric splines, namely, as in Eqs. (6.55a–e). Obviously, different from the aforementioned formulas, the coefficients of the parametric spline pertain to three coordinates, and hence, three sets of such coefficients need be computed in this case. In order to simplify matters, we introduce the vectors below:

$$\displaystyle{ \mathbf{a}_{k} \equiv \left [\begin{array}{c} A_{xk} \\ A_{yk} \\ A_{zk}\\ \end{array} \right ],\quad \mathbf{b}_{k} \equiv \left [\begin{array}{c} B_{xk} \\ B_{yk} \\ B_{zk}\\ \end{array} \right ],\quad \mathbf{c}_{k} \equiv \left [\begin{array}{c} C_{xk} \\ C_{yk} \\ C_{zk}\\ \end{array} \right ],\quad \mathbf{d}_{k} \equiv \left [\begin{array}{c} D_{xk} \\ D_{yk} \\ D_{zk}\\ \end{array} \right ] }$$
(11.52)

and thus, the position vector of an arbitrary point P on the parametric spline takes on the form

$$\displaystyle{ \mathbf{p}(\sigma ) = \mathbf{a}_{k}{(\sigma -\sigma _{k})}^{3} + \mathbf{b}_{ k}{(\sigma -\sigma _{k})}^{2} + \mathbf{c}_{ k}(\sigma -\sigma _{k}) + \mathbf{d}_{k},\quad k = 1,\ldots,N - 1 }$$
(11.53a)

in the interval \(\sigma _{k} \leq \sigma \leq \sigma _{k+1}\). The counterpart set of Eqs. (6.55a–e) is then

$$\displaystyle\begin{array}{rcl} \mathbf{a}_{k}& =& \frac{1} {6\,\Delta \sigma _{k}}\,(\mathbf{p}_{k+1}^{{\prime\prime}}-\mathbf{p}_{ k}^{{\prime\prime}}){}\end{array}$$
(11.53b)
$$\displaystyle\begin{array}{rcl} \mathbf{b}_{k}& =& \frac{1} {2}\,\mathbf{p}_{k}^{{\prime\prime}}{}\end{array}$$
(11.53c)
$$\displaystyle\begin{array}{rcl} \mathbf{c}_{k}& =& \frac{\Delta \mathbf{p}_{k}} {\Delta \sigma _{k}} -\frac{1} {6}\,\Delta \sigma _{k}\,(\mathbf{p}_{k+1}^{{\prime\prime}} + 2\mathbf{p}_{ k}^{{\prime\prime}}){}\end{array}$$
(11.53d)
$$\displaystyle\begin{array}{rcl} \mathbf{d}_{k}& =& \mathbf{p}_{k}{}\end{array}$$
(11.53e)
$$\displaystyle\begin{array}{rcl} \Delta \mathbf{p}_{k}& \equiv & \mathbf{p}_{k+1} -\mathbf{p}_{k}{}\end{array}$$
(11.53f)

where vectors p k and \(\mathbf{p}_{k}^{{\prime\prime}}\) are defined as

$$\displaystyle{ \mathbf{p}_{k} \equiv \left [\begin{array}{c} x_{k} \\ y_{k} \\ z_{k}\\ \end{array} \right ],\qquad \mathbf{p}_{k}^{{\prime\prime}}\equiv \left [\begin{array}{c} x_{k}^{{\prime\prime}} \\ y_{k}^{{\prime\prime}} \\ z_{k}^{{\prime\prime}}\\ \end{array} \right ] }$$
(11.54)

Note that since p is piecewise cubic in σ, p is piecewise quadratic, whereas p ′ ′ is piecewise linear in the same argument, p ′ ′ ′ being piecewise constant; higher-order derivatives vanish. Properly speaking, however, the piecewise constancy of \({\mathbf{p}}^{{\prime\prime\prime}}\) causes the fourth-order derivative to be discontinuous at the SP, and consequently, all higher-order derivatives are equally discontinuous at those points. In practice, these discontinuities are smoothed out by the inertia of the links and the motors, if the SP are chosen close enough. Obviously, higher-order continuity can be achieved if higher-order splines, e.g., quintic splines, are used instead. For the sake of conciseness, these splines are not discussed here, the interested reader being directed to the specialized literature (Dierckx 1993).

Further, the N × 3 matrices P and P ′ ′ are defined as

$$\displaystyle{ \mathbf{P} \equiv \left [\begin{array}{c} \mathbf{p}_{1}^{T} \\ \mathbf{p}_{2}^{T}\\ \vdots \\ \mathbf{p}_{N}^{T}\\ \end{array} \right ],\quad {\mathbf{P}}^{{\prime\prime}}\equiv \left [\begin{array}{c} {(\mathbf{p}_{1}^{{\prime\prime}})}^{T} \\ {(\mathbf{p}_{2}^{{\prime\prime}})}^{T}\\ \vdots \\ {(\mathbf{p}_{N}^{{\prime\prime}})}^{T}\\ \end{array} \right ] }$$
(11.55)

which allows us to rewrite Eqs. (11.49b) in matrix form as

$$\displaystyle{ \mathbf{A}{\mathbf{P}}^{{\prime\prime}} = 6\mathbf{C}\mathbf{P} }$$
(11.56)

It is now apparent that the spline coefficients \(\mathbf{a}_{k},\,\ldots,\,\mathbf{d}_{k}\) can be calculated once vectors \(\mathbf{p}_{k}^{{\prime\prime}}\) are available. These vectors can be computed via matrix \({\mathbf{P}}^{{\prime\prime}}\) as the solution to Eq. (11.56). However, finding this solution requires inverting the (N − 2) × N matrix A, which is rectangular and hence cannot be inverted, properly speaking. We thus have an underdetermined system of linear equations, and further conditions are needed in order to render it determined. Such conditions are those defining the type of spline at hand. For example, closed paths call naturally for periodic splines, while open paths call for other types such as natural splines. The conditions imposed on periodic parametric splines are listed below:

$$\displaystyle{ \mathbf{p}_{N} = \mathbf{p}_{1},\quad \mathbf{p}_{N}^{{\prime}} = \mathbf{p}_{ 1}^{{\prime}},\quad \mathbf{p}_{ N}^{{\prime\prime}} = \mathbf{p}_{ 1}^{{\prime\prime}} }$$
(11.57a)

On the other hand, natural parametric splines are obtained under the conditions

$$\displaystyle{ \mathbf{p}_{1}^{{\prime\prime}} = \mathbf{p}_{ N}^{{\prime\prime}} = \mathbf{0} }$$
(11.57b)

Thus, if a periodic parametric spline is required, then vectors p N and \(\mathbf{p}_{N}^{{\prime\prime}}\) can be deleted from matrices P and \({\mathbf{P}}^{{\prime\prime}}\), respectively, these then becoming (N − 1) × 3 matrices, namely,

$$\displaystyle{ \mathbf{P} \equiv \left [\begin{array}{c} \mathbf{p}_{1}^{T} \\ \mathbf{p}_{2}^{T}\\ \vdots \\ \mathbf{p}_{N-1}^{T}\\ \end{array} \right ],\quad {\mathbf{P}}^{{\prime\prime}}\equiv \left [\begin{array}{c} {(\mathbf{p}_{1}^{{\prime\prime}})}^{T} \\ {(\mathbf{p}_{2}^{{\prime\prime}})}^{T}\\ \vdots \\ ({\mathbf{p}_{N-1}^{{\prime\prime}}}^{T})\\ \end{array} \right ] }$$
(11.58)

Moreover, the first-derivative condition of Eq. (11.57a) is added to the N − 2 continuity conditions of Eq. (6.56), thereby obtaining N − 1 equations of this form. Consequently, A becomes an \((N - 1) \times (N - 1)\) matrix. Correspondingly, C also becomes an \((N - 1) \times (N - 1)\) matrix, i.e.,

$$\displaystyle{ \mathbf{A} \equiv \left [\begin{array}{cccccc} 2\alpha _{1,N^\prime}& \alpha _{1} & 0 & 0 & \cdots & \alpha _{N^\prime} \\ \alpha _{1} & 2\alpha _{1,2} & \alpha _{2} & 0 & \cdots & 0 \\ 0 & \alpha _{2} & 2\alpha _{2,3} & \alpha _{3} & \cdots & 0\\ \vdots & \vdots & \ddots & \ddots & \ddots & \vdots \\ 0 & 0 & \ldots &\alpha _{N^{\prime\prime\prime}}&2\alpha _{N^{\prime\prime\prime},N^{\prime\prime}}& \alpha _{N^{\prime\prime}} \\ \alpha _{N^\prime} & 0 & 0 & \cdots & \alpha _{N^{\prime\prime}} &2\alpha _{N^{\prime\prime},N^\prime}\\ \end{array} \right ] }$$
(11.59a)

and

$$\displaystyle{ \mathbf{C} \equiv \left [\begin{array}{cccccc} -\beta _{1,N^\prime}& \beta _{1} & 0 & 0 & \cdots & \beta _{N^\prime} \\ \beta _{1} & -\beta _{1,2} & \beta _{2} & 0 & \cdots & 0 \\ 0 & \beta _{2} & -\beta _{2,3} & \beta _{3} & \cdots & 0\\ \vdots & \vdots & \ddots & \ddots & \ddots & \vdots \\ 0 & 0 & \cdots &\beta _{N^{\prime\prime\prime}}& -\beta _{N^{\prime\prime\prime},N^{\prime\prime}}& \beta _{N^{\prime\prime}} \\ \beta _{N^\prime} & 0 & 0 & \cdots & \beta _{N^{\prime\prime}} & -\beta _{N^{\prime\prime},N^\prime} \end{array} \right ] }$$
(11.59b)

Since A is nonsingular, Eq. (11.56) can be solved for \({\mathbf{P}}^{{\prime\prime}}\), namely,

$$\displaystyle{{ \mathbf{P}}^{{\prime\prime}} = 6{\mathbf{A}}^{-1}\mathbf{C}\mathbf{P} }$$
(11.60)

thereby computing all vectors \(\{\mathbf{p}_{k}^{{\prime\prime}}\}_{1}^{N-1}\), from which \(\mathbf{p}_{N}^{{\prime\prime}}\) can be readily obtained. Hence, the spline coefficients follow.

Likewise, if natural parametric splines are used, then \({\mathbf{P}}^{{\prime\prime}}\) becomes an (N − 2) × 3 matrix, while A, consequently, becomes an \((N - 2) \times (N - 2)\) matrix, as given in Eq. (6.59).

Table 11.2 The Cartesian coordinates of the supporting points

Example 11.4.1 (Spline-Approximation of a Warped Path).

For the numerical values R = 0. 6 m, r = 0. 15 m, and d = 0. 3 m, determine the periodic parametric cubic spline approximating the intersection of the sphere and the cylinder of Fig. 11.4, with 12 equally spaced supporting points along the cylindrical coordinate \(\varphi\), i.e., with supporting points distributed along the intersection curve at intervals \(\Delta \varphi = 3{0}^{\circ }\). Using the spline, find values of the tangent, normal, and binormal vectors of the curve, as well as the rotation matrix Q. In order to quantify the error in this approximation, compare (a) the components of the two position vectors, the exact and the spline-generated ones, while normalizing their differences using the radius of the cylinder r; and (b) the Euler–Rodrigues parameters of the exact and the spline-approximated rotation matrices. Plot these errors vs. \(\varphi\).

Solution: We use Eq. (11.37) to find the Cartesian coordinates of the supporting points. The numerical results are given in terms of the components of \(\mathbf{r} \equiv {[\,x,\,y,\,z\,]}^{T}\) in Table 11.2. Note that this table does not include the Cartesian-coordinate values at 360 because these are identical with those at 0.

The four Euler–Rodrigues parameters \(\{r_{i}\}_{i=0}^{3}\) of the rotation matrix are most suitably calculated in terms of the linear invariants, i.e., as appearing in Eq. (2.79). If we let \(\tilde{\mathbf{p}}\) and \(\tilde{\mathbf{r}}\) denote the estimates of p and r, respectively, then the orientation error is evaluated via the four differences \(\Delta r_{i} = r_{i} -\tilde{ r}_{i}\), for i = 0, , 3. The positioning error is computed, in turn, as the normalized difference \(\boldsymbol{\epsilon } = (\mathbf{p} -\tilde{\mathbf{p}})/r\) to yield a dimensionless number, its components being denoted by ε x , ε y , and ε z . The components of the two errors are plotted vs. \(\varphi\) in Figs. 11.5 and 11.6. Note that the orientation errors are, roughly, one order of magnitude greater than the positioning errors.

Fig. 11.5
figure 5

Plots of the positioning errors

Fig. 11.6
figure 6

Plots of the orientation errors

11.5 Continuous-Path Tracking

When a continuous trajectory is to be tracked with a robot, the joint angles have to be calculated along a continuous set of poses of the end-effector. In practice, the continuous trajectory is sampled at a discrete set of close-enough poses \(\{\,\mathbf{s}_{k}\,\}_{1}^{N}\) along the continuous trajectory. Then in principle, an IKP must be solved at each sampled pose. If the manipulator is of the decoupled type, these calculations are feasible in a fraction of a millisecond, for the solution reduces, in the majority of the cases, to a cascading of quadratic equations. In the worst case, the inverse kinematics of a decoupled manipulator requires finding all the roots of a quartic equation at each sampled pose, but this is still feasible in the same time frame, for the four roots of interest can be calculated from formulas. However, if the manipulator has an architecture not lending itself to a simple solution and requires solving polynomials of a degree higher than four, then finding all solutions at each sample pose may require a few milliseconds, which may be too slow in fast operations. Hence, an alternative approach is needed.

The alternative is to solve the IKP iteratively. That is, if we have the value of the vector of joint variables \(\boldsymbol{\theta }(t_{k})\) and want to find its value at t k+1, then we use Algorithm 11.5.1.

Various procedures are available to find the correction \(\Delta \boldsymbol{\theta }\) of Algorithm 11.5. The one we have found very convenient is based on the Newton–Gauss method (Dahlquist and Björck 1974). In the realm of Newton methods—there are several of these, the Newton–Gauss and the Newton–Raphson methods being two of this class—the closure equations (4.9a and b) are written in the form

$$\displaystyle{ \mathbf{f}(\boldsymbol{\theta }) = \mathbf{s}_{d} }$$
(11.61)

where s d is the seven-dimensional prescribed-pose array. We recall here the definition of the pose array introduced in Sect. 3.2 to represent s d , namely,

$$\displaystyle{ \mathbf{s}_{d} \equiv \left [\begin{array}{c} \mathbf{q}\\ q_{ 0}\\ \mathbf{p}\\ \end{array} \right ]_{d} }$$
(11.62)

with q and q 0 defined, in turn, as a three-dimensional vector invariant of the rotation Q and its corresponding scalar, respectively. Moreover, p is the position vector of the operation point. Therefore, the seven-dimensional vector f is defined, correspondingly, as

$$\displaystyle{ \mathbf{f}(\boldsymbol{\theta }) \equiv \left [\begin{array}{c} \mathbf{f}_{v}(\boldsymbol{\theta }) \\ f_{0}(\boldsymbol{\theta }) \\ \mathbf{f}_{p}(\boldsymbol{\theta })\\ \end{array} \right ] \equiv \left [\begin{array}{c} \mathbf{q}\\ q_{ 0}\\ \mathbf{p}\\ \end{array} \right ] }$$
(11.63)

where \(\mathbf{f}_{v}(\boldsymbol{\theta })\) denotes the counterpart of q above, as pertaining to the product \(\mathbf{Q}_{1}\cdots \mathbf{Q}_{6}\) of Eq. (4.9a); \(f_{0}(\boldsymbol{\theta })\) is the counterpart of q 0, as pertaining to the same product; and \(\mathbf{f}_{p}(\boldsymbol{\theta })\) is the sum \(\mathbf{a}_{1} + \cdots + \mathbf{Q}_{1}\cdots \mathbf{Q}_{5}\mathbf{a}_{6}\). In principle, any of the three types of rotation invariants introduced in Sect. 3.2 can be used in the above formulation.

Now, Eq. (11.61) represents a nonlinear system of seven equations in six unknowns. The system is thus overdetermined, but since the four rotational equations are consistent, this system should admit an exact solution, even if this solution is complex. For example, if p is specified in s d above as lying outside of the manipulator reach, then no real solution is possible, and the solution reported by any iterative procedure capable of handling complex solutions will be complex.

Upon application of the Newton–Gauss method to find a solution of Eq. (11.61), we assume that we have an initial guess \({\boldsymbol{\theta }}^{0}\), and based on this value, we generate a sequence \({\boldsymbol{\theta }}^{1}\), , \({\boldsymbol{\theta }}^{i}\), \({\boldsymbol{\theta }}^{i+1}\), , until either a convergence or an abortion criterion is met. This sequence is generated in the form

$$\displaystyle{{ \boldsymbol{\theta }}^{i+1} ={ \boldsymbol{\theta }}^{i} + \Delta {\boldsymbol{\theta }}^{i} }$$
(11.64)

with \(\Delta {\boldsymbol{\theta }}^{i}\) calculated from

$$\displaystyle{ \boldsymbol{\Phi }({\boldsymbol{\theta }}^{i})\Delta {\boldsymbol{\theta }}^{i} = -\mathbf{f}({\boldsymbol{\theta }}^{i}) + \mathbf{s}_{ d} }$$
(11.65)

and \(\boldsymbol{\Phi }\) defined as the Jacobian matrix of \(\mathbf{f}(\boldsymbol{\theta })\) with respect to \(\boldsymbol{\theta }\). Note that by virtue of its definition, \(\boldsymbol{\Phi }\) is a 7 × 6 matrix. A common misconception in the robotics literature is to confuse this Jacobian matrix with the Jacobian defined by Whitney (1972) and introduced in Eq. (5.10a), which maps joint rates into the EE twist. The difference between the two Jacobians being essential, it is made clear in the discussion below. First and foremost, \(\boldsymbol{\Phi }\) is an actual Jacobian matrix, while Whitney’s Jacobian, properly speaking, is not. In fact, \(\boldsymbol{\Phi }\) is defined as

$$\displaystyle{ \boldsymbol{\Phi } \equiv \frac{\partial \mathbf{f}} {\partial \boldsymbol{\theta }} }$$
(11.66)

In order to find \(\boldsymbol{\Phi }\) in Eq. (11.65), we note that by application of the chain rule,

$$\displaystyle{ \dot{\mathbf{f}} = \frac{\partial \mathbf{f}} {\partial \boldsymbol{\theta }} \dot{\boldsymbol{\theta }} \equiv \boldsymbol{\Phi }\dot{\boldsymbol{\theta }} }$$
(11.67)

However, from the definition of f, we have that \(\dot{\mathbf{f}}\) is the time-derivative of the pose array of the EE, i.e., \(\dot{\mathbf{s}}\). Moreover, by virtue of Eq. (3.78), this time-derivative can be expressed as a linear transformation of the twist t of the EE, i.e.,

$$\displaystyle{ \dot{\mathbf{f}} = \mathbf{T}\mathbf{t} }$$
(11.68a)

with T defined in Sect. 3.2 as

$$\displaystyle{ \mathbf{T} \equiv \left [\begin{array}{cc} \mathbf{F} &\mathbf{O}_{43} \\ \mathbf{O}_{33} & \mathbf{1}_{33}\\ \end{array} \right ] }$$
(11.68b)

where O 33 and O 43 denote the 3 × 3 and the 4 × 3 zero matrices, 1 33 being the 3 × 3 identity matrix. Further, matrix F takes on various forms, depending on the type of rotation representation adopted, as discussed in Sect. 3.2.

We write next the left-hand side of Eq. (11.68a) as shown in Eq. (11.67), and the twist t of the right-hand side of Eq. (11.68a) in terms of \(\dot{\boldsymbol{\theta }}\), as expressed in Eq. (5.9), thereby obtaining

$$\displaystyle{ \boldsymbol{\Phi }\dot{\boldsymbol{\theta }} \equiv \mathbf{T}\mathbf{J}\dot{\boldsymbol{\theta }} }$$
(11.69)

which is a relation valid for any value of \(\dot{\boldsymbol{\theta }}\). As a consequence, then,

$$\displaystyle{ \boldsymbol{\Phi } = \mathbf{T}\mathbf{J} }$$
(11.70)

whence the relation between the two Jacobians is apparent. Note that Eq. (11.68a) allows us to write

$$\displaystyle{ \dot{\mathbf{f}} = \mathbf{T}\mathbf{J}\dot{\boldsymbol{\theta }} }$$
(11.71)

Upon equating the right-hand sides of Eqs. (11.71) and (11.68a), we obtain

$$\displaystyle{ \mathbf{T}\mathbf{J}\dot{\boldsymbol{\theta }} = \mathbf{T}\mathbf{t} \equiv \dot{\mathbf{s}}_{d} }$$
(11.72)

If linear invariants are used to represent the rotation, then T becomes rank-deficient if and only if the angle of the rotation becomes π (Tandirci et al. 1994); otherwise, T is always of full rank, and Eq. (11.72) leads to

$$\displaystyle{ \mathbf{J}\dot{\boldsymbol{\theta }} = \mathbf{t} }$$
(11.73)

which is exactly the same as Eq. (5.9). Now we multiply both sides of the foregoing equation by \(\Delta t\), thereby obtaining

$$\displaystyle{ \mathbf{J}\Delta \boldsymbol{\theta } = \mathbf{t}\Delta t }$$
(11.74)

All we need now is, apparently, the product in the right-hand side of the above equation, namely,

$$\displaystyle{ \mathbf{t}\Delta t = \left [\begin{array}{c} \boldsymbol{\omega }\Delta t\\ \dot{\mathbf{p} }\Delta t\\ \end{array} \right ] \equiv \left [\begin{array}{c} \boldsymbol{\omega }\Delta t\\ \Delta \mathbf{p}\\ \end{array} \right ] }$$
(11.75)

The product \(\boldsymbol{\omega }\Delta t\) is found below, in terms of the orientation data available: First and foremost, it is common practice in the realm of Newton methods to assume that a good enough approximation to the root sought is available, and hence, \(\Delta \boldsymbol{\theta }\) is “small.” That is, we assume that \(\|\Delta \boldsymbol{\theta }\|\) is small, where \(\|\,\cdot \,\|\) denotes any vector norm. Moreover, we use the end-effector pose at t = t k as a reference to describe the desired pose at \(t = t_{k+1}\), the rotation sought—that takes the EE to its desired attitude—being denoted by \(\Delta \mathbf{Q}\), and defined as \((\Delta \mathbf{Q})\mathbf{Q}k = \mathbf{Q}d\), when all rotations are expressed in the same frame and Q k represents the orientation of the EE at t = t k . Thus,

$$\displaystyle{ \Delta \mathbf{Q} = \mathbf{Q}d\mathbf{Q}{k}^{T} }$$
(11.76)

Now we relate \(\boldsymbol{\omega }\Delta t\) with \(\Delta \mathbf{Q}\). To this end, notice that

$$\displaystyle{ \boldsymbol{\omega }\Delta t = \mathrm{vect}(\boldsymbol{\Omega }\Delta t) }$$
(11.77a)

with \(\boldsymbol{\Omega }\) denoting the cross-product matrix of \(\boldsymbol{\omega }\). On the other hand, \(\Delta \mathbf{Q}\) is bound to be a rotation about an axis parallel to a unit vector e, through a small angle \(\Delta \phi\), and hence, from Eq. (2.49),

$$\displaystyle{ \Delta \mathbf{Q} \approx \mathbf{1} + (\Delta \phi )\mathbf{E} }$$
(11.77b)

where E is the cross-product matrix of \(\mathbf{e}\). It is then possible to assume that \(\boldsymbol{\Omega }\Delta t\), as appearing in Eq. (11.77a), is the skew-symmetric component of \(\Delta \mathbf{Q}\), as given by Eq. (11.77b), i.e.,

$$\displaystyle{\Delta \mathbf{Q} = \mathbf{1} + \boldsymbol{\Omega }\Delta t}$$

whence

$$\displaystyle{\boldsymbol{\Omega }\Delta t = \mathbf{Q}_{d}\mathbf{Q}_{k}^{T} -\mathbf{1}}$$

which readily leads to

$$\displaystyle{ \boldsymbol{\omega }\Delta t = \mathrm{vect}(\mathbf{Q}_{d}\mathbf{Q}_{k}^{T}) }$$
(11.78)

thereby obtaining the relation sought.

In summary, then, the correction \(\Delta \boldsymbol{\theta }\) is computed from

$$\displaystyle{ \mathbf{J}\Delta \boldsymbol{\theta } = \Delta \mathbf{t} }$$
(11.79)

with \(\Delta \mathbf{t}\) defined as

$$\displaystyle{ \Delta \mathbf{t} \equiv \left [\begin{array}{c} \mathrm{vect}(\mathbf{Q}d\mathbf{Q}{k}^{T}) \\ \Delta \mathbf{p}\\ \end{array} \right ] }$$
(11.80)

and \(\Delta \mathbf{p}\) defined, in turn, as the difference between the prescribed value \(\mathbf{p}_{d}\) of the position vector of the operation point and its value \(\mathbf{p}_{k}\) at the current iteration. Thus, the numerical path-tracking scheme consists essentially of Eqs. (11.79) and (11.80), as first proposed by Pieper (1968). We thus have Algorithm 11.5.2.

When implementing the foregoing procedure, we want to save processing time; hence, we aim at fast computations. The computation of the correction \(\Delta \boldsymbol{\theta }\) involves only linear-equation solving, which was discussed at length in Chap. 4 and need not be discussed further here. The only item that still needs some discussion is the calculation of the vector norm \(\|\Delta \boldsymbol{\theta }\|\). Since any norm can be used here, we can choose the norm that is fastest to compute, namely, the maximum norm, also known as the Chebyshev norm, represented as \(\|\Delta \boldsymbol{\theta }\|_{\infty }\), and defined as

$$\displaystyle{ \|\Delta \boldsymbol{\theta }\|_{\infty }\equiv \max _{i}\{\,\vert \theta _{i}\vert \,\} }$$
(11.81)

Note that this norm only requires comparisons and no floating-point operations. The Euclidean norm of an n-dimensional vector, however, requires n multiplications, n − 1 additions, and one square root.

Example 11.5.1 (Path-Tracking for Arc-Welding).

With reference to the arc-welding exercise of Example 11.3.2, we want to use the Fanuc Arc Mate, whose Denavit–Hartenberg parameters are listed in Table 5.2. Furthermore, the welding seam to be tracked is placed well within the workspace of the manipulator. A location found quite suitable for this task was obtained with the aid of RVS, our Robot Visualization System. This location requires that the coordinate frame \(\mathcal{F}_{C}\) of Fig. 11.4 have its axes parallel pairwise to those of the robot base, \(\mathcal{F}_{1}\). The latter is defined according to the Denavit–Hartenberg notation, and so Z 1 coincides with the axis of the first revolute; it is, moreover, directed upwards. The position found for the origin O C of \(\mathcal{F}_{C}\), of position vector o, is given in \(\mathcal{F}_{1}\) as

$$\displaystyle{[\,\mathbf{o}\,]_{1} \equiv \left [\begin{array}{c} x\\ y \\ z\\ \end{array} \right ] = \left [\begin{array}{c} - 1.0\\ - 0.1 \\ 0.5\\ \end{array} \right ]\,\mathrm{m}}$$

Find the time-histories of all the joint variables that will perform the desired operation with the tip of the electrode traversing the intersection curve at the constant speed of v 0 = 0. 1 m/s. Furthermore, plot the variation of the condition number of the Jacobian matrix along the path.

Solution: The robot at hand was studied in Sect. 9.7, where it was found not to be of the decoupled type. In fact, this robot does not admit a closed-form inverse displacement solution, and hence, the foregoing iterative procedure is to be used.

At the outset, we calculate all inverse displacement solutions at the pose corresponding to \(\varphi = 0\) using the bivariate-equation approach of Sect. 9.4. This pose is defined by the orthogonal matrix Q and the position vector p given below:

$$\displaystyle{[\,\mathbf{Q}\,]_{1} \equiv \left [\begin{array}{ccc} \mathbf{e}_{b}&\mathbf{e}_{t}&\mathbf{e}_{n}\\ \end{array} \right ] = \left [\begin{array}{ccc} 0.6030&0& - 0.7977\\ 0 &1 & 0 \\ 0.7977&0& 0.6030 \end{array} \right ],\quad [\,\mathbf{p}\,]_{1} = \left [\begin{array}{c} - 0.5500\\ - 0.100 \\ 0.8969\\ \end{array} \right ]\,\mathrm{m}}$$

with both Q and p given in robot-base coordinates. The contours for the above pose, which were obtained using the procedure of Sect. 9.4, are shown in Fig. 11.7, the eight solutions obtained being summarized in Table 11.3, which includes the condition number of the Jacobian, κ(J), of each solution. Note that the calculation of κ(J) required computing the characteristic length of the robot, as explained in Sect. 5.8. This length, as calculated in that section, turned out to be L = 0. 3573 m.

Fig. 11.7
figure 7

Contour solutions of the Fanuc Arc Mate robot at the given EE pose

Table 11.3 Inverse kinematics solutions of the Fanuc Arc Mate robot for the given EE pose

Now, we have eight solutions at our disposal, from which we must choose one for path-tracking. In the absence of any criterion to single out one specific solution, we can pick up the solution with the lowest condition number. If we do this, we end up with solution 1 in Table 11.3. However, when we attempted to track the given path with this solution, it turned out that this solution encountered a singularity and was hence discarded. Of the seven remaining solutions, solution 5 has the lowest condition number; this solution led to a singularity-free trajectory.

Once the appropriate solution is chosen, the trajectory can be tracked with the aid of Algorithm 11.5.2. Here, we need a discrete set of poses at equal time-intervals. Note that we can produce such a set at equal intervals of angle \(\varphi\) because we have expressions for the pose variables in terms of this angle. In order to obtain this set at equal time-intervals, then, we need angle \(\varphi\) as a function of time, i.e., \(\varphi (t)\). In the sequel, we will also need the time T required to complete the task. Now, since the speed of the electrode tip is constant and equal to v 0, the time T is readily obtained by dividing the total length l of the curve by v 0. The length of the curve, in turn, can be computed as s(2π), where function \(s(\varphi )\) denotes the arc length as a function of angle \(\varphi\), i.e.,

$$\displaystyle{ s(\varphi ) =\int _{ 0}^{\varphi }\|{\mathbf{r}}^{{\prime}}(\varphi )\|d\varphi }$$
(11.82)

We thus obtain, by numerical quadrature,

$$\displaystyle{l \equiv s(2\pi ) = 1.0257\,\mathrm{m}}$$

Hence, the total time is

$$\displaystyle{T \equiv \frac{l} {v_{0}} = 10.257\,\mathrm{s}}$$

Now, in order to obtain \(\varphi (t)\), we first calculate \(\dot{s}\) as

$$\displaystyle{ \dot{s} \equiv \frac{ds} {dt} = \frac{ds} {d\varphi } \frac{d\varphi } {dt} = \dot{\varphi }\frac{ds} {d\varphi } }$$
(11.83a)

Furthermore, we note that \(ds/d\varphi =\|{ \mathbf{r}}^{{\prime}}(\varphi )\|\), which allows us to write \(\dot{s}\) as

$$\displaystyle{\dot{s} \equiv \dot{\varphi }\|{\mathbf{r}}^{{\prime}}(\varphi )\|}$$

Moreover, \(\|{\mathbf{r}}^{{\prime}}(\varphi )\|\) was found in Eq. (11.39b) to be

$$\displaystyle{\|{\mathbf{r}}^{{\prime}}(\varphi )\| = rG(\varphi )}$$

\(\dot{s}\) thus becoming

$$\displaystyle{ \dot{s} = rG\dot{\varphi } }$$
(11.83b)

Furthermore, we recall the expression derived for \(G(\varphi )\) in Eq. (11.39e). This expression, along with the constancy condition on \(\dot{s}\), i.e., \(\dot{s} = v_{0}\), leads to

$$\displaystyle{r\dot{\varphi }\sqrt{1 + {(\lambda \hat{\varphi }\sin \varphi )}^{2}} = v_{0}}$$

where r is the radius of the cylinder. Upon solving for \(\dot{\varphi }\) from the above equation, we obtain

$$\displaystyle{\dot{\varphi } = \frac{v_{0}} {r} \sqrt{ \frac{{\rho }^{2 } - 2\lambda \cos \varphi } {{\rho }^{2} - 2\lambda \cos \varphi {+\lambda { }^{2}\sin }^{2}\varphi }}}$$

which is a nonlinear first-order differential equation for \(\varphi (t)\). Its initial value can be assigned as \(\varphi (0) = 0\), thereby formulating a nonlinear first-order initial-value problem. The numerical solution of the foregoing problem is nowadays routine work, which can be handled with suitable software, e.g., Matlab (Hanselman and Littlefield 2001). Upon solving this equation, a data file is produced that contains the time-history of \(\varphi\). The plot of \(\varphi\) vs. nondimensional time is displayed in Fig. 11.8a. Since the variations of \(\varphi (t)\) are relatively small, this plot provides little information on the time-history of interest. A more informative plot, that of \(\dot{\varphi }(t)\), is included in Fig. 11.8b for this reason. Apparently, \(\varphi\) turns out to be the sum of a linear and a periodic term.

With \(\varphi (t)\) known as a function of time, we can now specify the pose of the end-effector, i.e., p and Q, as functions of time.

The whole trajectory was tracked with the robot at hand using the algorithm outlined in this section. With the aid of this algorithm, we produced the plots of Fig. 11.9. Also, the time-history of the condition number of the manipulator Jacobian was computed and plotted in Fig. 11.10. Apparently, the condition number of the Jacobian remains within the same order of magnitude throughout the whole operation, below 10, thereby showing that the manipulator remains far enough from singularities during this task—the condition number becomes very large when a singularity is approached, becoming unbounded at singularities. A rendering of the welding seam with the Frenet–Serret triad at a sample of points is displayed in Fig. 11.11. It is noteworthy that the torsion of the path is manifested in this figure by virtue of the inclination of the Z axis, which changes from point to point. In a planar curve, this axis would remain at a fixed orientation while traversing the curve.

Fig. 11.8
figure 8

Plot of \(\dot{\varphi }\) vs. nondimensional time

Fig. 11.9
figure 9

Time-histories of the joint variables (in degrees) of the Fanuc Arc Mate robot used to track a warped curve for arc-welding vs. nondimensional time

Fig. 11.10
figure 10

Time-history of the condition number of the Jacobian matrix during an arc-welding operation vs. nondimensional time

Fig. 11.11
figure 11

Welding seam with Frenet–Serret frames

11.6 Exercises

  1. 11.1

    A PUMA 560 robot, with the DH parameters of Table 11.4, is used to perform a gluing operation as indicated below: A nozzle dispensing the glue is rigidly attached to the gripper of the robot. The tip of the nozzle, point P, is to trace a helicoidal path at a constant rate of 50 mm/s. Furthermore, the center of the wrist is located at a point C, fixed to a Frenet–Serret coordinate frame. In this frame, the coordinates of C are ( 0, −50, 86. 7 ) mm. Moreover, the path to be traced by point P is given as

    $$\displaystyle{x = a\cos \vartheta,\ y = a\sin \vartheta,\ z = b\vartheta,\ 0 \leq \vartheta \leq \pi /2}$$

    with the values a = 300 mm, \(b = 800/\pi \,\mathrm{mm}\).

    Table 11.4 DH parameters of a PUMA 560 robot
    1. (a)

      Decide where to locate the robot base with respect to the path so that the latter will lie well within the workspace of the robot. Then, produce plots of θ i vs. t, for 0 ≤ t ≤ T, where T is the time it takes to traverse the whole trajectory, for i = 1, 2, , 6.

    2. (b)

      Produce plots of \(\dot{\theta }_{i}\) vs. t in the same time interval for all six joints.

    3. (c)

      Produce plots of \(\ddot{\theta }_{i}\) vs. t in the same time interval for all six joints.

  2. 11.2

    A bracket for spot-welding, shown in Fig. 11.12, is rigidly attached to the end-effector of a robotic manipulator. It is desired that point P of the bracket follow a helicoidal path Γ, while keeping the orientation of the bracket with respect to Γ as indicated below: Let \(\mathcal{B}\equiv \{\mathbf{i}_{0},\mathbf{j}_{0},\mathbf{k}_{0}\}\) and \(\mathcal{F}_{7} \equiv \{\mathbf{i}_{7},\mathbf{j}_{7},\mathbf{k}_{7}\}\) be triads of unit orthogonal vectors fixed to the base of the robot and to the bracket, respectively. Moreover, let \(\mathcal{F}\equiv \{\mathbf{e}_{t},\mathbf{e}_{n},\mathbf{e}_{b}\}\) be the Frenet–Serret triad of Γ, given as

    $$\displaystyle\begin{array}{rcl} \mathbf{e}_{t}& =& -0.6\sin \varphi \mathbf{i}_{0} + 0.6\cos \varphi \mathbf{j}_{0} + 0.8\mathbf{k}_{0} {}\\ \mathbf{e}_{n}& =& -\cos \varphi \mathbf{i}_{0} -\sin \varphi \mathbf{j}_{0} {}\\ \mathbf{e}_{b}& =& 0.8\sin \varphi \mathbf{i}_{0} - 0.8\cos \varphi \mathbf{j}_{0} + 0.6\mathbf{k}_{0} {}\\ \end{array}$$

    where \(\varphi\) is a given function of time, \(\varphi (t)\). Furthermore, the orientation of the bracket with respect to Γ is to be kept constant and given in terms of the Frenet–Serret triad as

    $$\displaystyle\begin{array}{rcl} \mathbf{i}_{7}& =& 0.933\mathbf{e}_{t} + 0.067\mathbf{e}_{n} - 0.354\mathbf{e}_{b} {}\\ \mathbf{j}_{7}& =& 0.067\mathbf{e}_{t} + 0.933\mathbf{e}_{n} + 0.354\mathbf{e}_{b} {}\\ \mathbf{k}_{7}& =& 0.354\mathbf{e}_{t} - 0.354\mathbf{e}_{n} + 0.866\mathbf{e}_{b} {}\\ \end{array}$$

    Additionally, R and S(t) denote the rotation matrices defining the orientation of \(\mathcal{F}_{7}\) with respect to \(\mathcal{F}\) and of \(\mathcal{F}\) with respect to \(\mathcal{B}\), respectively.

    Fig. 11.12
    figure 12

    A bracket for spot-welding

    1. (a)

      Find the matrix representation of S(t) in \(\mathcal{B}\).

    2. (b)

      Find the matrix representation of R in \(\mathcal{F}\).

    3. (c)

      Let Q(t) denote the orientation of \(\mathcal{F}_{7}\) with respect to \(\mathcal{B}\). Find its matrix representation in \(\mathcal{B}\).

    4. (d)

      Find the Darboux vector \(\boldsymbol{\delta }\) of the path, along with its time-derivative, \(\dot{\boldsymbol{\delta }}\), in base-fixed coordinates. Note: You can do this in several ways, as discussed in Sect. 11.2. Choose the one that will allow you to use previously computed results, thereby simplifying the computations.

  3. 11.3

    The parametric equations of a curve are given as

    $$\displaystyle{x = 2t,\ y = {t}^{2},\ z = {t}^{3}/3}$$

    where t is time. A robotic manipulator is to follow this trajectory so that its gripper keeps a constant orientation with respect to the Frenet–Serret frame of the curve.

    1. (a)

      Determine the unit vector parallel to the axis of rotation and the angle of rotation of the gripper as functions of time.

    2. (b)

      Find the angular velocity and angular acceleration of the gripper as functions of time.

  4. 11.4

    Derive Eqs. (11.45a and b).

  5. 11.5

    Find the spline approximation of the helix of Example 11.3.1. Then, plot the approximation errors of the Cartesian coordinates of points of the helix, for N = 5, 11, and 21 equally spaced supporting points. In order to assess the orientation error, compute the Darboux vectors of the spline, \(\boldsymbol{\delta }_{s}\), and of the helix, \(\boldsymbol{\delta }_{h}\). The approximation error of the orientation is now defined as

    $$\displaystyle{e_{o} \equiv \max _{\varphi }\{\|\boldsymbol{\delta }_{s}(\varphi ) -\boldsymbol{\delta }_{h}(\varphi )\|\}}$$

    with \(\varphi\) defined as in Example 11.3.1.

  6. 11.6

    Find the spline approximation of the curvature, torsion, and Darboux vector of the curve introduced in Example 11.3.2. Find expressions for the exact values of these variables and plot the approximation errors, for 5, 10, and 20 equally spaced supporting points vs. \(\varphi\). In the error definitions given below, subscript e indicates exact value, subscript s spline value:

    $$\displaystyle\begin{array}{rcl} e_{\kappa }& \equiv &\kappa _{s}(\varphi ) -\kappa _{e}(\varphi ) {}\\ e_{\tau }& \equiv &\tau _{s}(\varphi ) -\tau _{e}(\varphi ) {}\\ e_{\delta }& \equiv &\|\boldsymbol{\delta }_{s}(\varphi ) -\boldsymbol{\delta }_{e}(\varphi )\| {}\\ \end{array}$$
  7. 11.7

    From the plots of the time-histories of the joint angles calculated in Example 11.5.1, it is apparent that, with the exception of θ 4, which has a linear component, these histories are periodic. Repeat Example 11.5.1, but now using a spline approximation of the welding seam, with N = 5, 10, and 20 supporting points. With this spline approximation, calculate the pose, the twist, and the twist-rate at each supporting point. Now, calculate values of \(\boldsymbol{\theta }\), \(\dot{\boldsymbol{\theta }}\), and \(\ddot{\boldsymbol{\theta }}\) at each of these supporting points by means of inverse kinematics. Compare the values thus obtained of \(\ddot{\boldsymbol{\theta }}\) with those derived from the linear relation between the function values and the values of its second derivative at the supporting points when using a cubic spline.

  8. 11.8

    The decoupled robot of Fig. 4.23 is to perform an arc-welding operation along a welding seam that requires its wrist center C to travel at a constant speed of 1 m∕s along a line joining points A and B, not shown in that figure, while keeping the EE holding the electrode at a constant orientation with respect to the base frame. Moreover, the seam is to be traversed according to the following schedule: With point C located at a point A on the extension of AB, a distance of 250 mm from A, point C approaches A with a cycloidal motion at the specified speed; upon reaching B, point C decelerates with a cycloidal motion as well, until it reaches a point B in the other extension of AB, 250 mm from B, with zero speed. The position vectors of points A and B, denoted by a and b, respectively, are given, in base coordinates, as

    $$\displaystyle{\mathbf{a} = \left [\begin{array}{c} 500\\ - 500 \\ 500\\ \end{array} \right ],\quad \mathbf{b} = \left [\begin{array}{c} 1,200 \\ 0\\ 1, 200 \\ \end{array} \right ]}$$

    in mm. For the above-given data, find the time-histories of all joint variables.

  9. 11.9

    Derive expressions (11.45a and b).

  10. 11.10

    If linear invariants are used to represent the desired pose s d , then q = 0 and q 0 = 1 when the angle of rotation becomes π. Under these conditions, matrix T of Eq. (11.72) becomes rank-deficient, this equation thus not necessarily leading to Eq. (11.73). One way of coping with this algorithmic singularity consists in redefining axis X 1 of the DH notation by rotating the current X 1 axis by an angle \(\Delta \theta _{1}\) about Z 1, which does not affect the remaining variables and parameters of the said notation.

    Find the optimum value of \(\Delta \theta _{1}\) that will take T “farthest” from its current rank-deficiency.