RCD: Radial Cell Decomposition Algorithm for Mobile Robot Path Planning

Finding the optimum path for mobile robots is now an essential task as lots of autonomous mobile robots are widely used in factories, hospitals, farms, etc. Many path planning algorithms have been developed to finding the optimum path with the minimum processing time. The vertical cell decomposition algorithm (VCD) is one of the popular path planning algorithms. It is able to find a path in a very short time. In this paper, we present a new algorithm, called the Radial cell decomposition (RCD) algorithm, which can generate shorter paths and a slightly faster than VCD algorithm. Furthermore, the VCD algorithm cannot be applied directly to obstacles in special cases, like two vertices have the same x-coordinate; on the other hand, the RCD algorithm can be applied to these special cases directly. In addition to that, the RCD algorithm is very suitable for corridor environments, unlike the VCD algorithm. In this paper, the RCD algorithm is described and tested for both cluttered and corridor environments. Furthermore, Two different algorithms A*, and Vertical cell decomposition are compared to the RCD algorithm. Simulation results confirm the effectiveness of the RCD algorithm in terms of path length and processing time.


I. INTRODUCTION
Robots in the industry are evolving quickly from large manually controlled machines to small autonomous mobile robots [1]. Fast performance, high accuracy, flexibility, and safety of autonomous mobile robots led to the proliferation in agriculture [2], medical [3], and industrial applications [4]. Finding the optimal path between two points in an uncontrolled environment is a substantial task that autonomous mobile robots should be able to do [5]. After finding the optimal path, mobile robots can save time and effort by moving heavyweights from one place to another easily and safely without human intervention [6]. The environment around the robot can be static [7] if all obstacles are fixed in place or dynamic if some obstacles are moving or changing their place [8]. For known environments, the map is created before the process of planning a path. Although for unknown environments, the map is built gradually while the robot discovering the environment [9]. A massive number of applications of path planning have motivated researchers to develop different The associate editor coordinating the review of this manuscript and approving it for publication was Heng Wang . types of methods and algorithms in this field [10]. Most of these methods are trying to find the shortest path [11] from a start location to a destination/ goal position. Although, some research is focusing on finding the safest path [12], while others are focusing on reducing the computational time [13]. Classification of path planning algorithms is based on the algorithm itself and the environment [14]. Some path planning methods are global while others are local [15]. Global methods, also called off-line methods, are considering the entire work-space before the path planning process; while local methods, also called online methods, are considering a small area around the robot [16]. A complete method [17] is a method that guarantees to find a path between two points if one exists, while an incomplete method [18] does not guarantee to find a path even if one exists.
Path planning methods are classified into three main methods [19]; potential fields, sampling-based, and combinatorial methods As shown in Figure1. Potential field path planning is inspired by nature by considering the robot as a charged particle moving in a magnetic field [20]. The robot must be attracted by the goal and repelled by obstacles. The potential function is the sum of an attractive potential attracting the robot towards the goal and a repulsive potential pushing the robot away from obstacles [21]. One main disadvantage of potential fields is the local minimum trap. However some researchers have overcome this issue by using an optimization based approaches as in [22]. Two important advantages of potential fields are the low calculation cost and the ability to be used with both local and global path planning.
Sampling-based path planning algorithms convert the continuous map into a discrete map consists of a set of nodes that is created randomly and roads that connecting nodes in a certain way [23]. A collision detection function [24] is used to ensure that all nodes and roads are in free space then, a graph search algorithm is used to find the shortest path between any two nodes [25]. Probabilistic Roadmaps, PRM, [26] is a well-known algorithm that randomly creates a predetermined number of nodes. Then, it tries to connect each node to the nearest node or all nodes less than a predetermined distance. Finally, after the roadmap is created, the start and goal configurations are added to the roadmap and a graph search algorithm is used to find the shortest path from a start position to a goal position [27]. This algorithm is helpful in the case of a multi-query problem, where multiple goal positions are required to be added to the [28]. In the case of a single query problem, it is wasteful to create a map that covers the entire free space. Another familiar algorithm is used in single query problems is the Rapidly Exploring Random Trees, RRT, algorithm [29]. This algorithm considers the start and goal positions in the sampling process. A tree rooted at the start position is created where each new node is connected to the closest node within a predetermined distance k. The algorithm continues to add nodes to the tree until it reaches the goal position [30]. Sampling-based methods are more efficient in practical problems and higher dimension configuration spaces, C spaces , [31]. They are probabilistically complete methods, but their performance is low in narrow passages and they are not suitable for dynamic environments [32].
Combinatorial methods, Grid-based methods, [25] are complete and exact algorithms [33] that find a path without approximation. These algorithms encode the topology of the robot's free space globally using some structures while describing the geometry of the free space locally [34]. An important advantage of these methods is that they provide an upper limit on the time needed to solve the problem [35]. First, the free space is decomposed into a finite number of cells. Second, an adjacency graph is created by determining which cells are adjacent. Finally, a graph search algorithm is used to find the shortest path connecting start and goal positions [36]. A* and Dijkstra [37] algorithms are two examples of grid-based methods that divide the free space into a set of cells of equal size, i.e., grids. Each cell is represented as a node in the adjacency graph and the distance between every two nodes is the weight of the edge connecting them [38]. A robot can move only in a lattice around the current cell. The more the number of cells, the more the computation time and the better the resulting path [39]. For large environments, this decomposition results in a huge number of cells which results in a better and shorter path but a slower algorithm [40]. The large number of nodes need very long time to be processed which make these algorithms not suitable for practical problems. Instead of dividing the free space into equal cells, cell decomposition methods divide the free space into a small number of cells which decreases the computation time [41]. Lower computation time and faster execution of the algorithm are two advantages of cell decomposition methods over grid-based methods [42]. Triangulation and vertical cell decomposition are two popular cell decomposition methods [43]. Triangulation is done by first triangulate the free space into a set of 2-simplicial, triangles, then create the adjacency graph by representing each triangle with a node and connect every two adjacent cells by an edge in the graph [44]. This algorithm is complete, but it is complicated to use in practice due to its computational complexity. Vertical cell decomposition depends on the plan sweep algorithm from computational geometry [45]. By partitioning the free space, C free , into a finite number of 2-cells and 1-cells which are either trapezoidal or triangular. Each 1-cell is a vertical line that represents the border between every two 2-cells and each 2-cell is the interior of the trapezoid or the triangle [46]. A topological graph [47], i.e., a roadmap, representing adjacency relations between cells is built from cell decomposition. Two 2-cells are adjacent if they are sharing the same 1-cell in between. Nodes in the graph represent the 2-cells while edges represent the adjacency relations between cells [48]. edges are weighted with Euclidean distance between nodes. Once the Graph is built correctly, two nodes representing the start and goal positions are added to the graph and a graph search algorithm is used to find the shortest path from start to goal across the graph [49]. This algorithm is suitable for large environments, but it does not result in the shortest path if compared to algorithms like A* and Dijkstra. Vertical cell decomposition uses the line sweep algorithm which requires all obstacles to be in general positions, where no obstacle has vertical edges and all vertices have distinct X-coordinate, [35], [50], [51]. Special cases are ignored in cell decomposition planning by performing random perturbations in some random direction. Performing random perturbations can be very frustrating in practice because most of the implementation time is devoted to fixing such special cases which unnecessarily complicate the solution [35], [50].
In this paper, a new cell decomposition algorithm, Radial Cell Decomposition (RCD), is introduced. RCD algorithm is applied directly to environments that have some obstacles in special cases, have some vertical edges or two points with the same x-coordinate, without the need to convert them to general positions. This saves the time of changing special cases back into general positions and reducing the complexity of cell decomposition algorithms. According to that, the RCD algorithm makes it easier to find a path throw corridor environments than using other cell decomposition algorithms since corridor maps have a lot of vertical edges. The remaining sections of the paper are organized as follows: Section II presents a detailed explanation of the proposed algorithm, RCD algorithm, together with the pseudocode of the algorithm. Section 3 shows examples and simulations of three different algorithms while results of simulations and comparisons are presented in section 4. Finally, conclusions and some remarks are given in section 5.

