Content uploaded by Jane Alam Sagor
Author content
All content in this area was uploaded by Jane Alam Sagor on Jun 25, 2021
Content may be subject to copyright.
Comparison of Two SLAM Algorithms Provided by
ROS (Robot Operating System)
Ayoade Femi Olalekan
Department of Robotics
Digitech Robotics
Lagos, Nigeria
hezek94@gmail.com
Jane Alam Sagor
Department of Systems
Teton Private Limited
Dhaka, Bangladesh
Janealam.lpu@gmail.com
Md Hasibul Hasan
Department of EEE
Lovely Professional University
Phagwara, India
h.hasan8119114@gmail.com
Adekunle Samuel Oluwatobi
Department of Robotics
Tizeti Network Limited
Lagos, Nigeria
oluwatobitobgre@gmail.com
Abstract—Navigation of the mobile Robot is one of the salient
aspects of robotics. For a robot to navigate successfully in an
environment, a robot needs a map of that environment.
Simulation Localization and Mapping (SLAM) is a versatile
mapping method that can be used for mapping. This paper
investigates two of the SLAM algorithms provided on an open-
source framework called the Robotic Operating System (ROS)
with other software (RVIZ and Gazebo). This paper aims to
compare the result of the two SLAM algorithms (Hector SLAM,
GMapping) in terms of map accuracy and the average time taken
for the Waffle Pi (robot model) to reach its various destinations
in an unknown indoor environment. The distinctiveness of this
paper lies in the evaluation of map qualities with respect to the
time taken by the Waffle Pi robot to navigate through the
Gazebo world environments where dynamic obstacles were
introduced.
Keywords—SLAM, ROS, Robot Model, Mapping, GMapping
I. INTRODUCTION
The field of robotics has improved dramatically over time,
and several researches have been conducted to improve the
efficiency of robots. Part of this development is the
autonomous navigation of mobile robots. GPS (global
positioning system) is one of the most essential tools used in
the navigation of mobile robots; however, there are a few
problems associated with the use of GPS to achieve navigation.
Issues such as obstruction from trees shed and, houses make it
difficult for smooth communication between the GPS and the
robots. To curtail this problem, SLAM algorithms were
introduced. SLAM enables the robot to be aware of its present
position and acclimatize with its environment. However,
SLAM is creating more difficulties such as noise which affects
loop closure and data association. This paper is aimed to
compare two different ROS provided algorithm (Hector SLAM
and GMapping) to examining their compliance by using
parameters to evaluate them in different environments.
II. RELATIVE WORKS
In research work [1] the author inspects the SLAM of
autonomous guided vehicles by using two different SLAM
algorithms available on ROS, in order to show a sample system
for guided vehicles. The quality of the map generated by each
SLAM algorithm was examined and measured how precise the
robot was when navigating using a different map generated by
these two algorithms. In [2], researchers developed a mobile
robot based on ROS. The Bayesian algorithm was utilized in
creating grid maps, and AMCL (Adaptive Monte Carlo
Localization) was employed to estimate the position of the
robots. During this autonomous navigation, ROS served as a
platform to track and to evaluate the mobility of the robots
using SLAM. In [3], another group of researcher presented a
mobile robot that can navigate a familiar environment by
obtaining relevant resources from the Cloud. The primary
objective of the work was to increase the robots efficiency
ability and development of an algorithm that will result in
successful navigation. In [4], an algorithm was proposed;
Extended Particles aided Unscented Kalman Filter for self-
driving car localization. This paper is a review to tackle a
formerly proposed algorithm that has limitations of navigation
in a real-life environment. Also, a 3D algorithm was
implemented, which made it better in-term of applicability. In
another work, researchers evaluated a SLAM algorithm that
was provided by ROS for 2D navigation in real-world as well
as simulation. The algorithms were used based on Fast SLAM,
Hector SLAM and GMapping [5]. This research paper
discussed the limitation of each technique and its robustness. In
paper [6], researchers use GMapping techniques for indoor
mapping by conducting three different trials. This aims to
investigate the significant effect of SLAM related parameters
such as the speed of the robots, delay in mapping and map
quality of the particle filter techniques used to get an accurate
map. The best speed at which the robot can move when
creating mapping and particle filter was also evaluated. In
paper [7], the author presented a way to tackle technical
challenges faced by multi-functional navigation robots in a
manufacturing environment or factory. The project addressed
the problem by enabling the robot to identify marks on the
floor of a factory or a manufacturing environment and the
robot was able to avoid obstacles in its parts when moving to
various destinations. In [8], this paper also proposed an
evolutionary fuzzy control for robot navigation and obstruction
avoidance in an unknown outdoor environment using a
2021 2nd International Conference for Emerging Technology (INCET)
Belgaum, India. May 21-23, 2021
978-1-7281-7029-9/21/$31.00 ©2021 IEEE
1
navigation scheme which was either tested through simulation
or was evaluated through experimentation and simulation. In
paper [9], several SLAM algorithms ( EKF, Fast SLAM and
Graph mapping) were tested on a random controlled vehicle
which covered practical and theoretical examination of each
technique and was found that Fast SLAM gave the most
accurate and best output than any other approaches. In [10], the
author checks the adaptability of a robot whose navigation
depends on SLAM GMapping techniques. It was used in
creating the maps, and the map quality was evaluated in an
unknown environment. This paper [11], reviews the related
works by evaluating the adaptability, durability, and
acceptability of the representation of long-time mapping. Also,
discussed other emerging SLAM technological innovations. It
serves as a tutorial paper for those using SLAM. The article
[12], presents a comparative study of mobile robot trajectory
by using a conventional office environment to experiment. This
made use of 2D-Lidar-based SLAM techniques and Monocular
Camera-based SLAM techniques.
We evaluate the robustness of each SLAM algorithm in a
complex and large environment, by estimating the average time
taken by the robot to reach its various destinations; along with
the estimated time taken for the robot to reach each destination
where dynamic obstacles were introduced also measured
III. SYSTEM
For this study, an open-source robotic middle-ware known
as ROS (Robot Operating System) was used. Basically, ROS
provided libraries are used in this project. Since the
introduction of ROS, robotic programs and development have
become more flexible and convenient. With ROS, it is possible
to get hardware abstraction of a robot such as waffle pi
autonomous vehicle employed in this project along with
sensors, motor, and actuators that can be used in navigation
and can be found in ROS inform of URDF, XACRO and
Meshes files. Other open-source software that is used in ROS
is Gazebo and RVIZ. Gazebo is a simulation software that is
used in simulating robot in a virtual environment, which
enables a robotic engineer to create an environment in which a
robot can be simulated. With the help of plug-ins, we introduce
different robot models such as the waffle pi robot that has been
used in this project which can create the environment in the
form of a URDF file, and a simulation of that robot in Gazebo
world is shown in Fig. 1. RVIZ is a simulator that is used for
data visualization of a robot. It displays several data such as
laser scan, map from the map server, and grid display. To
accomplish autonomous navigation of Robot in ROS, RVIZ
made it possible by providing navigation goal and poses
estimation functionalities.
The autonomous robot needs to know its environment
(localization) and must be able to navigate without colliding
with either dynamic or static obstacles in the surroundings
(mapping) when moving from one destination to another. This
is accomplished with the help of SLAM. For this article,
different algorithms can be used for implementing SLAM such
as Karto SLAM, Fast SLAM, Core SLAM, Graphics SLAM,
Hector SLAM, and GMapping, which are all provided by ROS.
But for this paper, only two (GMapping and Hector SLAM) of
the most popular SLAM algorithm were used. GMapping is a
SLAM technique that filters particles to create its map. It is a
filter base algorithm called Rao Blackwellized Particle Filter
(RBPF). Hector SLAM is a SLAM technique that uses
Extended Kalman’s Filters (EKF) to accomplish its task.
Turtle-bot 3 package (waffle pi) is the robot model employed
in this article. It is a two-wheeled mobile robot which
incorporates various sensors such as LIDAR 360, Sonar, and
camera which are used in navigation. The description of the
model robot is shown in Fig. 2.
Fig. 1. Waffle Pi Robot in Gazebo empty world
Fig. 2. Structure of Waffle Pi Robot
IV. METHODOLOGY
We created two different simulation environments on the
Gazebo simulator, and we add the robot model (waffle Pi) to
those simulations that were created. Waffle Pi has sensors that
are responsible for navigation. One of them is a laser scanner
(LIDAR 360) that provides data that is used in creating a map
when implementing the two SLAM techniques on RVIZ. Data
were published to scan topic for the map, to generate and to
visualize it on RVIZ; afterwards, map topic has been activated.
In Fig. 3, RVIZ, Gazebo was launched from their respective
folders.
2
Fig. 3. Waffle Pi Collecting map of the environment
Fig. 4 represents a map generated on RVIZ using
GMapping while Fig. 5 presents a map generated using Hector
SLAM for the first and Second simulated environment. To
generate these maps, the waffle pi robot has moved around the
environment using a Teleoop navigation stack, and to control
the movement keyboard was used. After taking the map for
each of the environments with different SLAM techniques, the
maps were saved as YAML files, and fig. 4 and 5 also
represents the pictures of PGM file type. For the robot to
navigate autonomously, the generated map with each algorithm
was fed to the waffle pi robot. The AMCL uses a probabilistic
localization model that aids the movement of the robot from
one position to another using 2D navigation goal provided by
RVIZ to reach each destination; and 2D pose estimator that
allows the position of the waffle pi robot to be decided within
an environment.
Fig. 4. Map generated with GMapping for both environment.
Fig. 5. Map generated with Hector SLAM for both environment.
Fig. 6 indicates the colour of the line that the Waffle Pi
Robot followed to reach its destination. The destination is
marked with a red arrow on it. The waffle pi robot follows and
transmits itself following the short distance to its destination;
hence, it reroutes itself regularly.
Fig. 6. Waffle Pi Robot follows its destination.
Fig. 7. Node Graph
The node graph for both maps generated using Hector and
GMapping are presented in Fig. 7, which described how topics
were published and subscribed to within different nodes
presented in the graph.
V. RESULT AND DISCUSSION
To check the efficiency of each SLAM algorithms, criteria
such as the map quality during mapping, time is taken for the
robot to navigate and get to its destination for each
environment, were recorded. The time taken was recorded with
five test runs, and the average value was evaluated.
1st trial
2nd trial
3rd trail
51.35
133.77
123.17
51.83
161.95
132.56
52.60
133.83
132.86
51.81
152.11
142.75
57.60
154.65
143.00
Fig. 8. GMapping trails for the first map
1st trail
2nd trail
3rd trail
52.06
138.00
94.00
52.33
136.46
100.65
51.86
133.02
98.50
55.94
141.8
94.00
57.16
146.87
99.06
Fig. 9. Hector SLAM trails for the first map
3
In Fig. 14, the first environment with static obstacles
describe how waffle pi robot navigate from its source to
various destinations, and each of this navigation is carried out
using a map generated by each SLAM algorithm. 1st bar chart
shows the time taken for the robot to reach its destinations for
different trials for maps created with GMapping and Hector
SLAM.
1st trial
2nd trail
3rd trail
24.32
19.90
12.70
22.15
16.93
11.99
29.15
19.59
11.71
17.88
14.52
13.16
19.11
223.60
12.72
Fig. 10. GMapping mapping for the second environment; without obstacles
The second environment is shown in both Fig. 15 and Fig.
16. They describe the navigation of the robot the global cost
map gets updated every time the robot navigates in this
environment, and when new obstacles detected via laser scan
the map gets updated with the help of AMCL, and the robot
reroutes itself to avoid the new obstacles. In both of the figures,
it shows the average time at which the Waffle Pi gets to its
destination.
1st trail
2nd trail
3rd trail
14.49
12.00
10.18
21.11
11.50
11.12
18.68
11.74
11.75
22.98
11.85
10.58
11.59
22.77
12.03
Fig. 11. Hector mapping for the second environment; without obstacles
1st trail
2nd trail
3rd trail
19.13
19.79
17.34
17.02
18.54
14.68
14.66
16.99
13.11
19.99
17.97
14.06
17.86
25.29
12.70
Fig. 12. GMapping mapping for the second environment; with obstacles
1st trail
2nd trail
3rd trail
15.7
10.45
11.30
14.35
10.89
10.40
19.9
12.8
11.36
17.17
16.69
10.69
22.18
10.91
10.91
Fig. 13. Hector mapping for the second environment; with obstacles.
Fig. 14. The first environment with static obstacle only
VI. CONCLUSION
The implication of our outcomes was as expected, and
possible improvements are pointed out. The map we are
created using each algorithm on RVIZ and Gazebo, the same
were used for navigation of the robot to 3 different destinations
for each were carried out for five trials. And the average value
of each test was used to plot graphs of various destinations
concerning the time, illustrated in the 2nd bar chart.
It was observed that the map created using GMapping is
more accurate than that of Hector SLAM because manoeuvring
of waffle pi robot especially when moving at high speed tend to
distort the map which was not experienced while using
GMapping. However, before navigation, it is required to set the
position of the Robot on RVIZ using pose estimator in the case
of GMapping while it was not required in Hector SLAM.
Hence, if these two challenges can be eradicated, it will
improve the efficiency of both algorithms.
Fig. 15. The graphical representation in the form of a bar chart showing the
time (in seconds) which robot used for travelling. (For maps created
with both algorithms)
4
Fig. 16. The 2nd environment without dynamic obstacles
Fig. 17. The 2nd environment with dynamic obstacles
Fig. 18. The graphical representation of the map simulation data.
Another aspect witnessed was, when the distance travelled
and the time required was less, there was no notable difference.
However, as distance and time of operation rises, a clear
distinction between both is observed. Although the map quality
of GMapping is relatively better (Fig. 4) than Hector mapping,
but the overall robustness of Hector SLAM is greater than
GMapping. The result in Fig. 18 was in accordance with the
report of the robustness of Hector in comparison with
GMapping.
ACKNOWLEDGMENT
We are grateful for the success of this project to those who
made it possible for us to accomplish this task.
REFERENCES
[1] G. Eason, B. Noble, and I.N. Sneddon, “On certain integrals of
Lipschitz-Hankel type involving products of Bessel functions,” Phil.
Trans. Roy. Soc. London, vol. A247, pp. 529-551, April 1955.
(References)
[2] M. L. bin Hamdan and S. S. Hussen Hajjaj, “Programing a Mobile
Robot to Navigate a Known Area Utilizing Resources from the Cloud,”
International Journal of Applied Engineering Research, vol. 13, no. 3,
pp. 5348-5353, 2018
[3] L. Ming and K. Byeongwoo, “Extended Particle-Aided Unscented
Kalman Filter Based on Self-Driving Car Localization,” Applied
Sciences, vol. 10, no. 15, p. 5045, 22 July 2020.I.S. Jacobs and CP Bean,
“Fine particles, thin films, and exchange anisotropy,” in Magnetism, vol.
III, G.T. Rado, and H. Suhl, Eds. New York: Academic, 1963, pp. 271-
350.
[4] A. Zhen, H. Lina, L. Yu, and D. Li, “Development of Mobile Robot
SLAM Based on ROS,” International Journal of Mechanical
Engineering and Robotics Research, vol. 5, pp. 47-51, 2016.
[5] M. S. Jolio, P. David and R. P. Rui, “An Evaluation of 2D SLAM
Techniques Available in Robot Operating System,” IEEE, Vols. 978-1-
4799-0880, pp. 1-6, 2013.
[6] N. WAS, H. Hawari, and K.Kamarudin, “Analysis of Mobile Robot
Indoor Mapping using GMapping Based SLAM with Different
Parameter,” IOP Conference Series: Material Science and Engineering,
vol. 705, p. 012037, 2019.
[7] H. Suman, O. M. Niall, H. V. Gustavo, C. Sean, R. Daniel, and W.
Joseph, “Autonomous Navigation of mobile robots in a factory
environment,” Elsevier BV, vol. 38, no. 29, pp. 1524-1531, 2020.
[8] C. Ching-Yu and J. Chia-Feng, “Navigation of an Autonomous Wheeled
Robot in Unknown Environment Based on Evolutionary Fuzzy
Control,” invention, vol. 3, no. 1, pp. 1-14, 2018
[9] A. o. O. N. Johan, “Implementation of SLAM algorithm in a small scale
vehicle using model-based development,” EEE department Linkoping
University, Linkoping, 2017.
[10] M M. k. Rajesh, T. R. Chinta, S. Sarath and R. Akhil, “ROS based
Autonomous Indoor Navigation Simulation Using SLAM ALgorithm”
International Journal of Pure and Applied Mathematics, vol. 118, no. 7,
pp. 199-205, 2018.
[11] F. Maksim and A. Ilya, “Comparison of various SLAM Systems for
Mobile Robot in an Indoor Environment,” in IEEE, Madeira, Portugal,
2018.
[12] C. Cesar, C. Luca, C. Henry, L. Yasir, S. Davide, N. Jose, R. Ian and L.
J. John, “Past, Present, and Future of Simultaneous Localization and
Mapping: Toward the Robust-Perception Age,” IEEE, pp. 1309-1332,
2016.
5