0% found this document useful (0 votes)
101 views

ROS-based SLAM and Navigation For A Gazebo-Simulated Autonomous Quadrotor

Uploaded by

Davut Can Akbaş
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

ROS-based SLAM and Navigation For A Gazebo-Simulated Autonomous Quadrotor

Uploaded by

Davut Can Akbaş
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

ROS-based SLAM and Navigation for a

Gazebo-Simulated Autonomous Quadrotor


Y. Alborzia , B. Safari Jalala and E. Najafia,b
a
Faculty of Mechanical Engineering, K.N. Toosi University of Technology, Tehran, Iran
b
Mechatronics Department, Fontys University of Applied Sciences, Eindhoven, The Netherlands
2020 21st International Conference on Research and Education in Mechatronics (REM) | 978-1-7281-6224-9/20/$31.00 ©2020 IEEE | DOI: 10.1109/REM49740.2020.9313875

Emails: yusefalborzi@email.kntu.ac.ir; behzad.safari@email.kntu.ac.ir; e.najafi@fontys.nl

Abstract—Effective robot navigation is crucial for the proper struction, photography and agriculture. The growing interest
implementation of a mobile robot. To navigate a robot in an in civilian or commercial UAVs has lead to improvements
indoor or outdoor environment, a map of the surrounding in their functionality and ease of use and has made them
obstacles is required. In order to acquire this map, the robot uses
sensors to collect information about its surroundings and its own more appealing to a wider range of customers. However,
location. This paper presents a robotic operating system based regardless of these improvements, the battery problems still
on autonomous simultaneous localization and mapping (SLAM), persist. Because of the limited payload, most UAVs can not
and robot navigation implementation of a Parrot AR.Drone 2.0 carry large batteries and therefore have a limited flight time.
quadrotor, which is equipped with a laser scanner and inertial With this in mind, navigating the drone to desired goals
measurement unit. For autonomous mapping, SLAM along with
frontier type exploration has been used to acquire a full 2D map efficiently has become an important task [2].
of the environment in Gazebo. The A* search algorithm is utilized In order to navigate the drone through the environment
for the global planner, while the dynamic window approach has safely, at first, Information about the surroundings of the robot
been implemented for the local planner. The Gazebo-simulated is required. The robot needs to know where the obstacles
results validate the competent performance of the underlying are and where it is with respect to the obstacles. Acquiring
structure of both the proposed SLAM as well as the provided
navigation algorithm. information about surrounding obstacles is called “Mapping”
and finding the robot’s state is referred to as ”Localization”. A
I. I NTRODUCTION robot navigating without mapping and localization is similar
The impact of robots on our lives has become indisputable. to a person moving in a completely dark room. And just
Nowadays, there is a robot for almost any task, including the as a human has eyes to observe its surroundings a robot
use of robots in surgery, agriculture and industry. One type requires tools to get feedback from neighboring obstacles. For
of robot getting more and more attention, is unmanned aerial this purpose different sensors are used to find the distance
vehicle (UAV). These are aircraft without a pilot on board between the robot and the obstacles. These include laser scan-
and can be classified depending on their flying mechanisms. ners, ultrasonic sensors and cameras, which naturally require
Generally, they are characterized as fixed-wing, flapping-wing different computation approaches. Furthermore, the process
or rotorcrafts. While fixed-wing UAVs are preferred for fast of mapping the environment can be accomplished manually
data collection in large fields, rotorcrafts are used in conditions or autonomously. The autonomous mapping process is la-
where more precise data acquisition and actions are required beled “Exploration”, in which the robot moves autonomously
or in the case of small, constrained and heterogeneous envi- through its workspace without running into obstacles while
ronments; Because they can hover and are easier to control. simultaneously and progressively creating a map of it. After
The UAVs consist of motors to enable movement, on- the map is acquired, the robot can use it to move safely inside
board computers to control these motors and finally, radio its configuration space.
transmitters for remote controllers or processors to navigate This paper illustrates the deployment and assessment of
autonomously. They are used in both inside and outside an autonomous quadrotor robot using the robotic operating
environments and unlike ground robots, they are not chal- system (ROS) and the Gazebo simulation tool. The robot
lenged by rough terrains, which enables a wide range of autonomously explores the simulated world and creates a
maneuverability [1]. In addition, a top plane view allows a 2D map of it. Then, an efficient navigation technique is
UAV to cover areas that ground robots are not capable of implemented to move the robot towards arbitrary desired goals.
doing. These features have made UAVs popular and they are The results of the simulation are presented and the utilized
employed for more applications. Although initially driven by communication system structure is explained.
the military section, civilian applications have been growing The paper is organized as follows. A short review of differ-
at a faster rate in possible application for surveillance, con- ent mapping, exploration and navigation algorithms is given
in Section II. Section III studies the implemented quadrotor
system structure. Section IV displays the results and finally,
978-1-7281-6224-9/20/$31.00 ©2020 IEEE Section V concludes the paper.