II. MATERIAL AND METHOD
Radial Cell Decomposition is a cell decomposition method that uses the concept of partitioning the free space into a set of cells. A 2D bounded map W ⊂ R 2 is used to represent the environment. W includes a set of static polygonal obstacles and a robot A represented as a point, located initially at start position q s and assumed to move to a goal position q g . The set of vertices used to represent obstacles configuration C obs Finding a path using RCD algorithm is done throw the following steps which shown in Figure 2: 1) First, computing the decomposition itself, i.e., dividing the free space into a set of bounded cells C = {c 1 , c 2 , . . . , c j } where j is the cardinality of set C as shown in Figure 2a. 2) Second, building the adjacency graph G that represents C free and all feasible paths the robot can traverse as shown in Figure 2b. 3) Third, applying A* algorithm on graph G to find the shortest path between any two nodes as shown in Figure 2c.
Radial cell decomposition (RCD) decomposes the free space into a set of cells C shaped like part of a disk by drawing arches at obstacle vertices. The algorithm first selects the most left vertex from boundaries polygon to be the center node c c , center of all developed arches, then, it sorts all polygon vertices V by their distance from c c . For each vertex v ∈ V try to extend two arches cw and ccw throw C free until C obs is hit. Each arch extends from vertex v until it hits the first obstacle above or under it. As shown in Figure 3, four possible cases are depending on the possibility of extending an arch in each direction: • Case1: two arches CW and CCW are extended from v.   Figure 4b. Edges in the graph represents the adjacency relations between the free cells. A path is then computed by searching the graph for the Consecutive nodes that will connect start node to goal. An example of the resulted path is shown in Figure 4.
After decomposition is correctly maintained, an adjacency graph G is built, as shown in Figure 4b, to solve different path planning queries. Each free cell is represented by a node in the adjacency graph. Two nodes are connected by a road if they are adjacent. Start and goal positions are then connected to the graph. Finally, the adjacency graph is searched for the best route from start to goal using a graph search algorithm like A* algorithm. The computed path shown in Figure 4a is the set of Consecutive nodes that connect start node to goal node which represented in Figure 4b by pink nodes.

