# Global Time-Varying Path Planning Method Based on Tunable Bezier Curves
## 3 Transient Path under the Single-Obstacle Environment  
### Overall Process  
For moving obstacles with different shapes, it is necessary to plan the corresponding time-varying trajectory according to the real-time information of the obstacle, so that the manipulator can ensure that it does not collide with the obstacle and can also move from the starting point to the end point. In order to meet the above requirements, the global time-varying path planning (GTVP) method for dynamic obstacles is proposed in this paper. The pseudo-code for the main function in the method is shown in Algorithm 1.  
```
1:Input:\(x_{\text{start}}\), \(x_{\text{end}}\), \(d_{\text{start}}\), \(d_{\text{end}}\);
2:Obs_Information \(\leftarrow\) Get_obstacle(\(t\));
3:Central_Point \(\leftarrow\) Mid(Obs_Information, \(x_{\text{start}}\), \(x_{\text{end}}\));
4:Feature_Points \(\leftarrow\) Extract(Obs_Information, \(x_{\text{start}}\), \(x_{\text{end}}\));
5:Bezier_Points \(\leftarrow\) Amplify(Feature_Points, Central_Point, \(x_{\text{start}}\), \(x_{\text{end}}\), \(d_{\text{start}}\), \(d_{\text{end}}\));
6:Bezier_Curve \(\leftarrow\) Bezier_Function(Bezier_Points);
7:Output: Bezier_Curve;
```  
**Algorithm 1** The main function of the time-varying trajectory planning algorithm  
The whole process of the algorithm combined with the pseudo-code is explained as follows. First, input the initial data and the moving object model, including the position \(x_{\text{start}}\) and direction \(d_{\text{start}}\) of the start point, the position \(x_{\text{end}}\) and the direction \(d_{\text{end}}\) of the end point and the model of the snake manipulator (Step 1). Then, obtain the real-time shape and position information of the obstacle (Step 2) and find the center point \(O_{0}\), which is the preparation for the curve generation (Step 3). Extract feature points of the surface that represents the obstacle information and judge which side of the obstacle the moving object walks from (Step 4). Enlarge the surface of the obstacle according to the formulated scale coefficient and magnification center point and generate the feature points of the Bezier curve according to the specified law (Step 5). Next, generate the Bezier curve according to the characteristic point of the curve (Step 6). Finally, output the real-time Bezier curve (Step 7).  
The Bezier curve corresponding to each moment can be obtained through the above process. Next, the process and principle of the GTVP method are described in four examples shown in Figures 1-4. The direction of the \(x\)-axis is from the start point \(x_{\text{start}}\) to the end point \(x_{\text{end}}\) and the \(y\)-axis is perpendicular to the \(x\)-axis. The GTVP method is suitable for snake manipulators, redundant manipulators, continuous manipulators, mobile cars, mobile robots, remote control aircraft and other moving objects. In this paper, the process and principle of the GTVP method are described by taking the snake manipulator as an example. The details of each step are described in Sections 3.2-3.6.  
Figure 1: Bezier curve generated for rectangular obstacles.