Abstract
The Path-Planning problem is a basic issue in mobile robotics, in order to allow the robots to solve more complex tasks, for example, an exploration assignment in which the distance given by the planner is taken as a utility measure. Among the different proposed approaches, algorithms based on an exact cell decomposition of the environment are very popular. In this paper, we present a new algorithm for universal path planning in cell decomposition, using a raster scan method for computing the Exact Euclidean Distance Transform (EEDT) for each cell in the map. Our algorithm computes, for every cell in the map, the point sequence to the goal. For each sequence, the sub-goals are selected near to the vertices of the obstacles, reducing the total distance to the goal without post processing. At the end, we obtain a smooth path up to the goal without the need for post-processing. The paths are computed by visibility verification among the cells, exploiting the processing performed in the neighbouring cells.
1. Introduction
The path-planning problem is a fundamental challenge in mobile robotics. Applications include search and rescue, hazardous material handling, planetary exploration, etc. A specific application of path planning is exploration and mapping [1–3], where the planner is responsible for efficiently reaching the given objectives. The distance given by the planner to each goal is taken as a utility measure in some exploration algorithms; therefore it is necessary to have an algorithm that provides accurate distances towards the goal.
A good technique for path planning is the approach based on visibility graphs, which contain the start vertex, the goal vertex and the corners of all blocked cells [4]. A vertex is connected via a straight line to another vertex if there is a line-of-sight between the vertices, that is, the straight line does not pass through a blocked cell. The shortest paths on visibility graphs are also the shortest paths in the full environment. However, solving a path-planning problem with visibility graphs can be slow when considering complex environments.
The global path-planning problem can be defined as follows:
The classical methods for global path planning are variations of a few general approaches: roadmaps, cell decomposition, artificial potential fields and mathematical programming [7].
The problem of universal path planning can be defined as follows:
The principle of exact cell decomposition is to divide the environment
The Distance Transform algorithms (also called
This paper is organized as follows: Section 2 expounds previous work and explains the principle of distance transform algorithms. Section 3 outlines our approach to the path-planning problem and Section 4 presents numerical results that show the performance of our method. In Section 5 we present our conclusions and discussions for future research.
2. Related Work
The most popular algorithms for solving path-planning problems using cell decomposition of the environment are the A* search, artificial potential fields [12,13] and distance transform [14].
The distance transform algorithm was first used in image processing for describing the shape of blobs [15]. For the purpose of collision-free path planning, Jarvis [13] turned this procedure inside-out to propagate distances from goal points to fill all of the free space, flowing around the obstacles, using a raster scan method that may require multiple passes to guarantee total coverage in complex environments. The raster scan method uses a window for the neighbourhood operations, in order to minimize the current distance value to the cell at the centre of the window, by comparing it with the lowest value obtained from each neighbour cell plus the assigned value in the raster window.
The basic distance transform problem, in a two-dimensional configuration space, can be described as follows:
Given a binary grid Ω of
that represents the workspace of the robot, on which we can define a binary map
In the map, an occupied cell is represented as
In the Jarvis' distance transform algorithm, the distance array
Afterwards, a forward pass and a backwards pass are made through the map using a scan window. Each pass employs local neighbourhood operations in order to minimize the current distance value assigned to the pixel
Scan windows used by the distance transform
For example, let us consider a forward pass Euclidean window,
The forward pass window is moved through map
For an obstacle free map of
From the distance matrix obtained by the distance transform algorithm, we can find the optimal path for a given starting point by looking at its eight neighbour cells and moving to the cell with the lowest distance value. This process is repeated until there is no neighbour cell with a lower value than the current cell, i.e., the goal cell has been reached. Since the path is found by choosing locally only between neighbour cells, the obtained path can be sub optimal, as seen in Figure 2.

Sub optimal path obtained using Jarvis' approach, from s to g (top, in blue). The optimal path is shown in green.
In [16], Jarvis compares the distance transform algorithm with the A* algorithm [17] and the Rapidly-Exploring Random Trees (RRT) approach [18] and demonstrates that the distance transform method is a good and fast algorithm. However, the paths obtained in the distance transform algorithm typically consist of a large number of small steps between neighbouring free cells, with turning angles limited to multiples of
Lee [19] describes an algorithm to generate a smoother path by grouping the small steps into a smaller number of longer and straighter segments. The path-smoothing approach starts at the first cell of the path and examines subsequent cells one at a time in order to find the farther cell that can be reached directly from the start cell in a straight movement, while remaining within free space. This cell is thus marked as a sub goal. This process is repeated until the target cell is reached. This approach can obtain smooth paths. However, it does not guarantee obtaining the optimal path. Furthermore, if we need to obtain smooth paths for every cell in the map, we need to perform this post processing for every cell as well.
3. The Exact Euclidean Distance Transform algorithm
The core of our approach, called the
Two cells a and b are visible to each other if the straight line segment joining the centres of these cells lies only on free cells. With this proposal, it is possible to obtain a smooth path from any point on the map to the target cell, only by following the sequence of sub-goals from any initial cell to the goal.
The operating principle of the proposed algorithm is as follows: the initial values of the matrix of transformation distance
The sub-goal matrix
As in the Jarvis' algorithm, two raster sweeps are performed by applying a set of scan windows over the grid map. The scan windows used are shown in Figure 3. In the forward pass, scan window 1 is applied from left to right on each line, followed by the application of scan window 2 from right to left over the same line. During the backward pass, scan windows 3 and 4 are applied, line-by-line from right to left and from left to right, respectively.

Windows used in our the distance transform algorithm
For every cell

Distance computation when the sub-goal of the neighbouring cell is visible.

Distance computation when the sub-goal of the neighbouring cell is not visible.
After analysis of the neighbouring cells (determined by the scan window), if ∃
The scan sequences, forward and backward, stop when there are no further changes in the matrices
3.1 Visibility test
In order to assign a valid (visible) sub goal, we proceed in two steps. First, we chose the two neighbours closer to the line of vision we want to verify. If the same sub goal is assigned to the two neighbours, then both neighbours can “see” the sub goal and the line of vision between the actual cell

The same sub goal is assigned to the two neighbours

The sub goals of the two neighbours are different
In our approach, we build two matrices: the first one contains the Euclidean distance from each cell to the target (value
For an obstacle free environment of
4. Numerical results
We compared our EEDT algorithm with other distance transform algorithms proposed by Jarvis using different windows:

Maps used for the test.
4.1 Obtained paths
Figure 9 shows the comparative results of the obtained paths by applying the distance transformation algorithms. Figures 9(a), 9(b) and 9(c) show the paths obtained when using Jarvis' algorithm with the scan windows

Paths obtained for the “
Figures 9(d), 9(e) and 9(f) show the results obtained by applying the path-smoothing algorithm proposed by Lee [18], in which the angle displacement is not limited to multiples of
Observing Figure 9(g), we can see that the generated trajectories using our algorithm always select sub-goals near to the obstacles vertices. In addition, at every step of the way we know the position of the next sub-goal visible from the current position.
These results clearly show that our approach, by keeping track of the visible sub-goals with matrix
In concrete terms, our algorithm constructs a visibility map of the environment, as shown in Figure 10, where each sub-region has a visible goal for all points within that region. In Figure 10, an arrow indicates the best local sub-goal visible for each region.

Best local sub-goal for some maps. For each region (colour) the arrows point to the next sub-goal.
4.2 Distances evaluation
In order to compare the distances obtained by our algorithm against the various distance transform approaches, we compute the relative error between them. We used an obstacle-free environment where the wave front is generated from a single point in the centre of the map and we compute the root mean squared error (RMSE). Moreover, we test the accuracy in the environments shown in Figure 8, with the wave front generated from different points and we compute the RMSE and the worst error mean.
For an obstacle-free environment, the worst results are obtained by Jarvis' approach, however Jarvis' approach with post-processing give errors equal to zero, as in our approach (refer to the Appendix A). The result of a perfect distance transform should be circular. Figure 11 demonstrates that our approach and Jarvis' approach (with path smoothing) generate circular waves in obstacle-free environments, in which the grey scale of each cell is proportional to the distance to the target.

Resulting images for an obstacle-free map (1000 × 1000 pixels). The grey scale of each cell represents the distance to the target.
However, in maps with obstacles (Figure 12 and 13) the only algorithm that generates smooth rounded wave fronts is our approach, whereas Jarvis' approach obtained results without rounded borders. On the other hand, Jarvis' approach with path-smoothing post-processing obtains a wave front with rounded borders, but with some errors in the computed distance, as can see by the broken profile of the wave front (Figure 12(d), 12(e), 12(f), as well as Figure 13(d), 13(e) and 13(f)).

Resulting images for

Resulting images for
These results are given in Appendixes B and C, which present the relative errors of Jarvis' method compared to our algorithm. These errors are all positive, since our algorithm computes the shortest distances to the goal. The worst results are obtained by Jarvis' approach, which can be improved by post-processing (in some cases the errors are close to zero). However, applying the smoothing algorithm on the results of the algorithm proposed by Jarvis considerably increases the computation time compared to our approach, as we can see in Appendix D.
The resulting images for some maps are shown in Figures 12 and 13 and we can appreciate the different profiles between the wave fronts generated by our algorithm and the other algorithms.
4.3 Execution times
In order to determine the execution speeds, all algorithms were tested on the maps shown in Figure 8, with the wave fronts generated from different starting points. For each tested point, the execution times were averaged over 31 iterations. The average times required by our approach are slightly more important than those required for Jarvis' approach without post processing. However, in order to obtain comparable wave fronts, it is necessary to apply, to the Jarvis' algorithm results, the path-smoothing algorithm proposed by Lee. Thereby, it increases the execution time compared to our proposal (Appendix D).
5. Conclusions
This paper presents a new raster scan method for computing the Euclidean distance transform, in order to obtain a universal path planner for mobile robots, which solves the needs to obtain accurate distances toward goals and to generate smooth trajectories for some exploration algorithms. Besides obtaining the distance to the goal for every cell in the map, we obtain the next visible sub goal and consequently we can generate a good short and smooth path without post processing, similar to the one obtained using the visibility graph approach. From the numerical comparison of the obtained paths (for various distance transform algorithms), we demonstrate that our approach has great efficiency in computing a sequence of sub-goals from any starting point up to the goal. Also, the proposed approach has no restriction on the angle turn, as in Jarvis' algorithms. Finally, our approach does not need a bulky overhead computation to keep track of the best visible sub-goals: the visibility from the neighbour cells is exploited in order to add efficiency to our algorithm.