A. COMPUTING DECOMPOSITIONS
As mentioned in section II, computing decompositions is the first stage in the problem of finding a path by cell decomposition methods. The input to the algorithm is the boundary description of boundary polygon and obstacles O.
In order to collect these information, a camera is installed above the environment to take images of the environment. Using image processing technique images can be analyzed to extract the desired information. The coordinates of boundary polygon and obstacles are extracted. The output is the set of decomposed cells stored in list CC. The following is the detailed explanation of Computing decompositions stage. 1) Given the map of the surroundings, the most left vertex of boundaries polygon is defined as the center node c c . 2) Information of all polygons in the map is extracted by image processing. These information is then stored in two excel sheets that will be used as inputs to the algorithm. The first excel sheet, named ''vertices'', contains the ID of each vertex, its coordinates, and the euclidean distance to c c . The second excel sheet, named ''obstacle edges'', contains the ID of each edge, the IDs of its endpoints, and the equation of this edge. 3) Sort the set of all vertices V by their distance from center node c c , this step can take O(n logn) time [52]. 4) Loop over the sorted list V , each visit to a vertex v ∈ V is an event, at each event three main actions happen: • An arch A centered at node c c passing through v and extending until it hits the first obstacle in both directions is created.
• A list L of some C obs edges that intersects with A is updated. By maintaining L in a balanced binary search tree, updating L at each event will need O (logn) time instead of O (n) for insertion and deletion of edges [53].
• According to the fact that arch A is dividing the free space into smaller cells, a list of closed cells CC, which are the cells that are fully discovered, is updated. Also, a list of opened cells OC is updated. This list contains the cells that are opened and created by A but will be completed and closed by another arch in a future event. Some vertices of the current obstacle lie outside C im as shown in Figure 10. Close one cell with e upper and e lower , add it list CC, and remove it from list OC. The closed list CC is the set of decomposed cells that are used for building the adjacency graph. If the decomposition was applied correctly, list CC should contain all decomposed cells while OC should be empty at the last vertex in V .

B. BUILDING ADJACENCY GRAPH
The adjacency graph is built using list CC, after the decomposition of the space is completed. This is done by looping over cells in list CC. In this case an extra O(n) time will be needed. A better approach, that saves time [35], is incrementally building G at each visit to v ∈ V while decomposing the free space. Each free cell c i is represented in G by a node q i which can be any point such that q i ∈ c i . These nodes can be cells centroids or a point near to the centroid. Each node, i.e., cell c i is connected by an edge to its neighbor nodes N (c i ) ⊂ C, There are two approaches to represent the decomposition in a graph G. One simple way is to represent each 1-cell, arch, by a node located at its center. An edge will connect two nodes if both nodes belong to a different border of the same 2-cell c i . This representation of G is shown in Figure 11a. Another way is to represent each 2-cell by a node located near to its centroid and each 1-cell by a node located at its center then connect the node representing the 2-cell by nodes in its boundaries, i.e., 1-cells, this representation is shown in Figure 11b. Note that the first representation reduces the number of nodes in G which reduces the time needed by the A* algorithm to find the shortest path from G. The number of nodes and roads resulted from the second representation are larger, but it solves the problem of discontinuity of the  roadmap with corridor environments. It is very effective with corridor environments as shown in section IV. Once G is correctly built, the A* algorithm can be applied to find the shortest path throw nodes and edges in G.

