4. Properties of parametric curves and its applications in robotics

In mobile robotics, two main needs have arisen when dealing with path planning of a mobile robot: definition of the initial path to follow and the possibility of modifying it in the presence of dynamic obstacles.

In the next paragraphs, the BTD algorithm is described [48, 49], which solves the abovementioned needs. It offers the possibility of defining the trajectory of a mobile robot through a Bézier curve and then modifies it by means of the repulsive forces derived from a predictive potential field (PF) method. Reactive methods or potential field methods generate obstacle-free paths for the robot. In these methods, the movement of the robot is determined by repulsive forces associated with obstacles and attractive forces associated to the goal position of the mobile robot. In this work, the potential field projection method (PFP) has been used [50, 51].

The set of discrete points provided by the posture prediction of the mobile robot is considered as initial points Si of the original Bézier curve. These points belong to a reference path in the BTD algorithm. Subsequently, the set of repulsive forces obtained by the PFP is transformed into displacements by a dynamic particle model, which generates endpoints Ti that determines the modification of the original Bézier trajectory with the BTD. A modified Bezier trajectory free of obstacles is obtained that passes through the endpoints, as displayed in Figure 2.

The definition of the BTD algorithm requires two steps:

Figure 2. Deformation of a Bézier trajectory through a field of vectors.

#### a. Definition of the trajectory using a Bézier curve

A Bézier curve has a non-dimensional intrinsic parameter, u, as defined in (5). Since the Bézier curve represents the path of the robot, the intrinsic parameter must be defined as a temporal variable so that the position of each curve (robot position) is associated with an instant of time t∈ t0,tf , where t<sup>0</sup> and t<sup>f</sup> represent the initial and final times of the trajectory, respectively. The definition of the initial Bézier trajectory is (13), where n is the order, Pi are the control points and Bi,nð Þt are the Bernstein bases defined in (14). To avoid loops in the Bézier curve, secondorder curves are used.

$$\alpha(t) = \sum\_{l=0}^{n} \mathbf{P}\_l \cdot \mathbf{B}\_{l,n}(t); t \in \left[t\_0, t\_f\right] \tag{13}$$

This objective function minimizes changes in the shape of the initial Bézier trajectory as it minimizes the distance between the original Bézier trajectory and the modified one. This definition is suitable for holonomic mobile robots since the original path has been generated

High order Bézier curves are numerically unstable and, for that reason, in order to generate a complete Bézier trajectory the concatenation of k curves is required. Therefore, the optimization function (16) is replaced by (17), where 1 ≤ l ≤ k, α<sup>l</sup> is every Bézier trajectory (l), Sεð Þ α<sup>l</sup> is the

h i are the initial and end instants of the Bézier trajectory ð Þ<sup>l</sup> ,

Path Planning Based on Parametric Curves http://dx.doi.org/10.5772/intechopen.72574

ð17Þ

137

ð18Þ

ð19Þ

ð20Þ

by a global path planner, and the original path is assumed to be already optimal.

The number of repulsive forces depends on the order of the Bézier trajectory: nð Þ<sup>l</sup> � 1.

i. The mobile robot must follow a collision-free path: The modified Bézier path must pass through the endpoints, so the robot does not collide with the obstacles the environment. The vectors joining the initial and end points are the repulsive forces obtained by the PFP

ii. The robot trajectory must be smooth: this constraint implies imposing continuity and

iii. Continuity between the present and future positions must be ensured: tangency must be maintained between the original Bézier trajectory and the deformed Bézier trajectory at the

derivability in the joint points of two curves, expressed by Eq. (19).

initial and end points of the trajectory. The equation is (20).

ð Þl <sup>0</sup> ; t ð Þl f

and εð Þ<sup>l</sup> is the perturbation vector of the modified curve (l).

c. The constraints of the optimization problem are:

method. The equation of this constraint is (18).

b. Number of Bézier curves

modified Bézier trajectory, t

$$\,^jB\_{t,n}(t) = \binom{n}{t} \left(\frac{t\_f - t}{t\_f - t\_0}\right)^{n-t} \left(\frac{t - t\_0}{t\_f - t\_0}\right)^t; i = 0, \dots, n \tag{14}$$

