See discussions, stats, and author profiles for this publication at: https://www.researchgate.
net/publication/336056468
Particle Filter-based Localization of a Mobile Robot by Using a Single Lidar
Sensor under SLAM in ROS Environment
Conference Paper · September 2019
DOI: 10.23919/ICCAS47443.2019.8971555
CITATIONS READS
25 2,289
2 authors:
Dhruv Talwar Seul Jung
Indian Institute of Technology Delhi Chungnam National University
3 PUBLICATIONS 40 CITATIONS 344 PUBLICATIONS 3,982 CITATIONS
SEE PROFILE SEE PROFILE
All content following this page was uploaded by Dhruv Talwar on 26 September 2019.
The user has requested enhancement of the downloaded file.
2019 19th International Conference on Control, Automation and Systems (ICCAS 2019)
Oct. 15~18, 2019; ICC Jeju, Jeju, Korea
Particle Filter-based Localization of a Mobile Robot by Using a Single Lidar Sensor under
SLAM in ROS Environment
Dhruv Talwar1 and Seul Jung2*
1
Department of Mechanical Engineering, IIT Delhi,
Delhi, India ( [email protected])
2
Department of Mechatronics Engineering, Chungnam National University,
Daejeon, 34134, Korea ([email protected]) * Corresponding author
Abstract: One of the most popular issues in autonomous mobile robots is mapping, localizing and autonomous
navigation. In this paper, Adaptive Monte Carlo Localization (AMCL) as particle filters method is presented to show
how effectively it localizes the mobile robot in an indoor environment. During the simulations, the robot is localized
and autonomously navigates in Gazebo and Rviz environment. The simulation results demonstrated that the particles in
the filter quickly converge on the pose and the robot was successfully able to follow the path to reach its goal position.
Simulations for a mobile robot to be localized in two different environments, static and dynamic, were carried out. The
robot was successful in reaching its goal every time. Simulation results thus point out that AMCL performed effectively
in these environments.
Keywords: ROS, localization, autonomous driving, AMCL, SLAM.
1. INTRODUCTION work has been done on this recent technique Fast-Slam.
Montemerlo et al. proposed a FastSLAM2.0 algorithm
With a rapid development in the field of mobile which gives more weightage to the most recent
robots, it is now required of the upcoming mobile robots measurement in the process of pose estimation [5].
to have the capability of mapping and localization. The Perez et al. compared the performance of localization
robot cannot take any decisions and actions on its own for a mobile robot based on different sensors like vision
without knowing the current pose and orientation. systems and laser rangefinders [6]. They calculated the
Localization of the mobile robot in an environment precision of the different localizations and compared
plays a vital role to solve autonomous navigation. them saying that a laser scanner is a more robust
SLAM is the main goal for a robot to acquire the solution than vision systems.
map of the unknown environment while simultaneously Motivated by the AMCL algorithm, in this paper, a
the robot’s pose in the map is localized. SLAM is a robot in a simulated environment is localized. Once an
necessity to achieve obstacle avoidance in global and occupancy grid or map of the environment is formed the
local path planning and ultimately autonomous pose and orientation of the robot in the reference map
navigation. frame are obtained. For this task, it is assumed that a
In the last years, a lot of progress has been made single lidar sensor is used to implement SLAM in ROS
with SLAM and a lot of its challenging tasks have been environment. Simulation studies for static and dynamic
tackled including computation complexity, data environments are conducted.
association and loop closure in a single robot.
Grisetti et al. presented many innovative methods to
reduce the number of particles in the Rao-Blackwellized
2. ROS & ENVIRONMENT
particle filter [1]. This algorithm takes in account the 2.1 ROS
movement as well as the sensor updates to get the Robot Operating System (ROS) is a Linux based
distribution of the robot in an environment. Imthiyas software and has many prebuilt libraries and packages
presented indoor localization by collecting large data which can be modified and changed accordingly to
sets from the indoor environment and producing a build robot functions’ framework, where it used nodes,
Gaussian Process(GP) model [2]. Dieter Fox proposed packages, messages topic and services [7]. Any
the Kullback-Leibler distance sampling(KLD sampling) executable code which takes data from any of the
which uses a small number of samples to represent the robot’s sensor and passes the same or the output value to
belief of the robot [3]. It generated samples until the another code is termed as a ROS Node. The ROS
number of particles is enough to guarantee that the KL system is like a send and receive system of the data
distance between the robot’s actual position and the from the sensors, which are called messages are sent to
estimate does not exceed a certain bound error. This nodes from ports called as topics. A node that sends
technique uses an adaptive statistical method based on messages on a topic is called a publisher node and the
particle filters. node which subscribe to the messages sent via another
A new development in autonomous navigation and topic is termed as the subscriber node. All nodes are
SLAM is the Fast-Slam where a particle filter is used combined in a ROS package which can very easily be
and the paths for the robot and data associations are now combined on any Linux software with ROS installed
represented as samples for the particle filter [4]. Much [8].
2.2 System environment The algorithm can be folded into 2 steps: motion
For the experiments conducted in Simulation we movement and sensor update and resampling process. In
used Ubuntu 16.6 and ROS Kinetic version. For the this algorithm the robot’s pose is represented by a belief
real-life simulation, we used Ubuntu 14.04 and ROS factor (Xt). Initially, all the particles have equal weight
Indigo. (wt) and the belief state are estimated by randomly
The Lidar used here was the Hokuyo generating N particles. The Algorithm takes into
URG-04LX-UG01. The Laser beam diameter is less consideration of the previous belief state values Xt-1, the
than 20mm at 2000mm with maximum divergence movement command Vt, and the sensor measurement St
40mm at 4000mm [9]. Table I lists the specifications of as the initial starting input.
the lidar sensor. In the first iteration of the AMCL algorithm, a
hypothetical state is calculated as the initial position of
Table I Lidar sensor specifications the robot. As the robot’s position is updated the laser
Parameter Value scanner sends different and updated measurements to
Light Source Infrared the ROS nodes. Using these measurements, the
Wavelength 785nm particles’ weight is recalculated. The result of this
Scan Area 240° iteration is added to the previous belief state and thus a
Maximum Radius 4000mm new belief state which corresponds to the location of the
Pitch Angle 0.36° robot is obtained.
In the other part of the algorithm, resampling of the
particles is done, as each belief state has a weight value
3. AMCL associated with it, after each resampling iteration the
particles that have a high weight value survive and are
The adaptive Monte Carlo approach uses particles to then used in the next iteration while those particles with
localize the robot. These particles have their own a low weight value perish during the resampling. If this
coordinate and orientation values just like the actual continues the number of particles in the filter will
robot along with a given weight. The weight value reduce drastically after a few iterations which can give
(w t) is defined as the absolute difference between the inaccurate localization results. To avoid this, the
actual pose of the robot and the predicted pose by that particles with large weights are resampled into many
specific particle. The bigger or larger the weight of the particles with equal weights by restoring the number of
particle the more accurately it defines the pose of the particles in the filter. Finally, the algorithm estimates the
robot. position of the robot by calculating the belief state with
Whenever the robot moves in the environment and the new sensor measurements.
gives new sensor data the particles are re-sampled. With
each re-sample, particles that have low weights perish
and the particles with high weights survive. After many 4. SIMULATION STUDIES
iterations of the AMCL algorithm, the particles will
converge and evaluate an approximate of the robot’s 4.1 Simulation environment
pose. Therefore, this algorithm estimates the robot’s To check the functioning of the AMCL algorithm,
orientation and position based on the sensor’s input [10]. the simulations using a differential drive mobile robot
Table II shows the pseudocode for AMCL algorithm. model were done in Gazebo and RVIZ. The navigation
stack in ROS was used. To create a mobile robot, a
Table II AMCL Algorithm Unified Robot Description Format (URDF) file is made.
The URDF file defines the shape, color, origin, inertial
1: procedure AMCL(xt-1, vt, st) and collision properties of the robot.
The big advantage of ROS is the prebuilt plugins for
2: Xt ← φ
the sensors. A simple camera sensor and a Hokuyo laser
3: for n =1 to N loop: finder can be added to the robot model. Two cases of
4: x t[n] ← Motion Update(vt, x t-1[n]) simulations have been carried out in two different
environments: static and dynamic environment.
5: w t[n] ← Sensor Update (st, x t [n])
6: Xt ← Xt + < x t [n],w t [n]>
7: end for
8: for n=1 to N loop:
9: draw x t [n] with probability ∝ w t[n]
10: Xt ← (Xt + xt )
11: end for
12: return Xt
(a) Static (b) Dynamic
Fig. 1. Gazebo environment
In the static environment, obstacles are fixed while
the robot is moving as shown in Fig.1 (a). In the
dynamic environment, meanwhile, one obstacle is added
to the static environment while the robot is moving as
shown in Fig.1 (b). This is aimed to see the dynamic
path planning to avoid the collision with obstacles in
real time.
4.2 Simulation results
The ROS navigation stack generates the global and (e) (f)
local path for the robot to follow. The robot will be able Fig. 2. Static environment
to follow and reach the goal only if its localization in
the map is accurate. We can simulate two different cases CASE II: Dynamic environment
of the path generated into two different scenarios. This is the case when we suddenly introduce an
obstacle in the path of the robot while the robot is
CASE I: Static environment moving. The aim of this experiment is to localize the
When the whole map is stationary, there is no robot in the environment with the changes. Simulations
movement of obstacles. In this case the global path that were carried out to see if the localization of the robot
is formed will not change and the local path will follow was accurate enough to guide itself from the obstacle
the global path quite closely. which is not present on the global map. The result
Fig. 2 shows the navigation in the static shows that the path planning algorithm now calculates
environment. Fig. 2 (a) shows the initial position, (b) an alternative global path and again the local path
goal point given to the bot. The robot now follows the follows the global path as shown in Fig. 3
global path. Fig. 2 (c), (d), and (e) show that the global
planner forms the shortest trajectory from the initial
point to the goal using the static map. While cornering
sometimes it comes close to the obstacle, then the local
planner deviates from the global path to avoid it. After
avoiding the obstacle, the robot again returns to follow
the global path, as now the local and global path
coincide. The robot managed to reach the goal point
every time as shown in Fig. 2 (f).
(a) (b)
(a) (b)
(c) (d)
(c) (d)
(e) (f)
the available sources.
ACKNOWLEDGMENT
This work was partially supported by Indo-Korea
JNC program of National Research Foundation of
Korea (NRF-2017K1A3A1A68072072).
(g) (h)
Fig. 3. Dynamic environment REFERENCES
[1] G. Grisetti, C. Stachniss, and W. Burgard,
In Fig.3, each plot is described as follows: “Improved techniques for grid mapping with
(a) Goal point given to the bot. As the global planner rao-blackwellized particle filters,” IEEE Trans.
uses the static map to form a trajectory to the goal Robotics and Automation, vol. 23, no. 1, pp. 34-46,
position. 2007.
(b) The lidar sensor detects an obstacle at some distance. [2] M. P. Imthiyas, “Indoor Environment Mobile
Map update even as the robot moves is taking place Robot Localization”, International Journal on
as the area that was free for the robot will now be Computer Science and Engineering, vol. 2, no.3,
changed to occupied area where the robot cannot pp.714–719, 2010.
go. [3] D. Fox, “Adapting the sample size in particle
(c) The new obstacle’s cost has been updated in the map. filters through KLD-sampling,” The international
The global path will now receive messages Journal of robotics research, vol. 22, no. 12,
simultaneously as the map is being updated using pp.985-1003, 2003.
the current local map. The global planner will now [4] M. Montemerlo and S. Thrun, “FastSLAM: A
again form the shortest path to the goal position by Scalable Method for the Simultaneous
avoiding all the obstacles. The map and the path are Localization and Mapping Problem in Robotics
simultaneously being updated (Springer Tracts in Advanced Robotics)”,
(d) After receiving messages about the map update, the Springer-Verlag, 2007.
global path recalculates the shortest path to the goal [5] M. Montemerlo, S. Thrun, D. Koller, and B.
from the current position of the robot avoiding all Wegbreit, "FastSLAM 2.0: An improved particle
obstacles. The global Path has now changed from filtering algorithm for simultaneous localization
the original one. and mapping that provably converges,"
(e) The robot now follows the new path generated. But International Joint Conference on Artificial
again, the new path goes through an obstacle. So, Intelligence. pp. 1151-1156, 2003
the map and the global path are updated again to [6] Pérez, J.A., Castellanos, J.A., Montiel, J.M.M.,
account for this change. Neira, J. and Tardos, J.D., “Continuous mobile
(f) A new Global path is generated to avoid the obstacle robot localization: Vision vs. laser”, Proceedings
and simultaneously the map is also updated. The of IEEE International Conference on Robotics and
robot now follows this path. Automation, pp. 2917-2923, 1999
(g,h) The bot now easily follows the path to reach its [7] M. Quigley, K. Conley, B. P. Gerkey, J. Faust, T.
goal. Foote, J. Leibs, R. Wheeler, and A. Y. Ng, “ROS:
an open-source Robot Operating System”, ICRA
5. CONCLUSIONS Workshop on Open Source Software, vol.3, no.2
pp.5, 2009.
Adaptive Monte Carlo Localization is a very [8] Zaman, S., Slany, W. and Steinbauer, G.,
effective solution for localizing the robot in a given “ROS-based mapping, localization and
environment. The robot was successfully localized in autonomous navigation using a Pioneer 3-DX
the ROS Gazebo and Rviz environment. The results robot and their relevant issues”, Saudi
clearly show that the particle filter were successfully International Electronics, Communications and
able to converge quickly and were able to give the exact Photonics Conference, pp. 1-5, 2011
pose and orientation of the mobile robot. [9] https://www.hokuyo-aut.jp/search/single.php?seria
Because of the effective implementation of AMCL l=166.
the robot was able to reach a goal in the map within a [10] Das, S., “Robot localization in a mapped
specific time interval. Moreover, the robot was able to environment using Adaptive Monte Carlo
navigate in the map while performing AMCL algorithm algorithm”, https://drive. google. com/open.
in real time, thus the robot was able to localize itself and
find a way around the obstacle even with changes in the
static map. This algorithm along with all the ROS
packages demonstrates that it is very much viable to
realize autonomous navigation on mobile robots using
View publication stats