# Global Time-Varying Path Planning Method Based on Tunable Bezier Curves
## 4 Dynamic Path under the Multi-Obstacle Environment  
Section 3 introduces the process of generating feature points of obstacles, feature points of curves and Bezier curves with the help of pseudo-code for a single dynamic obstacle. In this section, how to plan paths for multiple obstacles in real time is described, as shown in Figure 6.  
Step 1: Input the initial data and the model of the moving object: the position \(x_{\rm start}\) and direction \(d_{\rm start}\) of the start point, the position \(x_{\rm end}\) and the direction \(d_{\rm end}\) of the end point and the model of the snake manipulator.  
Step 2: Obtain real-time shape position information for each obstacle: Obs_Information_j.  
Step 3: Find the center point \(O_{j\_0}\) of each obstacle.  
Step 4: Extract the surface feature point \(E_{j\_i}\) that characterize the information of each obstacle and find the fuzzy center \(C_{j}\) of each obstacle through Equation (27).  
\[C_{j}=\sum_{i=1}^{w}E_{j\_j}/w \tag{27}\]where \(j\) is the number of obstacles and \(w\) is the number of obstacle feature points.  
Step 5: The magnified surface \(K_{j,i}\) of obstacle is obtained by Equation (28) according to the scale factor \(k\), magnification center point \(O_{j,0}\) and surface feature point \(E_{j,i}\).  
\[K_{j,i}=k\cdot E_{j,i}-O_{j,0} \tag{28}\]  
The \(j\)th obstacle can generate a set \(K_{j}\) from which the main feature points are filtered to obtain the feature points of the Bezier curve.  
In this method, it is not necessary to analyze the feature points that are far away from the obstacle and it is not necessary to consider multiple adjacent feature points repeatedly.  
Step 6: According to the feature points of the curve and the principle described in Section 3.6, a smooth transition Bezier curve can be generated.  
Step 7: The motion path corresponding to each time is output, so that the moving object can achieve dynamic obstacle avoidance when moving along the path.  
According to the above steps, the obstacle avoidance curve generated at a certain moment can be obtained when moving in a multi-obstacle environment, as shown in Figure 7. The figure includes L-shaped obstacles, rectangular obstacles, triangular obstacles, circular  
Figure 6: Flowchart of real-time trajectory generation in a multi-obstacle environment.  
obstacles and pentagram obstacles. These five obstacles move along the path represented by Equations (29)-(33) and these five motion paths are plotted by curves in Figure 7. The different colored asterisks * in the figure correspond to the feature points of each obstacle. When these five obstacles move, the Bezier curve is generated in real time by this method to ensure that the moving objects do not collide with the obstacles.  
\[\left\{\begin{array}{l}x_{\text{circle}}/50=9\sin(\pi t/200)+5\\ y_{\text{circle}}/50=-10\cos(\pi t/200)-2\end{array}\right. \tag{29}\]  
\[\left\{\begin{array}{l}x_{\text{rectangle}}/200=\sin(\pi t/50)+5\\ y_{\text{rectangle}}/200=\cos(\pi t/200)+\cos(\pi t/50)+1\end{array}\right. \tag{30}\]  
\[\left\{\begin{array}{l}x_{\text{triangle}}/50=t/100+30\\ y_{\text{triangle}}/50=-t/10+13\end{array}\right. \tag{31}\]  
\[\left\{\begin{array}{l}x_{\text{star}}/50=-t/10+35\\ y_{\text{star}}/50=3t/20-18\end{array}\right. \tag{32}\]  
\[\left\{\begin{array}{l}x_{\text{L}}/50=\sin(\pi t/30)+5\\ y_{\text{L}}/50=-t/10+11\end{array}\right. \tag{33}\]  
When the five obstacles move in real time, feature points of obstacles, feature points of curves and Bezier curves are generated in real time through the GTVP method.