Authorized licensed use limited to: ULAKBIM UASL - Sakarya Universitesi. Downloaded on February 02,2021 at 14:52:18 UTC from IEEE Xplore. Restrictions apply.
II. R ELATED W ORKS decomposition approach the environment is divided into non-
overlapping grids classified as empty or occupied. Connectiv-
This section mainly reviews the related literature in mo- ity between the empty cells, which do not contain obstacles,
bile robot mapping, exploration and navigation. The task of creates a path from the start position to the goal position. There
localization is crucial for an efficient navigation system and have been different variations of this approach such as the
because pure reliance on odometry sensors such as IMU is exact cell decomposition [15], approximate cell decomposition
prone to error, Kalman filters are used to integrate different [16] and adaptive cell decomposition [17], [18]. Moreover, in
sensors for a successful localization [3]. Furthermore, the robot the road map approaches the space between the graph nodes
uses this information of its own state and the information of are represented by curves in which the planner will try to find
the sensors to create a map of the environment simultaneously. the most ideal path. The visibility graph [19] and the voronoi
this process is called simultaneous localization and mapping diagram [20] are examples of this method. Furthermore, APF
(SLAM) [4]. Over the years, several SLAM techniques have methods [21] assign potential values to goal positions and
been developed. Works such as EKF-SLAM [5] use Kalman obstacles, and the total potential leads to an imaginary force
filters to linearize the plant and the measurement model to which moves the robot towards the goal and away from the
compensate for the assumed non-linear Gaussian noise of the obstacles. Applications of this method are discussed in works
system. However, Kalman filter approaches are prone to error such as [22]–[24].
propagation which can cause inconsistency in SLAM. The path search stage consists of finding the optimum
On the other hand, particle filter approaches do not pose paths created in the previous environmental modeling stage.
such challenges. Unlike the linear Kalman filter estimators, Search algorithms for this task include simpler approaches
particle filters do not make assumptions about the noise in such as Dijkstra [25], A* [26] and D* [27] algorithms and
the system. FastSLAM [6] and DP-SLAM [7] are examples also artificial intelligence methods such as genetic algorithms,
of these methods. Particle filter approaches take into account neural networks and particle swarm optimization. The Dijkstra
a large number of samples to estimate the system state by algorithm can find the shortest path between two points by
representing the state variables with a probability density computing the minimum cost required to reach every single
function. Moreover, there have also been approaches that use node that encircles the start node and expanding its path
images to perform SLAM, which are called visual SLAM. towards further nodes until it reaches the goal node. The A*
The Monocular SLAM approach in [8] is an example of this algorithm is based on the Dijkstra algorithm, and it also has
method, which only uses a single camera to create large-scale a heuristic function that takes into account the position of the
consistent maps. goal node as well, which makes this algorithm more efficient
Exploration is the task of commanding the robot to visit in finding the shortest path towards the goal. This heuristic
previously unseen areas with the goal of increasing its knowl- function is usually the Euclidean distance between each node
edge of the workplace and it stands at the core of autonomous and the goal node.
mapping. There have been several approaches to deal with
this problem. Topological methods have been developed that III. S YSTEM S TRUCTURE
describe the environment in graphs, meaning that they do To assess the efficiency of the quadrotor navigation system,
not result in metric measurements such as the work of [9]. this study contains a simulation of a quadrotor implemented in
Furthermore, works such as [10], [11] use potential field the robotic operating system, called ROS. The platform ROS is
methods which can find suitable trajectories by calculating an open source software with innovative communication mod-
the gradient descent of assigned potential values. Moreover, ules and tremendous package management tools. Additionally,
frontier-based exploration was introduced by [12] in which the it is supported by a large community of developers consistently
robot identifies points between the free-space and the unknown providing new packages, and it also supports convenient tools
space and moves towards them to expand the map. Finally, for visualization and simulation such as Gazebo and Rviz.
information gain exploration not only takes into account This section demonstrates the simulation of a Parrot AR.Drone
mapping the environment but also tries to optimize this process 2.0 quadrotor in ROS. The utilized packages and underlying
with maximizing information gain in each step by estimating system communication structure are described in detail.
the number of expected frontier cells. Such an algorithm can
be seen in the work of [13], [14]. A. Model Specification
One of the most important function of robot navigation is In order to simulate a robot in ROS, the physical spec-
finding a safe path from the initial position to the desired ifications and the dynamics of the robot must be defined.
position. The task of robot path planning consists of two The “hector-quadrotor” package is a powerful package for
steps: Environmental modeling and path search algorithm. simulating and controlling a quadrotor in ROS and Gazebo
The environmental modeling is based on the acquired map environments, provided by the “Team Hector” [28]. Since this
of the working space and is a feature information map of package does not use Parrot AR-Drone 2.0 as its simulation
the environment. The approaches for this task include the drone, its model was changed by the URDF drone model
cell decomposition, probabilistic road map, Artificial Potential file provided by the “tum-simulator” package. This drone is
Field (APF) and the rolling window approach. In the cell equipped with an IMU and a 2D laser rangefinder (Hokuyo

Authorized licensed use limited to: ULAKBIM UASL - Sakarya Universitesi. Downloaded on February 02,2021 at 14:52:18 UTC from IEEE Xplore. Restrictions apply.
Fig. 2. Initial state of the robot in the simulated workspace (left), beginning
of the mapping process in the unknown workspace (right)
Fig. 1. Simulated model of the Parrot AR.Drone 2.0 in Gazebo

UTM-30LX), which can be used for the mapping and local- local planner computes appropriate and efficient velocity com-
ization processes, as depicted in Fig. 1). mands for the drone, so it can follow its path towards the
goal while avoiding the dynamic obstacles. The “dwa-local-
B. Localization and Mapping planner” package handles this process by the Dynamic Win-
As mentioned before, SLAM is used to map the environ- dow Approach (DWA) method [32]. Like the earlier mentioned
ment. In this study, The “gmapping” and “amcl” packages packages, the “move-base” package files were also modified
are used for the SLAM process. The “gmapping” package accordingly.
enables us to implement OpenSlam’s Gmapping algorithm in To simplify the control and navigation of the quadrotor, the
the ROS environment. It can learn and create occupancy grid materials used for SLAM, motion planning and robot control,
maps using laser range data in a highly efficient manner based were all two dimensional. The aforementioned packages were
on Rao-Blackwellized particle filters [29]. mostly developed for ground robots and therefore unable to
One of the most efficient and popular probabilistic algo- control the robot’s altitude. To address this problem, a node
rithms for local and global localization of a mobile robot, was written to elevate the drone to a fixed altitude above the
is the Monte-Carlo localization [30]. It uses a particle filter ground at the beginning of the motion. The PID controller
for estimating and tracking the current position of the robot makes sure that the drone will obey the 2D velocity commands
and its orientation in a known map. The “amcl” package provided by the local planner while keeping the drone at the
implements the adaptive (or KLD-sampling) Monte-Carlo lo- fixed altitude.
calization approach. To adapt these packages to our usage, the
files provided by the “gmapping” and “amcl” packages were E. Communication System Structure
modified to correspond to the Parrot AR.Drone 2.0 model.
The underlying relationships between the various nodes and
C. Exploration packages has been demonstrated in Fig. 4. A number of the
Initially, the robot knows nothing about its environment more critical parts of this graph are described below:
except the area around its current position covered by its • At first, the “move up” node elevates the robot to a fixed
laser rangefinder, as shown in Fig. 2. By using the imple- altitude by publishing to the “/action/pose/goal” topic.
mented “slam-gmapping” package, the robot starts to map • The “/slam gmapping” node creates the map by publish-
the surrounding area. Then, to extend the created map, the ing the “/map” topic, using “/scan” and “/tf” topics, which
robot should start moving towards the unknown area, until
the workspace is completely mapped. This process is done
using the “explore-lite” package, which is a frontier-based
exploration package [31]. A frontier is an area between an
unoccupied cell, which is already mapped, and unknown cells
in the 2D occupancy grid map [12]. The “explore-lite” package
can use the costmaps provided by either the mapping algorithm
or the “move-base” package instead of constructing its own
costmap. This makes it more efficient and lightweight. Fig. 3
shows detected frontier points of the constructed map.
D. Navigation
First, a global planner computes an efficient path towards
an arbitrary goal point regarding the static obstacles within
the constructed map, using the A* algorithm. Then, the Fig. 3. Frontier points detected by the implemented algorithm (green points)

