|
Algorithm 1. Node growing algorithm |
|
Input: C-space, , , ,
|
|
Output: leaf nodes for each root node |
|
Initialization:
= 1; is empty. |
|
for each obstacle in
do
|
| if
attaches with the boundary of C-space do
|
| separate occupied nodes into and
|
| while nodes in are not searched totally do
|
| if
do
|
| root nodes are nodes in , and each root node has one index as a root index |
|
|
| The root index for a node in is its original root index |
| end if
|
| for each node in
do
|
| searching one-ring neighboring nodes from in all possible directions |
|
|
| end for
|
|
|
| for each node in
do
|
| for each child node in
do
|
| if
is searched before then
|
| stop searching in this direction |
| else
if
is searched by two or more parent nodes then
|
| label by root indexes of its all parent nodes |
| else
if
is not searched before then
|
| label by the root index of its parent node |
|
|
| end if
|
| end for
|
| end for
|
|
|
|
|
| end while
|
| end if
|
| end for |