The initial Bézier trajectory will be deformed in order to avoid the surrounding obstacles, by modifying the position of the control points from the initial position to the new one imposed by the PFP obstacle avoidance algorithm. The displacement of each control point Piis denoted as εi, so that the vector ε ¼ ½ � ε0; ⋯; ε<sup>n</sup> is the displacement of all the control points defining the Bézier trajectory, also known as the perturbation vector of the deformed curve. The new modified Bézier trajectory Sεð Þ αð Þt is defined in (15) and, consequently, the optimizing function used to solve the problem is defined as (16), where the vector ε is computed as in [49].

$$\mathcal{S}\_{\sigma}(\alpha(t)) = \sum\_{l=0}^{n} (\mathbf{P}\_{l} + \mathbf{s}\_{l}) \cdot B\_{l,n}(t) \\ \mathbf{t} \in \left[t\_{0}, t\_{f}\right] \tag{15}$$

$$\min\_{\substack{\mathfrak{e} \\ \underline{\mathfrak{e}}}} \int\_{t\_0}^{t\_f} \left\| \mathbb{S}\_{\delta}(\alpha(\mathfrak{e})) - \alpha(\mathfrak{e}) \right\|\_{2}^{2} dt \tag{16}$$

This objective function minimizes changes in the shape of the initial Bézier trajectory as it minimizes the distance between the original Bézier trajectory and the modified one. This definition is suitable for holonomic mobile robots since the original path has been generated by a global path planner, and the original path is assumed to be already optimal.

#### b. Number of Bézier curves

a. Definition of the trajectory using a Bézier curve

Figure 2. Deformation of a Bézier trajectory through a field of vectors.

t∈ t0,tf

order curves are used.

136 Advanced Path Planning for Mobile Entities

A Bézier curve has a non-dimensional intrinsic parameter, u, as defined in (5). Since the Bézier curve represents the path of the robot, the intrinsic parameter must be defined as a temporal variable so that the position of each curve (robot position) is associated with an instant of time

 , where t<sup>0</sup> and t<sup>f</sup> represent the initial and final times of the trajectory, respectively. The definition of the initial Bézier trajectory is (13), where n is the order, Pi are the control points and Bi,nð Þt are the Bernstein bases defined in (14). To avoid loops in the Bézier curve, second-

The initial Bézier trajectory will be deformed in order to avoid the surrounding obstacles, by modifying the position of the control points from the initial position to the new one imposed by the PFP obstacle avoidance algorithm. The displacement of each control point Piis denoted as εi, so that the vector ε ¼ ½ � ε0; ⋯; ε<sup>n</sup> is the displacement of all the control points defining the Bézier trajectory, also known as the perturbation vector of the deformed curve. The new modified Bézier trajectory Sεð Þ αð Þt is defined in (15) and, consequently, the optimizing function

used to solve the problem is defined as (16), where the vector ε is computed as in [49].

ð13Þ

ð14Þ

ð15Þ

ð16Þ

High order Bézier curves are numerically unstable and, for that reason, in order to generate a complete Bézier trajectory the concatenation of k curves is required. Therefore, the optimization function (16) is replaced by (17), where 1 ≤ l ≤ k, α<sup>l</sup> is every Bézier trajectory (l), Sεð Þ α<sup>l</sup> is the modified Bézier trajectory, t ð Þl <sup>0</sup> ; t ð Þl f h i are the initial and end instants of the Bézier trajectory ð Þ<sup>l</sup> , and εð Þ<sup>l</sup> is the perturbation vector of the modified curve (l).

$$\int f\left(\varepsilon\right) = \min\_{\varepsilon^{(0)} \cdots \varepsilon^{(k)}} \sum\_{l=1}^{k} \int\_{\tau\_0^{(l)}}^{\tau\_{\prime}^{(l)}} \left\| S\_{\varepsilon} \left(\alpha\_l\left(t\right)\right) - \alpha\_l\left(t\right) \right\|\_{2}^{2} dt \tag{17}$$

The number of repulsive forces depends on the order of the Bézier trajectory: nð Þ<sup>l</sup> � 1.


$$\log\_l = \sum\_{l=1}^{k} \sum\_{j=1}^{\eta} \left\langle \mathcal{A}\_r T\_j^{(l)} - S\_s \left( \alpha\_l \left( t\_j^{(l)} \right) \right) \right\rangle \tag{18}$$

ii. The robot trajectory must be smooth: this constraint implies imposing continuity and derivability in the joint points of two curves, expressed by Eq. (19).