Authorized licensed use limited to: ULAKBIM UASL - Sakarya Universitesi. Downloaded on February 02,2021 at 14:52:18 UTC from IEEE Xplore. Restrictions apply.
Fig. 4. Underlying communications between different nodes in ROS

are the rangefinder sensor data and robot’s current pose


respectively.
• The “/amcl” node localizes the drone by subscribing to
“/scan” and “/tf” topics, and publishing “/tf” topic. This
node also provides the particle clouds, which can be
visualized by Rviz.
• The “/explore” node uses the constructed map and
robot’s current pose provided by the “/map” and “/tf”
topics respectively, to send 2D goal poses via the Fig. 5. Visualized particle clouds condensation proccess of the “amcl”
package
“/move base/goal” topic.
• The “/move base” node subscribes to the “/map” and
“/scan” topics provided by the “/slam gmapping” and its desired goal in the workspace. Fig. 7 shows the constructed
“/gazebo” nodes, which are the constructed map and laser path towards an arbitrary goal point using the global planner.
data respectively, to generate global and local costmaps.
It also uses the “/tf” topic which indicates the robot’s V. C ONCLUSION
current pose, and “/move base/goal” topic published by In this work, an autonomous system for quadrotor explo-
“/explore” node, to compute a path towards the goal ration and navigation was implemented on a simulated Parrot
and publish to the “/cmd vel” topic, which contains the AR.Drone 2.0. Additionally, an accurate SLAM algorithm
appropriate velocity commands for drone navigation. The was used to create maps from the environment. The ROS
user can also send goal poses manually by the “2D Nav simulator was utilized to model the quadrotor and implement
Goal” button provided by Rviz. the required systems. Furthermore, the Gazebo interface was
used as the simulation environment. The adopted packages
IV. S IMULATION R ESULTS were modified to navigate the quadrotor at a fixed height in
Initially, the “amcl” package was able to approximately
localize the quadrotor’s pose. As the robot moves around, it
gathers more and more information regarding its surrounding
environment and thus, the uncertainty of the localization
system decreases. Fig. 5 visualizes this phenomenon by dis-
playing the condensation of the particle clouds.
The implemented SLAM and exploration packages were
tested on the “willow garage” world. Frontiers of the con-
structed map were successfully detected by the “explore-lite”
package and a large section of the complicated simulated envi-
ronment was successfully mapped autonomously. The result is
displayed in Fig. 6. Moreover, the implemented 2D navigation Fig. 6. Simulated environment in Gazebo (left), constructed map with frontier
system can generate safe trajectories to navigate the drone to exploration (right)

