
corner. A limited but effective visibility test of an
obstacle edge can be performed by finding the inner
product between a perpendicular outward vector to
the obstacle edge and a vector which starts at the cell
corner under consideration and points to any point
inside the obstacle polygon or on its edges. If the
inner product is negative, the edge is visible,
otherwise it is invisible and no distance calculations
need to be performed.
The procedure implemented by the described
algorithm would be sufficient to find the Voronoi
diagram for solving the path planning problem for
robots which are reduced to a point. In order to make
the algorithm work for arbitrarily shaped robots, a
slight modification has to be introduced. Let us
consider that the distance from the robot center to its
most external point is r. Then, when the algorithm
finds a cell which should belong to the Voronoi
diagram, it must perform a proximity test to verify if
the distances from all the cell corners to the closest
obstacles are greater than r. If this is true then the
cell is marked as belonging to the Voronoi diagram
and inserted in the queue. Otherwise the cell is
marked as blocked but it is still inserted in the
queue, because its neighbors may still belong to the
Voronoi diagram which will establish possible paths.
The algorithm error in defining the Voronoi
diagram is less than the size of a cell diagonal. If, for
instance, the robot working area is a 10m x 10m
square and the grid structure is defined as a 1000 x
1000 cell array, the maximum algorithm error is less
than 1.41 cm since the cell side is 1 cm long.
3 COOPERATIVE STRATEGY
The proposed cooperative implementation of the
algorithm described in Section 2 divides the working
area of the robots into Nr slices, where Nr is the
number of available robots. Each robot has a
working area slice associated with it and is
responsible for finding the Voronoi diagram within
that slice. Therefore, only a fraction (1/Nr) of the
grid data structure needs to be stored by each robot.
The data structure containing information on the
obstacle corner coordinates and on the equations of
the obstacle edges is broadcast to all the robots. Two
approaches have been adopted to solve this problem.
The first one does not require any communication,
but leads to some redundant work performed among
the robots. In the second approach, some
communication between the robots working on
neighbor slices is required but, as a consequence, a
more cooperative work pattern is adopted.
If we assume the working area is rectangular and
the cut lines are vertical lines, it is possible to say
that the Voronoi diagram will certainly cross the
vertical borders of a slice. So, in the first approach,
every robot searches both vertical border lines of its
assigned slice for grid cells representing Voronoi
points, as shown in Figure 2, where the use of four
processors (P0 to P3) is considered.
Once a Voronoi point is found, the Voronoi
diagram segment starting at the corresponding cell
and within robot slice is determined using the
algorithm described in Section 2. This procedure is
repeated until all the cells on both vertical border
lines have been visited. The two robots with the
leftmost and the rightmost slices assigned to them
can do less work because they know a priori the
working area corners are Voronoi vertices and,
therefore, they can draw the Voronoi diagram
segments starting from these two known points. So,
each vertical border line is analyzed twice by two
different robots as can be seen in Figure 2.
Figure 2: Working Area Partition
In the second approach, this redundant work is
avoided by assigning, for instance, the job of
searching a vertical border line to the robot which is
responsible for defining the Voronoi diagram within
the border right slice. The cell coordinates
corresponding to Voronoi points which have been
found on the border line are sent to the robot
processing the neighbor slice on the left. When the
coordinates of a cell are received, the robot puts the
cell on its queue. This cell will be used as the
starting point for finding a Voronoi diagram
segment. With this second approach, each robot
searches for Voronoi points on a single vertical
border line and receives the information on Voronoi
points on the other border line from its right side
neighbor. Therefore, each robot does less work and
uses communication to help its left side neighbor to
do its work.
4 EXPERIMENTAL RESULTS
The parallel algorithm described in Section 2 has
been implemented in C with the use of MPI
(Message Passing Interface) for implementing the
communication functions on an Ethernet cluster
consisting of 6 workstations, with 2.4 GHz Intel
Pentium 4 processors and 128 Mbytes of memory.
This environment has been chosen for the
experiments because it is similar to the actual
P0
P1 P2
P3
CONSTRUCTION OF THE VORONOI DIAGRAM BY A TEAM OF COOPERATIVE ROBOTS
309