You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/322775664

Path planning and obstacle avoidance based on shortest distance algorithm

Conference Paper · December 2017

CITATIONS READS

0 1,182

4 authors:

Abdulmuttalib Turky Rashid Abduladhem Abdulkareem Ali


University of Basrah University of Basrah
37 PUBLICATIONS   126 CITATIONS    101 PUBLICATIONS   281 CITATIONS   

SEE PROFILE SEE PROFILE

Mattia Frasca Luigi Fortuna


University of Catania University of Catania
308 PUBLICATIONS   3,266 CITATIONS    493 PUBLICATIONS   5,838 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Car in Smart City View project

Neuromorphic Computing and Non-linear dynamics View project

All content following this page was uploaded by Abdulmuttalib Turky Rashid on 29 January 2018.

The user has requested enhancement of the downloaded file.


Path planning and obstacle avoidance based on
shortest distance algorithm

Abdulmuttalib.T. Rashid(1), Abduladhem A. Ali(2)


(1) Electrical Engineering Department Mattia Frasca, Luigi Fortuna
(2) Computer Engineering Department Electrical and Electronics Department
University of Basrah University of Catania
Basrah, Iraq Catania, Italy

Abstract— In this paper, a modified algorithm called shortest curves [6-7]. All these works need the value of the radius R of
path is presented for trajectory planning and obstacle avoidance. the circle, and hence rebuilding is necessary for a circle of a
This method guarantees both smoothness and obstacle avoidance different radius. On the contrary, Voronoi diagrams do not need
in the trajectories of the robots. The digital differential algorithm the value of the radius of the disc, because the shortest distance
is used in this method to implement a linear and circular to the obstacles is larger than the radius of the disc [8].
movement of robots and the Dijkstra’s algorithm to search for the However, a method based on Voronoi diagrams does not take
shortest path. Three simulation scenarios are used to implement into account the problem of minimizing the path to the goal.
this algorithm: The first one, includes the building of a tree of
paths between robot and goal, the second one is for choosing the This paper produces a path planning algorithm, which is a
shortest distance from the source to target, and the third scenario modified tangent visibility graph [6, 9]. It replaces the collision
is for comparison the length of the path and the time of arrival for avoidance between two robots by collision avoidance between
different target locations. robot and obstacle. A collision-free motion of a circular robot
of radius R among circular obstacles is obtained by expanding
Keywords—Path planning, digital differential analyzer, Dijkstra’s the radius of obstacles by the radius of the robot. The modified
algorithm. method is created by using the tangent visibility graph
construction algorithm. This algorithm constructs paths from
source to target by manipulating obstacles lying in the direct
virtual line between the robot trajectory and the target. The
I. INTRODUCTION shortest distance algorithm is used for choosing the shortest
One of the important subjects for the mobile robot distance to avoid the collision with obstacles. The shortest path
navigation is the path planning and obstacle avoidance. Each to the robot trajectory is searched by using the Dijkstra‘s
robot in a team, independently from the others should be able to algorithm. This paper is ordered as follows. Section II defines
know his current location, plan the next movement, move to the the low-level control of the robot. Section III describes the
next location as expected, and at the same time avoid the tangent visibility graph algorithm. Section IV develops the
obstacles during the motion. theoretical analysis, describing the shortest distance for the
tangent graph algorithm. In Section V, the algorithm is tested in
The path planning with polygonal obstacles in most of the two scenarios. Finally, the conclusion of the paper are discussed
known methods involves the use of graph search algorithms to in section VI.
find the shortest path from the possible paths [1]. The visibility
graph of the obstacle vertices, defined as the graph where there
is a connection between two vertices if and only if they are
visible from one another, is used as the graph of possible paths. II. LOW LEVEL CONTROL OF THE ROBOT
As an example, both the vertexes A and B are visible to each This control needs to study the properties of the mobile
other when the segment AB does not intersect any obstacle in robot with differential-drive system and the digital differential
the environment [2-3]. A widely used algorithm for finding the analyzer algorithm, which is chosen to satisfy the straight and
shortest-path is based on Dijkstra‘s algorithm [4], and uses a circular movement of the robot. The mobile robot has two
full visibility graph. The generation of shortest paths for mobile wheels connected through a common axis with the ability to
robots involving of the collision-free tangents among all moves separately in forward and reverse directions. These
obstacles is represented as effective methods. These methods wheels are designed to enable the robot to turns by increasing
are based on searching for the shortest path over the tangent
the outer wheel speed and decreasing the inner wheel speed
graph [5]. These methods are more efficient than the visibility
[10].
graph methods.
The digital differential analyzer algorithm is used to draws
There are some works dealing with the shortest path of circles and lines on a screen of a computer which has a
circular obstacles. In these works the visibility graph can be pixelated display system [11]. It is a faster method for
extended to a tangent graph, by assuming circular curves on the calculating pixel position and easier to implement in hardware.
borderline of the obstacles and joint tangents of the circular
and
A. The straight line drawing algorithm
The straight line path planning of mobile robot can be
accomplished with the digital differential analyzer. Two
y=yb – ya (2)
‗round‘s and two adds per pixel are required. It is a scan
conversion line algorithm. The line at unit intervals is one Where x and x represents the differences in x-Axis and y-
coordinate and the algorithm has to determine the Axis between the end points.
corresponding integer values nearest to the line for the other
coordinate. The digital differential analyzer algorithm, as 3. Calculate
shown in Fig. 1 a, is accomplished according to the following
points: Steps = max(x, y) (3)

4. Compute

Incx = x/Steps (4)

And

Incy = y/Steps (5)

Where Incx and Incy are represent the magnitude of


incremental between two point‘s lies on the line.

5. Let x = xa and y = ya

Set pixel (Round(x), round(y), c)

6. For I = 1 to steps

x = x + incx (6)
(a)
y = y + incy (7)

Set pixel (Round(x), round(y), c).

B. The arc line drawing algorithm


The digital differential analyzer algorithm can be also used
to implement the arc paths of mobile robots [12]. This
algorithm assumes that the arc path is part of a circle with a
center at the origin. The calculation of mobile robot trajectory is
achieved according to the following points as shown in Fig.1 b.

1. Input the angle θ, the radius R and the center of the


circular arc (xc , yc).

2. Let the increment angle equal to dθ and initial


position (x, y).
(b)
3. Set pixel (Round(x), round(y), c).
Fig. 1 The digital differential analyzer algorithm. (a) Line drawing algorithm.
(b) Circle drawing algorithm 4. For angle = 0 to θ step by dθ
1. Input the points A(xa, ya) and B(xb, yb) that represent the x = x + (yc - y)*dθ (8)
end line points.
2. Compute y = y + (x - xc )*dθ (9)
x=xb – xa (1) Set pixel (Round(x), round(y), c).
III. THE TANGENT VISIBILITY GRAPH point of the path is the target. The investigation of this method
One task to performing trajectory planning with obstacles is represented by the following steps:
avoidance in an environment is to search for the shortest path in
graph contains all the possible paths between a source and a Step1: At first, the position, radius, orientation, and velocity
target. The graph collecting all the possible paths to the target is of robot: (Ps (xs , ys),rs, θs, vs) must be known and the
called the visibility graph which has nodes that represent the position and radiuses of obstacles: (P1,.., Pn, r1,…, rn) the
vertices of the obstacles and edges that represent the paths target location: (Pg(xg, yg) also, must be known.
between any two visible pairs of vertices. The tangent lines to
two obstacles at its endpoints are called bitangents. These Step2: Test if any obstacle intersects the straight line
bitangents produce the edges of a graph called the tangent between the robot trajectory and the target. The intersection
visibility graph, as shown in Fig.2. The number of the bitangent happens if the distance h between the obstacle and the line
around n obstacles is equal to or less than (4 n – 4) [2]. The from the source to target is less than the radius of an
concept of this method is summarized by searching for safe and obstacle. Fig. 3 shows the method used in estimating the
shortest paths for the robot. The algorithm repeats several steps distance h according to the following equation.
represented by assuming a straight line between robot trajectory
and target for detecting any collision and then changing the a = (yg - ys) / (xg - xs) (10)
collision path by two safe tangent paths to the surface of the
collide obstacle. This procedure repeats until the robot reaches b = -1 (11)
to the target.
c = ys – a * xs (12)

h = Abs(a * xabs + b * yabs + c) / Sqrt(a 2 + b 2))


(13)

Fig. 2 The tangent visibility graph

Fig. 3 The distance between an obstacle and robot trajectory


IV. THE SHORTEST DISTANCE OF THE TANGENT GRAPH
In this Section, a modified algorithm of the tangent graph Step3: If any intersection is detected, then outer tangent line
method is presented. The approach used in this section is and inner tangent line are drawn from the trajectory of robot
applied to simple small differential-drive robots. The algorithm to the obstacle.
consists of the following subsections. At first, the tangent
visibility graph is constructed. The shortest distance algorithm Step4: Steps two and three are repeated for all the paths.
is used to modify the tangent visibility graph. Finally, the
shortest path among the obtained paths is chosen by using the B. Shortest distance algorithm
Dijkstra‘s algorithm. In this section, the shortest distance algorithm for obstacle
avoidance is introduced. This algorithm is similar to the
A. The tangent visibility graph algorithm reciprocal orientation algorithm [13], which is used to predict
This section describes the steps for building the tree of paths the circular trajectories of two robots for the near future. The
of the robot from source to target using the tangent visibility difference between the reciprocal orientation algorithm and this
graph. The root of the tree represents the source for the algorithm is that the concept of reciprocally is not applied since
structure. The idea of this algorithm is summarized by it is used between a robot and static obstacle. The current
searching for safe and shortest paths for the robot. The algorithm is used to reduce the distance between robot and
algorithm repeats several steps by assuming a direct path obstacle when changing the robot direction in order to avoid the
between robot trajectory and target for detecting any collision collision, as shown in Fig. 4. The algorithm is repeated for each
and then changing eventual colliding paths by substituting it trajectory in the tangent visibility graph with the following
with two safe tangent paths. This process repeats until the end steps:
Step1: By using shortest distance algorithm, each direct path
in the tangent visibility graph is modified to a straight line
and arc trajectory. V. SIMULATION RESULTS
The results in this section are simulated with the Visual
basic language on Windows operating system using a computer
with Intel core I7 CPU 2.53 GHz processor. Three different
simulations are used to test the proposed algorithm for path
planning and obstacle avoidance.
 Tree of paths scenario: the first simulation shows path
planning with unlimited sensing.
 Shortest path scenario: the second simulation shows the
shortest path of the autonomous mobile robot to target.
 Comparison for different target locations scenario: the
Fig. 4 The shortest distance algorithm third simulation shows the comparison for the shortest
path and the time of arrival between the tangent visibility
Step2: The length of the straight line is chosen in a way that graph and the shortest distance algorithms for different
satisfies the collision-free path. target locations.

Step3: The digital differential analyzer algorithm is used to


compute the straight line trajectories from source to target.

Step4: The digital differential analyzer algorithm is used for


computing the arc trajectory at each path from source to
target. The complete trajectories after modification are
shown in Fig. 5.a.

C. Dijkstra’s shortest path algorithm


This section describes the way of searching for the shortest
trajectory. Dijkstra's algorithm is used to solve the problem of
the shortest path from robot location to target. The algorithm (a)
finds the shortest path from a single source node to a single
target node in the graph and stops the search when the shortest
path has been determined. The steps implementing this
algorithm are as follows:

Step 1: Label each path to each node on the graph with a


distance equal to infinity.

Step 2: At the beginning, the current node is the starting


point with a distance equal to zero.

Step 3: The distance between any unvisited node and the


current node is updated by computing the sum of the (b)
distance between them. Label with blue color, as shown in Fig. 5 The shortest distance of tangent graph (a)shortest distance algorithm (b)
Fig.5.b the edges of a path which is found to be shorter than Dijkstra Algorithm
the previously selected path.
Simulations for the paths from source to target are shown in
Step 4: Labeled the current node as visited and select the Fig. 6. The speed of robot is chosen to be equal to 80 pixels/s.
unvisited node which has the shortest distance as the current Fig. 6.a shows the use of the tangent visibility graph to
node. construct these paths. Fig. 6.b shows the use of the shortest
distance algorithm to modify the paths from source to target.
Step 5: Continue this process of updating the neighboring From the results of the first simulation between two algorithms,
nodes until the target is marked as visited. Once you have we found that they are smooth and collision-free, have a good
marked the target as visited the shortest path (the bold red angle of orientation, and produce the shortest path to the goal,
path in Fig.5.b) is determined. but the tangent visibility graph has more paths from source to
target.
(a) (a)

(b) (b)

Fig.6. The trajectories from source to target. (a)The tangent visibility graph Fig.7. The shortest path from source to target. (a) The tangent visible graph
algorithm (b) The shortest distance algorithm algorithm (b) The shortest distance algorithm

Fig.7 shows the simulations to search for the shortest path The last simulation (Fig. 8) shows that the tangent visibility
by using Dijkstra algorithm in both the tangent visibility graph graph algorithm (Fig.8 a) has a shortest path with some pixels
algorithm (Fig.7 a) and the shortest distance algorithm (Fig. and a less time of arrival with some milliseconds from the
7b). The shortest distance algorithm has a less number of paths shortest distance algorithm in all the cases of the target
from source to target, but its shortest path to the target is locations.
slightly longer than the shortest path of the tangent visible
graph algorithm.
VI. CONCLUSIONS
In this paper, the path planning of mobile robot using the
shortest distance algorithm is introduced. This algorithm has
been briefly defined and the simulation results for comparison
between it and the tangent visibility graph algorithm have been
presented. Both the discussed algorithms provide smooth and
collision-free trajectories. It can be observed that the shortest
distance algorithm produces a less complex tree of paths which
means that requires less computational efforts to construct the
paths. That means, the shortest distance algorithm requires a
lees computation time than the tangent visibility graph to search
for the shortest path. On another hand, this algorithm may
produce a slightly longer shortest path and a slightly longer
time of arrival compared to the tangent visibility graph.
The shortest distance algorithm in this paper is applied to a
robot with differential-drive constraints, but it can be also
applied to other kinematic systems, which have similar
kinematic constraints. In this paper, the implementation of the
(a) shortest distance algorithm considers the only two-dimensional
plane, but it can be improved to three-dimensional space.

REFERENCES
[1] Z. Y. Ibrahim, A. T. Rashid and A. F. Marhoon, ―An algorithm for Path
planning with polygon obstacles avoidance based on the virtual circle
tangents‖, Iraq J. Electrical and Electronic Engineering, Vol.12 No.2 , 20 1 6.
(a) [2] T. L. Perez and M.A. Wesley, ―An algorithm for Planning Collision-free
Paths among Polyhedral Obstacles‖ , Communications of the ACM, Vol. 22
No.10, 1979.
[3] T. L. Perez, ―Automatic Planning of Manipulator Transfer Movements ―,
IEEE Trans. on SMC, Vol. SMC-11, 1981.
[4] L. Cesari, Optimization—Theory and Applications: Problems with
Ordinary Differential Equations. New York: Springer-Verlag, 1983.
[5] C. Alexopolous and P. M. Griffin, ―Path planning for a mobile robot,‖
IEEE Trans. Syst., Man, Cybern., vol. 22, pp. 318–322, 1992.
[6] A. T. Rashid, A. A. Ali, M. Frasca and L. Fortuna, " Path planning with
obstacle avoidance based on visibility binary tree algorithm," Robotics and
Autonomous Systems, vol. 61, pp. 1440–1449, 2013.
[7] Y. H. Liu and S. Arimoto, ―Finding the Shortest Path of a Disc Among
Polygonal Obstacles Using a Radius-Independent Graph,‖ IEEE Transactions
(b) on Robotics and Automation. vol. 11, pp. 682-691, 1995.
Fig.8. Comparison of the performance in different target locations. [8] 0. Takahashi and R. J. Schiling, ―Motion planning in a plane using
(a) The tangent visible graph algorithm (b) The shortest distance generalized Voronoi diagrams,‖ IEEE Trans. Robot. Automat. vol. 6, no. 2, pp.
algorithm 143-150, 1989.
[9] A. T. Rashid, A. A. Ali, M. Frasca and L. Fortuna, " An algorithm for
Table 1. Performance on a scenario with different target locations for both multi-robot collision-free navigation based on shortest distance", Robotics and
the tangent visible graph and the shortest distance algorithms Autonomous Systems, vol. 75, pp. 119–128 , 2016.
[10] J. Borenstein, H. R. Everett, L. Feng, Where am I, Systems and Methods
Target The tangent visible The shortest distance for Mobile Robot Positioning, University of Michigan, 1996.
location graph algorithm algorithm [11] F. V. Mayorov, Digital Differential Analyzers, London: Iliffe Books Ltd,
(Pixels) 1964.
The Time of The shortest Time of
[12] Z. Y. Ibrahim, A. T. Rashid and A. F. Marhoon, ― Prediction-Based Path
shortest arrival path arrival
Planning with Obstacle Avoidance in Dynamic Target Environment‖,Basrah
path (Sec) (Pixels) (Sec)
Journal for Engineering Sciences, vol. 16, no. 2, 2016.
(Pixels)
[13] A. T. Rashid, A. A. Ali, M. Frasca and L. Fortuna, "Multi-robot collision-
(270, 560) 270 3.375 281 3.513 free navigation based on reciprocal orientation," Robotics and Autonomous
(560, 480) 500 6.25 506 6.325 Systems, vol.60, pp.1221-1230, 2012.

(710, 320) 630 7.875 633 7.913


(600, 40) 574 7.175 577 7.213

View publication stats

You might also like