Neural Networks Based Path Planning and Navigation of Mobile Robots

The path planning for mobile robots is a fundamental issue in the field of unmanned vehicles control. The purpose of the path planner is to compute a path from the start position of the vehicle to the goal to be reached. The primary concern of path planning is to compute collision-free paths. Another, equally important issue is to compute a realizable and, if possible, optimal path, bringing the vehicle to the final position. Although humans have the superb capability to plan motions of their body and limbs effortlessly, the motion planning turns out to be a very complex problem. The best known algorithm has a complexity that is exponential to the number of degrees of freedom and polynomial in the geometric complexities of the robot and the obstacles in the environment (Chen & Hwang (1998)). Even for motion planning problems in the 2-dimensional space, existing complete algorithms that guarantee a solution often need large amount of memory and in some cases may take long computational time. On the other hand, fast heuristic algorithms may fail to find a solution even if it exists (Hwang & Ahuja (1992)). In this paper we present a fast algorithm for solving the path planning problem for differential drive (holonomic)1 robots. The algorithm can be applied to free-flying and snake type robots, too. Generally, we treat the two-dimensional known environment, where the obstacles are stationary polygons or ovals, but the algorithm can easily be extended for the three-dimensional case (Kroumov et al. (2010)). The proposed algorithm is, in general, based on the potential field methods. The algorithm solves the local minimum problem and generates optimal path in a relatively small number of calculations. The paper is organized as follows. Previous work is presented in Section 2. In Section 3 we give a definition of the map representation and how it is used to describe various obstacles situated in the working environment. The path and the obstacle collisions are detected using artificial annealing algorithm. Also, the solution of the local minima problem is described there. In Section 4 we describe the theoretical background and the development of a motion


Introduction
The path planning for mobile robots is a fundamental issue in the field of unmanned vehicles control.The purpose of the path planner is to compute a path from the start position of the vehicle to the goal to be reached.The primary concern of path planning is to compute collision-free paths.Another, equally important issue is to compute a realizable and, if possible, optimal path, bringing the vehicle to the final position.Although humans have the superb capability to plan motions of their body and limbs effortlessly, the motion planning turns out to be a very complex problem.The best known algorithm has a complexity that is exponential to the number of degrees of freedom and polynomial in the geometric complexities of the robot and the obstacles in the environment (Chen & Hwang (1998)).Even for motion planning problems in the 2-dimensional space, existing complete algorithms that guarantee a solution often need large amount of memory and in some cases may take long computational time.On the other hand, fast heuristic algorithms may fail to find a solution even if it exists (Hwang & Ahuja (1992)).In this paper we present a fast algorithm for solving the path planning problem for differential drive (holonomic)1 robots.The algorithm can be applied to free-flying and snake type robots, too.Generally, we treat the two-dimensional known environment, where the obstacles are stationary polygons or ovals, but the algorithm can easily be extended for the three-dimensional case (Kroumov et al. (2010)).The proposed algorithm is, in general, based on the potential field methods.The algorithm solves the local minimum problem and generates optimal path in a relatively small number of calculations.The paper is organized as follows.Previous work is presented in Section 2. In Section 3 we give a definition of the map representation and how it is used to describe various obstacles situated in the working environment.The path and the obstacle collisions are detected using artificial annealing algorithm.Also, the solution of the local minima problem is described there.In Section 4 we describe the theoretical background and the development of a motion planner for a differential drive vehicle.Section 5 presents the algorithm of the path planner.In Section 6 the calculation time is discussed and the effectiveness of the proposed algorithm is proven by presenting several simulation results.In the last section discussions, conclusions, and plans for further developments are presented.

