# Research on Trajectory Planning and Tracking Methods for Coal Mine Mobile Robots
## 2 Trajectory Planning Based on MINCO Trajectory Classes
### Trajectory Planning Based on MINCO Trajectories and Safe Corridors
#### 2.2.2 Safe Corridor Generation  
With the voxel map and obstacle constraints, it is necessary to plan a safe trajectory for the robot from the initial point to the goal point based on which safety is ensured by generating a safe corridor. The safe corridor is a collection of convex polyhedra which form a continuous closed region separating the obstacles, which can be used for avoiding obstacles as long as the robot walks within the corridor. The method is to use the RRT* path-planning algorithm to quickly obtain a suitable path in the voxel map, and then generate the safe corridor based on the path and environmental obstacle information. The process is divided into the following four parts:  
* Finding ellipsoids  
Take a section of the intermediate path determined by any neighboring path points in the whole path as an example. The path is denoted as \(L\). With the path length of \(L\) as the diameter, the midpoint for the center of the sphere can be obtained as a sphere. Then, \(L\) as a three-dimensional space of a coordinate axis is unchanged, and the contraction of the other two axes ultimately obtains a collision-free maximal ellipsoid. The contraction process in a two-dimensional plane is shown in Figure 3, in which the red line segment is the middle section of the path. obtained. Cycling this process will eventually result in a convex polyhedron with multiple intersecting facets. The space within the convex polyhedron, i.e., the obstacle-free confined space, is depicted in a two-dimensional form whose process is shown in Figure 4, where the yellow region is the passable region. One drawback of this approach is that when a certain plane is missing in order for the intersection of passable spaces to be a closed space and there are no obstacles in this direction, it may require the ellipsoid to expand to a very large size in order to find the point of intersection, or the computation may crash due to the fact that it is never found. The set of polyhedra for multiple paths is shown in Figure 5. This problem will be addressed in the next step. The problem from the previous step can be solved by setting a bounding box. It is equivalent to setting a boundary for the expansion of the ellipsoid. When the boundary is reached in a certain direction before an obstacle is encountered, then the boundary is used as the plane separating the obstacles. This reduces the computation time, and although a lot of passable space may be lost as a result, the fact is that space that is too far from the desired path does not have much practical significance on its own. So, a lot of unnecessary computation is eliminated by setting the bounding box. The effect of setting the bounding box is shown in Figure 6. The length of the short side of the bounding box is the diameter of the circle, the length of the long side is the length of the path plus the diameter of the circle, and the size of the bounding box is determined by defining the diameter of the circle artificially. A two-dimensional diagram of the polyhedral ensemble after determining the bounding box is shown in Figure 7.  
Shrunk  
Since it is not possible to treat the robot as a mass in practice, but it is generally necessary to treat the robot as a mass for planning purposes, the resulting convex polyhedral set needs to be shrunk according to the dimensions of the robot. In this way, in the safe corridor formed by the shrunken set of convex polyhedra, the robot can be treated as a mass for planning guaranteed safety. The contracted safe corridor is shown in Figure 8.  
Figure 4: Process of finding polyhedron. Figure 5: Polyhedron set.