$$\begin{aligned} \mathbf{g}\_2 &= \sum\_{l=1}^{k-1} \left< \boldsymbol{\lambda}, \mathbf{S}\_{\boldsymbol{\sigma}} \left( \alpha\_l \left( \boldsymbol{\epsilon}\_f^{(l)} \right) \right) - \mathbf{S}\_{\boldsymbol{\sigma}} \left( \alpha\_l \left( \boldsymbol{\epsilon}\_0^{(l+1)} \right) \right) \right> \\ \mathbf{g}\_3 &= \sum\_{l=1}^{k-1} \left< \boldsymbol{\lambda}, \mathbf{S}\_{\boldsymbol{\sigma}} \left( \alpha\_l \left( \boldsymbol{\epsilon}\_f^{(l)} \right) \right) - \mathbf{S}\_{\boldsymbol{\sigma}} \left( \alpha\_l \cdot \left( \boldsymbol{\epsilon}\_0^{(l+1)} \right) \right) \right> \end{aligned} \tag{19}$$

iii. Continuity between the present and future positions must be ensured: tangency must be maintained between the original Bézier trajectory and the deformed Bézier trajectory at the initial and end points of the trajectory. The equation is (20).

$$\mathbf{g}\_{4} = \left< \boldsymbol{\lambda}, \boldsymbol{\alpha}\_{1}^{\prime} \left( \boldsymbol{\ell}\_{0}^{(\cdot)} \right) - \boldsymbol{S}\_{\varepsilon} \left( \boldsymbol{\alpha}\_{1}^{\prime} \left( \boldsymbol{\ell}\_{0}^{(\cdot)} \right) \right) + \left< \boldsymbol{\lambda}, \boldsymbol{\alpha}\_{k}^{\prime} \left( \boldsymbol{\ell}\_{f}^{(\cdot)} \right) - \boldsymbol{S}\_{\varepsilon} \left( \boldsymbol{\alpha}\_{k}^{\prime} \left( \boldsymbol{\ell}\_{f}^{(\cdot)} \right) \right) \right> \tag{20}$$

With the objective function and the constraints, the Lagrangian function (21) is defined. In order to calculate the stationary points, the partial derivatives of the Lagrangian function are calculated and canceled, and a system of linear equations is obtained. The solution of this linear system is the perturbation vector of each control point in order to obtain the Bézier trajectory. In-depth information about the linear system obtained is described in [48].

$$L\left(\varepsilon,\lambda\_{\gamma}\right) = f\left(\varepsilon\right) - \mathbf{g}\_{\parallel} - \mathbf{g}\_{\perp} - \mathbf{g}\_{\lambda} - \mathbf{g}\_{\star} \tag{21}$$

In Figure 3(a), an example is shown, where a straight line represents the predicted optimal trajectory for a mobile robot obtained with the PFP algorithm. The control points needed to obtain the Bézier curves are displayed with red circles. The repulsive forces are placed in the proper positions of the predicted path. In this graphic example, there are eight points in the prediction horizon, and consequently, eight Bézier curves are concatenated in a straight line. The time devoted to perform trajectory is defined by the PFP prediction and has to be of 14 seconds. The time intervals corresponding to each curve, respectively, are [0,1.33], [1.33,3], [3,5], [5,7], [7,9], [9,11], [11,12.66], [12.66,14]. The representation of the resampling for the

Figure 3. (a) Control points and future predictions of Bézier trajectory and (b) deformation of eight concatenated Bézier

Path Planning Based on Parametric Curves http://dx.doi.org/10.5772/intechopen.72574 139

This chapter details a comprehensive study of the use of parametric curves in the design of trajectories for holonomic and non-holonomic mobile robots. First, a brief introduction of the mathematical formulation and properties of the different curves is presented. Second, an exhaustive revision of literature regarding the use of parametric curves in path planning for mobile robots is developed. Third, a detailed description of the available techniques for path planning with parametric curves is presented, thoroughly describing the most important ones. Finally, an in-depth comparison is carried out between the different techniques of path deformation using Bézier curves, with their advantages and drawbacks. The Bézier curves are extensively used in these applications due to the simplicity of its definition and its easy handling and manipulation. The last section describes how to merge artificial potential field methods with Bézier curves as a solution for modifying a predefined trajectory in real time. Future works are related to the inclusion of other parametric curves, such as B-splines, RBC,

concatenation of eight Bézier curves is represented in Figure 3(b).

5. Conclusion

curves.

and NURBS, in the proposed algorithm.
