## 5 Motion Planner  
In the research under consideration, a planner based on the elastic band approach is used to generate the reference trajectory from waypoints. It is worth mentioning that this algorithm offers much broader capabilities, such as path planning in the presence of obstacles. In the following, we describe the method for optimizing the trajectory within the overall planning task. Certain dependencies will be rewritten in a form that corresponds to the representation of the system (1). As the time elastic band algorithm is presented in the discrete domain in paper [30], this section follows the same approach.  
Let us define the reference state in discrete time \(x_{r}(k)=[x_{r1}(k)\;x_{r2}(k)\;x_{r3}(k)]^{T}=[x_{r\ell}(k)\;y_{r\ell}(k)\; \theta_{r\ell}(k)]^{T}\in\mathcal{X}_{r}\subseteq\mathbb{R}^{3}\  
of the reference trajectory \(x_{r}\) must correspond to the solution of the dynamics (12), it must also correspond to these requirements. However, for simplicity, we will assume that the evolution of the reference trajectory will be restricted by _vfs_\(X_{1}\) and \(X_{2}\) without using _of_\(X_{3}\). This is a narrowing of the requirement for \(x_{r}\) evolution, which is due to the practicalities involved in determining a convenient trajectory for the movement of mobile robots. There are many well-known ways to achieve this goal. In the paper [30], it was proposed that the constraints associated with robot kinematics would be introduced by a function that relates the local angle of the robot's orientation with respect to the vector connecting the two selected consecutive states of robot \(x_{r}(k)\) and \(x_{r}(k+1)\). We define the vector connecting these points as the reduced increment of \(x_{r}(k)\) in the form:  
\[\Delta x_{r}(k)=[x_{r1}(k+1)-x_{r1}(k)\ x_{r2}(k+1)-x_{r2}(k)\ 0]^{T}. \tag{15}\]  
The points \(x_{r}(k)\) and \(x_{r}(k+1)\) are assumed to be in a common arc. Following [30], we define the constraint equation associated with the robot's kinematics as follows:  
\[h(x_{r}(k+1),x_{r}(k)):=[X_{1}(x_{r3}(k))+X_{1}(x_{r3}(k))]\times\Delta\bar{x} _{r}(k), \tag{16}\]  
where \(X_{1}\) is defined by (2) and '\(\times\)' denotes the cross product in \(\mathbb{R}^{3}\).  
According to [30], the optimization task can be specified by:  
\[V^{*}(b):=\min_{b}\sum_{k=1}^{n-1}(\Delta T(\hat{k}))^{2}, \tag{17}\]  
subject to initial and final constraints  
\[x_{r}(1)=x_{r0},\ x_{r}(j)=x_{rf},\]  
and subject to the following algebraic constraints  
\[h(x_{r}(k+1),x_{r}(k))=0,\] \[r(x_{r}(k+1),x_{r}(k))\geq 0,\] \[v(x_{r}(k+1),x_{r}(k),\Delta T(\hat{k}))\geq 0,\] \[a(x_{r}(k+2),x_{r}(k+1),x_{r}(k),\Delta T(\hat{k}+1),\Delta T( \hat{k}))\geq 0,\] \[a(x_{r}(2),x_{r}(1),\Delta T(1))\geq 0,\] \[a(x_{r}(j),x_{r}(j-1),\Delta T(j-1))\geq 0,\]  
where \(b\) is given by (14) and \(\Delta T(k)>0\), \(\hat{k}=2,3,\ldots,j-2\). The inequality \(r(\cdot)\geq 0\) relates to the steering angle constraint, which is of a strong practical importance for real-world implementations of this algorithm. In addition, \(v(\cdot)\geq 0\) and \(a(\cdot)\geq 0\) describe the constraints imposed on the robot speed and acceleration, respectively, which are important in real-time operations. Detailed considerations of these constraint functions are not presented here, and the reader interested in the details is referred to the articles [26,30].