Authorized licensed use limited to: ULAKBIM UASL - Sakarya Universitesi. Downloaded on February 02,2021 at 14:52:18 UTC from IEEE Xplore. Restrictions apply.
[14] G. A. Lopes, E. Najafi, S. P. Nageshrao, and R. Babuska, “Learning com-
plex behaviors via sequential composition and passivity-based control,”
in Handling Uncertainty and Networked Structure in Robot Control,
L. Busoniu and L. Tamas Eds. Springer, 2015, pp. 53–74.
[15] J. T. Schwartz and M. Sharir, “On the “piano movers’” problem I.
the case of a two-dimensional rigid polygonal body moving amidst
polygonal barriers,” Communications on pure and applied mathematics,
vol. 36, no. 3, pp. 345–398, 1983.
[16] D. J. Zhu and J. . Latombe, “New heuristic algorithms for efficient hier-
archical path planning,” IEEE Transactions on Robotics and Automation,
vol. 7, no. 1, pp. 9–20, 1991.
[17] H. Samet, “An overview of quadtrees, octrees, and related hierarchical
data structures,” in Theoretical Foundations of Computer Graphics and
CAD. Springer, 1988, pp. 51–68.
Fig. 7. Generated path by the global planner of the navigation stack [18] E. Najafi and G. A. Lopes, “Towards cooperative sequential composition
control,” in Proceedings of the IEEE 55th Conference on Decision and
Control, 2016, pp. 4758–4763.
[19] L. Lulu and A. Elnagar, “A comparative study between visibility-based
a 2D manner with the help of a PID controller. Finally, the roadmap path planning algorithms,” in Proceedings of the IEEE/RSJ
International Conference on Intelligent Robots and Systems, 2005, pp.
results of the exploration, mapping and navigation algorithms 3263–3268.
were presented. For future works, the navigation system can [20] H. M. Choset, S. Hutchinson, K. M. Lynch, G. Kantor, W. Burgard, L. E.
be improved with a 3D approach, enabling it to generate Kavraki, and S. Thrun, Principles of robot motion: theory, algorithms,
and implementation. MIT press, 2005.
more complex trajectories for the quadrotor. Moreover, real [21] O. Khatib, “Real-time obstacle avoidance for manipulators and mo-
world implementations should be evaluated to further assess bile robots,” in Proceedings of the IEEE International Conference on
the efficiency of the simulated system. Robotics and Automation, vol. 2, 1985, pp. 500–505.
[22] J.-O. Kim and P. Khosla, “Real-time obstacle avoidance using harmonic
potential functions,” 1992.
R EFERENCES [23] E. Najafi, A. Shah, and G. A. Lopes, “Robot contact language for
manipulation planning,” IEEE/ASME Transactions on Mechatronics,
vol. 23, no. 3, pp. 1171–1181, 2018.
[1] E. Najafi, T. Laugs, P. N. Rubio, and S. Alers, “An implementation [24] E. Najafi, R. Babuska, and G. A. Lopes, “An application of sequential
of AutomationML for an Industry 4.0 case study: RoboCup@Work,” in composition control to cooperative systems,” in Proceedings of the 10th
Proceedings of the International Conference on Research and Education International Workshop on Robot Motion and Control, 2015, pp. 15–20.
in Mechatronics, 2019, pp. 1–6. [25] E. W. Dijkstra et al., “A note on two problems in connexion with graphs,”
[2] A. Talaeizadeh, E. Najafi, H. N. Pishkenari, and A. Alasty, “Deployment Numerische mathematik, vol. 1, no. 1, pp. 269–271, 1959.
of model-based design approach for a mini-quadcopter,” in Proceedings [26] P. E. Hart, N. J. Nilsson, and B. Raphael, “A formal basis for the heuristic
of the 7th International Conference on Robotics and Mechatronics, 2019, determination of minimum cost paths,” IEEE transactions on Systems
pp. 291–296. Science and Cybernetics, vol. 4, no. 2, pp. 100–107, 1968.
[3] L. F. De Melo and J. F. M. Junior, “Trajectory planning for non- [27] A. Stentz, “Optimal and efficient path planning for partially known
holonomic mobile robot using extended Kalman filter,” Mathematical environments,” in Intelligent unmanned ground vehicles. Springer,
problems in engineering, vol. 2010, 2010. 1997, pp. 203–220.
[4] T. Bailey and H. Durrant-Whyte, “Simultaneous localization and map- [28] J. Meyer, A. Sendobry, S. Kohlbrecher, U. Klingauf, and O. Von Stryk,
ping (SLAM): Part II,” IEEE robotics & automation magazine, vol. 13, “Comprehensive simulation of quadrotor UAVs using ROS and Gazebo,”
no. 3, pp. 108–117, 2006. in Proceedings of the International conference on simulation, modeling,
[5] J. E. Guivant and E. M. Nebot, “Optimization of the simultaneous and programming for autonomous robots, 2012, pp. 400–411.
localization and map-building algorithm for real-time implementation,” [29] G. Grisetti, C. Stachniss, and W. Burgard, “Improved techniques for grid
IEEE transactions on robotics and automation, vol. 17, no. 3, pp. 242– mapping with rao-blackwellized particle filters,” IEEE transactions on
257, 2001. Robotics, vol. 23, no. 1, pp. 34–46, 2007.
[6] M. Montemerlo, S. Thrun, D. Koller, and B. Wegbreit, “FastSLAM 2.0: [30] S. Thrun, W. Burgard, and D. Fox, Probabilistic Robotics (Intelligent
an improved particle filtering algorithm for simultaneous localization Robotics and Autonomous Agents). The MIT Press, 2005.
and mapping that provably converges,” in IJCAI, 2003, pp. 1151–1156. [31] J. Hörner, “Map-merging for multi-robot system,” 2016.
[7] A. I. Eliazar and R. Parr, “DP-SLAM 2.0,” in Proceedings of the IEEE [32] D. Fox, W. Burgard, and S. Thrun, “The dynamic window approach to
International Conference on Robotics and Automation, vol. 2, 2004, pp. collision avoidance,” IEEE Robotics & Automation Magazine, vol. 4,
1314–1320. no. 1, pp. 23–33, 1997.
[8] J. Engel, T. Schöps, and D. Cremers, “LSD-SLAM: large-scale direct
monocular SLAM,” in Proceedings of the European conference on
computer vision, 2014, pp. 834–849.
[9] G. Dudek, M. Jenkin, E. Milios, and D. Wilkes, “Robotic exploration
as graph construction,” IEEE Transactions on Robotics and Automation,
vol. 7, no. 6, pp. 859–865, 1991.
[10] E. P. e Silva Jr, P. M. Engel, M. Trevisan, and M. A. Idiart, “Exploration
method using harmonic functions,” Robotics and Autonomous Systems,
vol. 40, no. 1, pp. 25–42, 2002.
[11] E. Najafi, G. A. Lopes, S. P. Nageshrao, and R. Babuska, “Rapid learning
in sequential composition control,” in Proceedings of the 53rd IEEE
International Conference on Decision and Control, 2014, pp. 5171–
5176.
[12] B. Yamauchi, “A frontier-based approach for autonomous exploration,”
in Proceedings of the IEEE International Symposium on Computational
Intelligence in Robotics and Automation, 1997, pp. 146–151.
[13] L. Freda, G. Oriolo, and F. Vecchioli, “Sensor-based exploration for
general robotic systems,” 2008, pp. 2157–2164.

Authorized licensed use limited to: ULAKBIM UASL - Sakarya Universitesi. Downloaded on February 02,2021 at 14:52:18 UTC from IEEE Xplore. Restrictions apply.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy