R Be 550 Motion Planning Project
R Be 550 Motion Planning Project
R Be 550 Motion Planning Project
I. I NTRODUCTION
Page 2 of 8
(2) A* Algorithm
A* search is a method of search in which the planner decides
the steps based on the cost of movement and with a sense
of direction towards the goal state. Each step is decided by
a function that is the sum of the cost + heuristic, where the
heuristic is the distance/direction measure to the goal from
that point. To achieve this, the algorithm uses a priority queue
data structure. It is planning ahead at each step to ensure that
the goal is reached optimally. A solved example using the A*
algorithm is displayed in Fig. 6. The cost for the displayed
maze using A* was evaluated to be 3228 units and the time
taken for the algorithm was 0.212 seconds. (a) (1,99) to (99,1), 30% Obstacles (b) (1,1) to (51,99), 20% Obstacles
Figure 7: Dijkstra’s Algorithm Results
node. As the frontier expands, neighboring nodes are added to to explore the space and generate a path.
the OPEN list, and their g(x) scores are calculated and updated. • Path Length - the total number of nodes on the generated
sense of ”direction” towards the goal. Two example Dijkstra’s by the algorithm before termination.
algorithm solutions are shown in Fig. 7. The length of the first • Visited Cells vs. Time - the rate of progression of
example - Fig. 7a - is 203 nodes, with a computational time exploration of each algorithm.
of 1.556 seconds. The length of the second example - Fig. 7b The BFS, Dijkstra’s, A*, and PRM algorithms were analyzed
- is 149 nodes, with a computational time of 1.177 seconds. and compared against these metrics utilizing the framework
Page 3 of 8
established in Section V-A. The results of this analysis are
explored in Section VI.
V. S IMULATION E NVIRONMENT
A. RVIZ and ROS Framework
In order to compare the key performance metrics of the
various motion planning algorithms, a comprehensive ROS
framework was developed to run each algorithm on a sample Figure 10: Binary Floorplan Representation
floor plan, shown in Fig. 8 [14].
Page 4 of 8
obstacles like tables, pillars, etc. as shown in Fig. 13. The
simulated environment closely equates to a static real-world
setting that provides a good benchmark to test and compare
the various motion planning algorithms.
The algorithms are tested by implementing them on the
TurtleBot3 available in ROS and Gazebo. TurtleBot3 is a
new generation mobile robot that is modular, concise, and
customizable. The start and the goal position of the Turtlebot
is decided, based on the selected algorithm the Turtlebot
navigates in this indoor static environment as shown in Fig.
12. To generate a graphical visualization of the generated path
we used Open-CV. A real-world version of the robot is shown
in Fig. 14 [13]. The simulated TurtleBot3 is shown in Fig. 13
at the center as a black object with a green box around it. Figure 14: TurtleBot3
A. General Results
In Figures 15, 16, and 17, the results of three path finding
queries for BFS, Dijkstra’s Algorithm, and A* are shown. The
visited cells are shown in white, and the path is shown in pink.
In Fig. 18, the same three scenarios are demonstrated for PRM,
with the tree shown in white, the path shown in pink, and
the visited cells shown in green. The three scenarios were:
(1) Bathroom to Bedroom, (2) Kitchen to Bathroom, and (3)
Closet to Kitchen.
Figure 12: Path generated in by A* Algorithm
Figure 13: Indoor Testing Environment simulated in Gazebo Figure 17: A* Results
Page 5 of 8
because PRM represents only a portion of the C-Space in its
tree. BFS and Dijkstra’s, which are not strategic in their choice
of frontier nodes, share a similar number of nodes visited. The
A* algorithm has a reduction of nodes visited compared to
BFS and Dijkstra’s - between 59 and 72 percent - which can
be attributed to its heuristic and sense of direction towards the
goal. This is also observable in Fig. 17, where you can see
the targeted expansion of the A* algorithm.
The final metric reported from the three scenarios is Path
Length. In each trial BFS reported the lowest path length
Figure 18: PRM Results between the start and the goal node, while A* and Dijkstra’s
algorithm reported higher costs. This may in part be due to
B. Key Metrics a limitation in the implementation of these two algorithms,
Computational time, path length, and nodes visited for each which only searched the 4 connected neighbors of each cell,
path planning algorithm were recorded for each scenario. Note rather than the 8, which produce a shorter path. BFS will
that for the PRM algorithm - the computation time reflected consistently produce the optimal path in the environment. The
does not include the time cost to construct the tree. These PRM algorithm however, which was run using 100 nodes
times were 178.28 s, 221.08 s, and 295.34 s for each scenario. with 6 connections each, is not likely to return the optimal
In each scenario the tree consisted of 100 nodes with 6 path. This is reflected in the Path Lengths data for all three
connections each. The metric comparison results are shown scenarios, in which PRM produced paths between 42 and 175
in Tables I, II, and III. nodes longer than the optimal BFS path.
These metrics and their impact on mobile indoor robots are
Algorithm Computational Time (s) Path Length Nodes Visited
BFS 0.09 99 6096 discussed further in Section VII.
Dijkstra 37.59 140 7162 C. Rate of Exploration
A* 7.86 140 1730
PRM 3.36 274 1000 The rate of exploration of each algorithm was also measured
and calculated in order to compare their application to indoor
Table I: Scenario 1 Metrics
mobile robots. The rate of exploration is defined as the rate at
which the algorithm visits and evaluates nodes in the graph -
Algorithm Computational Time (s) Path Length Nodes Visited units are nodes/second. At each iteration of the algorithm the
BFS 0.16 147 9066
Dijkstra 56.91 204 9352
time and the overall number of visited nodes were recorded.
A* 17.9 204 3428 These results were graphed and used to find the rate of
PRM 4.56 238 1101 exploration. Fig. 19, 20, 21 show these values, which are also
Table II: Scenario 2 Metrics captured in Table IV.
Page 6 of 8
• Authorship of section III.
• Demo video
Akash Krishnagiri Sridharan
• Implementation of the BFS A* Algorithms
• Visualization using the PIL
• Gazebo Simulation Environment
• Authorship of Sections I, IV A1, IV B1, IV B3, V B
VIII.
Figure 21: Rate of Exploration Scenario 3 • Powerpoint Slides: Introduction, PIL, BFS, A*, Software
Platform, Simulation Environment
• Demo video
Algorithm Rate Scenario 1 Rate Scenario 2 Rate Scenario 3
BFS 63773 56318 57653 Eleanor Foltan
Dijkstra 192.31 165.2 185.6 • Implementation of Dijkstra’s Algorithm.
A* 211.08 187.1 203.23
• Implementation of PRM tree construction, and PRM tree
PRM 296.18 244.35 258.91
search algorithms (utilizes Akash’s A* code)
Table IV: Rate of Exploration by Algorithm • Created ROSpy structure, adapted BFS, Dijkstra’s, A*,
and PRM algorithms to work in ROS/RVIZ.
From these graphs, the progression exploration rate is clear - • Created results node to display all relevant metrics and
BFS achieves the quickest exploration rate, followed by PRM, write .csv file of graphical data.
A*, and Dijkstra’s algorithm. • Generated data for algorithm comparison for report (Sec-
Page 7 of 8
[10] ”ROS Tutorials.” ROS.org. http://wiki.ros.org/ROS/Tutorials. [Accessed
22 Mar. 2021].
[11] ”rviz.” ROS.org. http://wiki.ros.org/rviz. [Accessed 22 Mar. 2021].
[12] Liu, Y.F.; Qiu, Y.H. Robot path planning based on genetic algorithms
with two-layer encoding. Control Theory Appl. 2000, 17, 429–432
[13] https://www.roscomponents.com/en/mobile-robots/214-turtlebot-
3.html/courses-no
[14] ”Floor Plan Services.” RoomSketcher. https://www.roomsketcher.com/
floor-plan-services/ (accessed Apr. 26, 2021).
[15] ”Robotis e-Manual: TurtleBot 3 Specifications.” ROBOTIS.
https://emanual.robotis.com/docs/en/platform/turtlebot3/features/
#specifications (accessed Apr. 27, 2021).
[16] ”The Rustica Blog: Standard Door Size — Standard Door Height
and Width.” Rustica. https://rustica.com/standard-door-sizes/#:∼:
text=In%20both%20commercial%20buildings%20and,between%2028%
20and%2032%20inches (Accessed Apr. 27, 2021).
A PPENDIX
Page 8 of 8