Previous work
Comprehensive reviews on the work on the motion planning can be found in Latombe (1991).
In this section we concentrate on motion planning for moving car-like robots in a known environment.Motion planners can be classified in general as: 2) heuristic.
Complete motion planners can potentially require long computation times but they can either find a solution if there is one, or prove that there is none.Heuristic motion planners are fast but they often fail to find a solution even if it exists.To date motion planners can be classified in four categories (Latombe (1991)):
In the skeleton approach the free space is represented by a network of one-dimensional paths called a skeleton and the solution is found by first moving the robot onto a point on the skeleton from the start configuration and from the goal, and by connecting the two points via paths on the skeleton.The approach is intuitive for two-dimensional problems, but becomes harder to implement for higher degrees of freedom problems.Algorithms based on the visibility graph (VGRAPH) (Lozano-Pèrez & Wesley (1979)), the Voronoi diagram (O'Dúnlaing & Yap (1982)), and the silhouette (Canny (1988)) (projection of obstacle boundaries) are examples of the skeleton approach.In the VGRAPH algorithm the path planning is accomplished by finding a path through a graph connecting vertices of the forbidden regions (obstacles) and the generated path is near optimal.The drawback of the VGRAPH algorithm is that the description of all the possible paths is quite complicated.Actually, the number of the edges of the VGRAPH is proportional to the squared total number of the obstacles vertices and when this number increases, the calculation time becomes longer.Another drawback is that the algorithm deals only with polygonal objects.Yamamoto et al. (1998) have proposed a near-time-optimal trajectory planning for car-like robots, where the connectivity graph is generated in a fashion very similar to that of Lozano-Pèrez & Wesley (1979).They have proposed optimization of the speed of the robot for the generated trajectory, but the optimization of the trajectory itself is not enough treated.In the cell decomposition approach (Paden et al. (1989)) the free space is represented as a union of cells, and a sequence of cells comprises a solution path.For efficiency, hierarchical trees, e.g.octree, are often used.The path planning algorithm proposed by Zelinsky (1992) is quite reliable and combines some advantages of the above algorithms.It makes use of quadtree data structure to model the environment and uses the distance transform methodology to generate paths.The obstacles are polygonal-shaped which yields a quadtree with minimum sized leaf quadrants along the edges of the polygon, but the quadtree is large and the number of leaves in the tree is proportional to the polygon's perimeter and this makes it memory consuming.In the subgoal-graph approach, subgoals represent key configurations expected to be useful for finding collision-free paths.A graph of subgoals is generated and maintained by a global planner, and a simple local planner is used to determine the reachability among subgoals.This two level planning approach is first reported by Faverjon & Tournassoud (1987) and has turned out to be one of the most effective path planning methods.The potential field methods and their applications to path planning for autonomous mobile robots have been extensively studied in the past two decades (Khatib (1986), Warren (1989), Rimon & Doditschek (1992), Hwang & Ahuja (1992), Lee & Kardaras (1997a), Lee & Kardaras (1997b), Chen & Hwang (1998), Ge & Cui (2000), Yu et al. (2002), Kroumov et al. (2004)).The basic concept of the potential field methods is to fill the workspace with an artificial potential field in which the robot is attracted to the goal position being at the same time repulsed away from the obstacles (Latombe (1991)).It is well known that the strength of potential field methods is that, with some limited engineering, it is possible to construct quite efficient and relatively reliable motion planners (Latombe (1991)).But the potential field methods are usually incomplete and may fail to find a free path, even if one exists, because they can get trapped in a local minimum (Khosla & Volpe (1988); Rimon & Doditschek (1992); Sun et al. (1997)).Another problem with the existing potential field methods is that they are not so suitable to generate optimal path: adding optimization elements in the algorithm, usually, makes it quite costly from computational point of view (Zelinsky (1992)).Ideally, the potential field should have the following properties (Khosla & Volpe (1988)): 1.The magnitude of the potential field should be unbounded near obstacle boundaries and should decrease with range.
2. The potential should have a spherical symmetry far away from the obstacle.
3. The equipotential surface near an obstacle should have a shape similar to that of the obstacle surface.
4. The potential, its gradient and their effects on the path must be spatially continuous.
The proposed in this paper algorithm is partially inspired by the results presented by Sun et al. (1997) and by Lee & Kardaras (1997a), but our planner has several advantages: • the obstacle descriptions are implemented directly in the simulated annealing neural network-there is no need to use approximations by nonlinear equations (Lee & Kardaras (1997b)); • there is no need to perform a learning of the workspace off-line using backpropagation (Tsankova (2010)); • there is no need to perform additional calculations and processing when an obstacle is added or removed; • a simple solution of the local minimum problem is developed and the generated paths are conditionally optimized in the sense that they are piecewise linear with directions changing at the corners of the obstacles.
The algorithm allows parallel calculation (Sun et al. (1997)) which improves the computational time.The experimental results show that the calculation time of the presented algorithm depends linearly on the total number of obstacles' vertices-a feature which places it among the fastest ones.The only assumptions made in this work are that there are a finite number of stationary oval or polygonal obstacles with a finite number of vertices, and that the robot has a cylindrical shape.The obstacles can be any combination of polygons and ovals, as well.In order to reduce the problem of path planning to that of navigating a point, the obstacles are enlarged by the robot's polygon dimensions to yield a new set of polygonal obstacles.This "enlargement" of the obstacles is a well known method introduced formally by Lozano-Pèrez & Wesley (1979).

Obstacles
Every obstacle is described by a neural network as shown in Fig. 1.The inputs of the networks are the coordinates of the points of the path.The output neuron is described by the following expression, which is called a repulsive penalty function (RPF) and has a role of repulsive potential: where I 0 takes a role of the induced local field of the neuron function f (•), θ T is a bias, equal to the number of the vertices of the obstacle decreased by 0.5.The number of the neurons in the hidden layer is equal to the number of the vertices of the obstacle.O H m in eq. ( 1) is the output of the m-th neuron of the middle layer: where T is the pseudotemperature and the induced local field (x) of the neuron is equal to I 0 for eq.( 1) or equal to I H m in the case of eq. ( 2).The pseudotemperature decreasing is given by: Finally, I H m is given by the activating function ( 5 )   where x i and y i are the coordinates of i-th point of the path, w xm and w ym are weights, and θ H m is a bias, which is equal to the free element in the equation expressing the shape of the obstacle.
The following examples show descriptions of simple objects.
The area inside the obstacle can be described with the following equations: From these equations and eq.( 5): i.e. in the middle layer of the network, the activating functions become Hence, the free elements in the equations describing the obstacle are represented by the biases θ H i and the weights in the equations for I H i are the coefficients in the respective equations.
When an obstacle has a circular shape, I H m is expressed as: where R is the radius and (P, Q) are the coordinates of the centre.

Example: 3. Description of elliptical obstacles.
When the obstacle has elliptic (circular) shape, I H m is expressed as: which comes directly from the standard equation of the ellipse ) respectively, and the description network has two neurons in the middle layer.