C. FINDING THE PATH
Once G is correctly obtained, a query (q s , q g ) can be solved directly by any graph search algorithms like the A* algorithm [54]. The two cells containing q s and q g are first determined. Let C 0 denote the free cell that contains q s and q 0   denote the node represents C 0 in G. Likewise, let C k denote the free cell that contains q g and q 0 denote the node represents C k in G. After connecting (q s to q 0 ) and (q g to q k ), the graph G is searched for the shortest path between q s and q g . The resulting path is the sequence of nodes q 0 , q 1 , . . . q k that are visited by the robot while traveling from point q s to point q g as shown in Figure 12. If no path was found, the algorithm will return that no solution exists. A flowchart shown in Figure 13 shows the main steps of the RCD algorithm.

D. ANALYSIS OF RCD ALGORITHM
Starting with n polygonal vertices and n polygonal edges, the time needed by RCD algorithm is O(nlogn). We will analyze the time taken by each step of the algorithm in terms of n.
• Sorting all polygonal vertices by their distance to center node C c will take O(nlogn) using quicksort algorithm [55].
• Extending O(n) arches CW and CCW is done by finding the intersecting edges. By maintaining edges stored in a binary search tree L, insertion and deletion of an edge will take O(logn) time. So the time needed for this step is O(nlogn) for all vertices.
• Building the adjacency graph takes O(n) time as the number of cells and edges in adjacency graph is O(n) FIGURE 11. Two different representations of the same cell, a) represent each 1-cell by a node located at its center, b) represents each 2-cell by a node located near to its centroid, and each 1-cell by a node at its center. • A* algorithm takes O(nlogn) time [56] to find the shortest path from the adjacency graph.

III. SIMULATION
Two different environments, cluttered and corridors, are used for simulating RCD algorithm together with the classical A* and Vertical Cell Decomposition. Each environment was tested for series of different queries, start and goal positions, via MATLAB. For each query, a comparison between the three algorithms is based on the length of the path and the processing time needed. For simplification, a robot A is assumed to be a point in a 2D bounded workspace W that includes some stationary polygonal obstacles O. Robot A is initially located at start position q s and should move to goal position q g while avoiding colliding with obstacles. The input to the first algorithm, classical A*, is the binary image of the map where obstacles are represented as 1 and free space as 0. The entire map is discretized into a grid of 100 × 100 nodes and the robot can move diagonally. At each node x ∈ X , A* calculates f (x) for all neighbor nodes to find the node with the best route,i.e., lowest f (x) that is calculated in (1).
(1) VOLUME 9, 2021 where g (x) denotes the distance from the start node to current node x and the heuristic function h (x) is the Euclidean distance from current node x to the goal node. The output of the algorithm is the length of the path and the time needed by the algorithm to find the best route. Vertical cell decomposition and RCD are decomposing the workspace into a set of cells, i.e., nodes, then create an adjacency graph G. In some cases, some edges from the generated graph G pass very near to C obs which may occur in a collision with obstacles. According to that, obstacles are enlarged by a constant distance to ensure generating a safer path as shown in Figure 14. After enlarging obstacles, the new C obs map is used by the algorithm to find the shortest path. Input is the description of vertices and edges of boundary polygon and obstacles. The output is the sequence of nodes q 0 , q 1 , . . . q k that forms the shortest path from G that connects q s to q g . The resulted path is now guaranteed to be a safe path.

IV. RESULTS AND DISCUSSION
This section compares the Classical A*, Vertical cell decomposition, and RCD decomposition through cluttered and corridor environments in terms of path length and execution time. In all figures, the start configuration is represented as a green star while the goal configuration is represented as a red star, and the resulted path is plotted in blue.

A. CLUTTERED ENVIRONMENTS
In this environment, a set of polygonal obstacles are located randomly in a bounded polygonal environment. Figure 15 shows the computed path of the three algorithms for the same cluttered environment. For VCD and RCD algorithms the roadmap resulted from cell decomposition is colored in pink.
The computed path is colored in blue in the three algorithms. Table 1 shows a comparison between the three algorithms depending on two factors, the length of the resulted route and the processing time. Each case was run 10 times and the average processing time was recorded. As noticed in table1, A* algorithm produces the shortest path but it is very slow if compared to RCD and VCD algorithms. This ability to save processing time is and advantage of cell decomposition methods over grid-based methods. Also, the processing time of A* algorithm is increasing rapidly with the distance between start and goal positions As the number of processed nodes are increasing. On the contrary, the time taken by VCD and RCD algorithms is nearly constant for different queries as the number of nodes are constant. Note that, the number of processed nodes in A* algorithm depends on the size of the map and the resolution of grids. For VCD and RCD algorithms, the number of nodes in a map depends on the number of vertices of obstacles. As shown in table 1, paths generated by RCD algorithm are always shorter than paths generated by VCD algorithm while the processing time of RCD is slightly less than the processing time of VCD. This emphasizes the effectiveness of RCD algorithm in generating shorter paths if compared to VCD algorithm.

TABLE 1.
A cluttered terrain is used to compare between A*, VCD and RCD algorithm in terms of path length and processing time.
As shown in Figure17, four different terrains are used to compare between Vertical cell decomposition (VCD) and Radial cell decomposition (RCD) algorithms. The same start and goal configurations are used in all terrains. The roadmaps resulted from the decomposition of cell is shown in pink while the computed path is represented in blue. For both algorithms, the length of paths and processing time for each terrain in Figure17 are recorded in table 2. Table 2 shows the that the length of the paths generated by RCD algorithm are shorter than those generated by VCD algorithm as shown in the last column. These results proves that Radial decomposition of cells produces shorter paths if compared to vertical decomposition of cells.

B. CORRIDOR ENVIRONMENTS
For corridor environments, Classic A* and RCD algorithms were tested and compared. Vertical cell decomposition is ignored in this scenario since this environment has almost all its edges in a vertical position which will complicate the solution-special cases are ignored in VCD algorithm. On the other hand, RCD algorithm can be applied to corridor environments directly and a good path will be found. The ease of applying RCD algorithm to corridor environments is a great advantage for RCD algorithm over vertical cell decomposition algorithm. When applying RCD algorithm to corridor maps, the second representation of the adjacency graph, discussed in section II-B, will be used to avoid the discontinuity while building the adjacency graph which allows the algorithm to reach any configuration between corridors. Figure 18 shows the resulted path computed by Classical A* and Radial Cell Decomposition for the same corridor map and same start and goal positions. Table 3 compares between A* and RCD algorithm using different goal positions. The comparison is done in terms of path length and processing time for each algorithm. As shown in Table 3, the processing time of RCD algorithm is very short if compared to the processing time of A* algorithm. Also, the processing time of RCD algorithm is almost constant among different queries, while the processing time of A* algorithm depends on the distance between start and FIGURE 17. Four different cluttered terrains used to compare between the path resulted from VCD and RCD algorithms using same start and goal positions. goal configurations. Although A* algorithm produces shorter paths than RCD algorithm, it consumes processing time up to 6.5 times RCD algorithm. This makes RCD algorithm more suitable with time sensitive cases.

V. CONCLUSION AND FUTURE WORK
This paper proposed a new approach to cell decomposition. RCD algorithm first divides the environment into a set of free cells based on a set of arches drawn from the center point. After decomposition is done properly, an adjacency graph is created from free cells by two procedures; represent each arch by a node in its middle and connect every two nodes if they belong to the border of the same free cell. The second procedure, is by representing each free cell by a node located near to its centroid and each arch by a node in its middle then, connect each free cell node by nodes located in its borders. The resulted adjacency graph is then used by the A* algorithm to find the shortest path from a start position to a goal position.
RCD algorithm was tested and verified together with classical A* algorithm and Vertical cell decomposition in two different environments, cluttered and corridors. Results of cluttered environments showed that paths generated by the RCD algorithm are shorter than those generated by Vertical cell decomposition by 69.8% on average. Also, the computation time of the RCD algorithm is less than the computation time of Vertical cell decomposition by 10-30 ms. Also, results showed that the length of paths found by the classical A* algorithm are shorter than those found by the RCD algorithm by 11.35% on average. However, the computation time of the A* algorithm is up to 6.5 times the computation time of RCD algorithm. Furthermore, The computation time of A* is increasing rapidly as the distance between start and goal positions is increased while it is found to be nearly constant for RCD and Vertical cell decomposition algorithms.
The previous results confirm the advantage of the RCD algorithm over classical A* and Vertical cell decomposition algorithms in terms of computational time in both cluttered and corridor environments which makes it applicable and more effective with large environments. Also, results emphasize the advantage of the RCD algorithm over the Vertical cell decomposition algorithm in terms of both path length and computation time in a cluttered environment. Furthermore, the ease of applying RCD algorithm to obstacles in special case such as corridor environments is a great advantage of RCD algorithm over VCD algorithm.
As stated, RCD algorithm is applied to different static environments using an image of the environment. On the other hand, it is very important to apply the proposed algorithm with dynamic environments. In this case, several images will be taken at a rate that is appropriate to the changing rate of obstacles. As a future work, it is very interesting to verify the ability of implementing RCD algorithm in dynamic environments. Furthermore, refinement of paths generated by RCD algorithm is an interesting point to consider in future work.