Note 1. The oval shaped obstacles are represented by neural network having two neurons (see the above Example 2 and Example 3) in the middle layer.
It is obvious from the above that any shape which can be expressed mathematically can be represented by the description neural network.This, of course, includes configurations which are a combination of elementary shapes.The description of the obstacles by the shown here network has the advantage that it can be used for parallel computation of the path, which can increase the speed of path generation.As it will be shown later, this description of the obstacles has the superiority that the calculation time depends only on the total number of the obstacles' vertices.

The local minima problem
The local minima remain an important cause of inefficiency for potential field methods.Hence, dealing with local minima is the major issue that one has to face in designing a planner based on this approach.This issue can be addressed at two levels (Latombe (1991)): (1) definition of the potential function, by attempting to specify a function with no or few local minima, and (2) in the design of the search algorithm, by including appropriate techniques for escaping from local minima.However, it is not easy to construct an "ideal" potential function with no local minima in a general configuration.The second level is more realistic and is 178 Recent Advances in Mobile Robotics www.intechopen.comaddressed by many researchers (see e.g.Latombe (1991); Lozano-Pèrez et al. (1994) and the references there).In the proposed in this chapter algorithm, the local minima problem is addressed in a simple and efficient fashion: 1.After setting the coordinates of the start and the goal points respectively (Fig. 3(a)), the polygonal obstacles are scanned in order to detect concavity (Fig. 3(b)).In the process of scanning, every two other vertices of a given obstacle are connected by a straight line and if the line lies outside the obstacle, then a concavity exists.
2. If the goal (or the start) point lies inside a concavity, then a new, temporary, goal (start) lying outside the concavity is set (point g' in Fig. 3(b)), and the initial path between the original goal (start) and the new one is set as a straight line.The temporary goal (start) is set at the nearest to the "original" start (goal) vertex.
3. Every detected concavity is temporarily filled, i.e. the obstacle shape is changed from a concave to a nonconcave one (see Fig. 3(c)).After finishing the current path-planning task, the original shapes are retained so that the next task could be planned correctly, and the temporary goal (start) is connected to the original one by a straight line (Fig. 3(d)).The above allows isolating the local minima caused by concavities and increases the reliability of the path planning.

Optimal path planner
The state of the path is described by the following energy function.where w l and w c are weights (w l + w c = 1), E l depicts the squared length of the path: and E c is given by the expression.
where N is the number of the points between the start and the goal, K is the number of the obstacles, and C is obtained through eq. ( 1).Minimizing eq. ( 8) will lead to obtaining an optimal in length path that does not collide with any of the obstacles.In order to minimize (8) the classical function analysis methods are applied.First, we find the time derivative of E: we can rewrite the above equation as where η is an adaptation gain.It is obvious that, when ẋi → 0a n d ẏi → 0, E converges to its minimum.In other words, when all points of the path almost stop moving, there is no collision and the path is the optimal one, i.e. eq. ( 13) can be used as a condition for termination of the calculation iterations.Now, from equations ( 12), and This leads to the final form of the function: where f ′ is given by the following expressions: In eq. ( 16) the first member in the right side is for the path length optimization and the second one is for the obstacle avoidance.One of the important advantages of the above path-planning is that it allows parallelism in the calculations of the neural network outputs (see Section 6), which leads to decreasing the computational time.The generated semi-optimal path can be optimized further by applying evolutionary methods (e.g.genetic algorithm).Such approach leads to an optimal solution but the computational cost increases dramatically (Yu et al. (2003)).

The path-planning algorithm
In this section an algorithm based on the background given in Sections 3 and 4 is proposed.
The calculations for the path are conceptually composed by the following steps: Step 1: Initial step 1.Let the start position of the robot is (x 1 , y 1 ), and the goal position is denoted as (x N , y N ).
2. Check for concavities (see Section 3.2.)and, if necessary, reassign the goal (start) position.3. At t = 0 the coordinates of the points of the initial path (straight line) (x i , y i ; i = 2, 3, . . ., N − 1) are assigned as , i. e. the distance between the x and y coordinates of every two neighboring points of the path is equal.
Note 2. It is assumed that the obstacles dimensions are enlarged by the robot's polygon dimensions (Lozano-Pèrez & Wesley (1979)).
Step2: 1.For the points (x i , y i ) of the path which lie inside some obstacle, the iterations are performed according to the following equations: 2. For the points (x i , y i ) situated outside the obstacles, instead of eq. ( 19) use the following equations: i.e. for the points of the path lying outside obstacles, we continue the calculation with the goal to minimize only the length of the path.
Step 4: Test for convergence Calculate the difference d of the path lengths at time t and time (t + p),i.e.
•I f d < ε then the algorithm terminates with the conclusion that the goal is reached via an "optimal" path.Here ε is a small constant, say ε = 0.1.
Here eq. ( 19) is almost the same as eq.( 16) with the difference that instead of only one RPF, different functions, as explained below, are used for every layer of the neural network.Every obstacle is described using a neural network as shown in Fig. 1.The output neuron is described by eq. ( 1), the neuron function f (•) is the same as in eq. ( 3) and the pseudotemperature is as in eq. ( 4).The hidden layer inputs are as in eq. ( 1) but the outputs O H m now become with I H m becoming the induced local field of the neuron function f H m : Finally, I H m is given by the activating function (5).Equations ( 3) and ( 23

Experimental results
To show the effectiveness of the proposed in this paper algorithm, several simulation examples are given in this section.

Calculation speed evaluation
The simulations were run on ASUS A7V motherboards rated with 328 base (352 peak) SPEC CFP2000 and 409 base (458 peak) SPEC CINT2000 on the CPU2000 benchmark.The environment shown in Fig. 5 has been chosen for the benchmark tests.In the course of the speed measurements the number of the vertices was increased from 20 to 120 with step of 20 vertices.The final configuration of the obstacles inside the benchmark environment with three generated paths is shown in Fig. 5.To compare the run-times, 12 path generations have been performed randomly.After deleting the lowest and the highest path planning times, the average of the remaining 10 values has been adopted.As it was explained at the end of Section 4 the algorithm allows parallelizing the path computation.To calculate the speedups we ran parallel simulations for the same benchmark environment on one, two, and three processors.Figure 7 shows how the speed increases with increasing the number of the processors.For the case of two processors the simulation was run on two ASUS A7V boards, and for the case of three processors a Gigabyte 440BX board was added as a third processor.The communication during the parallel calculations was established by an Ethernet bus based network between the computers.It is possible to further increase the calculation speed by introducing adaptive adjustment of the parameters η 1 and η 2 .For example, the following adaptive adjusting law increases the speed about three times (see Fig. 8 where δ is a small constant.
In the course of path calculations, a limited number of obstacles has impact on path generation-mostly the obstacles the initial, straight line path intersects with, contribute to path forming.Then, while performing Step 1 of the algorithm, if all obstacles which do not collide with the initial path are ignored and excluded from the calculations, it is possible to drastically decrease the calculation time.A good example is the path in vertical direction in Fig. 5.When all obstacles are considered, the total number of vertices is 135 and RPF for all obstacles would be calculated.However, if only the four obstacles which collide with the initial straight line are used, the number of vertices decreases to only 17 and the expected calculation time will be approximately 8 times shorter.After finishing the path generation for the decreased number of obstacles, the original environment should be retained and a final correction of the path shape should be performed.Naturally, this final correction would require only few additional calculation loops.

Simulation results
Figure 9 shows additional results of path planning simulation in an environment with concaved obstacles.It can be seen that the local minimums do not cause problems in the path generation.In these simulations the number of the points between the start position and the goal was set to 200.In both examples the values of the coefficients in equations of the algorithm were not changed.In fact, the authors have performed many simulations using different environments, in which the obstacles were situated in many different ways.In all the simulations the paths were successfully generated and the time for the calculations agreed with the calculation speed explained above.Figure 10 shows the potential fields of obstacles in the course of a simulation.
We have developed software with a graphic user interface (GUI) for the simulation and control of differential drive robots in a 2D environment (See Fig. 11).The environment allows the user to easily build configuration spaces and perform simulations.

Discussion and conclusions
In this paper we have proposed an algorithm which guarantees planning of near optimal in length path for wheeled robots moving in an aprioriknown environment.We are considering wheel placements which impose no kinematic constraints on the robot chassis: castor wheel, Swedish wheel, and spherical wheel.
The proposed algorithm is a significant improvement of the potential field algorithms because it finds an almost optimal path without being trapped in local minima and the calculation speed for the proposed algorithm is reasonably fast.Because the only assumptions made are that the obstacles are stationary polygons and ovals, the algorithm can solve the navigation problem in very complex environments.For description of the obstacles the algorithm uses only the Cartesian coordinates of their vertices and does not need memory consuming obstacle transformations (cf.Zelinsky (1992); Zelinsky & Yuta (1993)).The consumed memory space is equal to twice the number of the coordinates of the path points and some additional memory for keeping the parameters of the description networks.
Because the generated paths are piecewise linear with changing directions at the corners of the obstacles, the inverse kinematics problems for the case of differential drive robots are simply solved: to drive the robot to some goal pose (x, y, θ), the robot can be spun in place until it is aimed at (x, y), then driven forward until it is at (x, y) ,a n dt h e ns p u ni np l a c eu n t i lt h e required goal orientation θ is met.It becomes clear from the course of the above explanations that the effectiveness of the proposed algorithm depends on the development of some mechanism for choosing the initial values of the pseudotemperatures (β m ) or properly adjusting the pseudotemperatures in order to generate potential fields satisfying the properties given in Section 2. Applying of an adaptive adjusting procedure to the coefficients β m similar to that for adjusting of η 1 and η 2 (see.eq. ( 25)) is one possible solution.Moreover, there is no need to perform continuous adjustment throughout the whole path generation-adjustment in the first few steps gives The proposed algorithm can be easily extended for the 3-D case (Kroumov et al. (2010)).
The extension can be done by adding an additional input for the z (height of the obstacles) dimension to the obstacle description neural network.Adding of z coordinate and employing a technique for path planning, similar to that proposed in Henrich et al. (1998), would allow further adoption of the algorithm for planning of paths for industrial robots.Development of such application is another subject of our future work.

Fig. 2 .
Fig. 2. The annealing network for a rectangular obstacle where I H m is the weighted input of the m-th neuron of the middle layer and has a role of induced local field of the neuron function.The neuron activation function f (•) has the form:

177
Neural Networks Based Path Planning and Navigation of Mobile Robots www.intechopen.com

) 179 Neural
Networks Based Path Planning and Navigation of Mobile Robots www.intechopen.com

) 181 Neural
Networks Based Path Planning and Navigation of Mobile Robots www.intechopen.com

Fig. 4 .
Fig. 4. Block diagram of the algorithm and ) include different values of pseudotemperatures, which is one of the important conditions for convergence of 183 Neural Networks Based Path Planning and Navigation of Mobile Robots www.intechopen.comthe algorithm and for generation of almost optimal path.The block diagram of the algorithm isshowninFig.4.

Fig. 5 .
Fig. 5.The benchmark environment with three generated paths Figure 6 shows the speed change depending on the total number of vertices of the obstacles.It is clear that the speed changes linearly with increasing the number of the vertices (cf.Lozano-Pèrez & Wesley (1979)).As it was explained at the end of Section 4 the algorithm allows parallelizing the path computation.To calculate the speedups we ran parallel simulations for the same benchmark environment on one, two, and three processors.Figure7shows how the speed increases with increasing the number of the processors.For the case of two processors the simulation was run on two ASUS A7V boards, and for the case of three processors a Gigabyte 440BX board was added as a third processor.The communication during the parallel calculations was established by an Ethernet bus based network between the computers.

188Recent
Advances in Mobile Robotics www.intechopen.comgood approximations for the initial values of the β m coefficients.Strict solution of this problem is one of our next goals. ):