Professional Documents
Culture Documents
Inspection Tasks
Marco Steinbrink Philipp Koch Stefan May
Technical University Bergakademie Nuremberg Institute of Technology Nuremberg Institute of Technology
Freiberg,Germany Georg Simon Ohm,Germany Georg Simon Ohm,Germany
marco.steinbrink@doktorand.t philipp.koch@th-nuernberg.d stefan.may@th-nuernberg.de
u-freiberg.de e
ABSTRACT 1. INTRODUCTION
In this paper, a novel state machine for mobile robots is described In ever more diverse areas, mobile robots are deployed to reduce
that enables a direct use for exploration and inspection tasks. It risks for human workers and automate tasks. Different robotic
offers a graphical user interface (GUI) to supervise the process layouts and handling renders their control difficult and a task only
and to issue commands if necessary. The state machine was suited for specialists. The remote control of complex robots
developed for the open-source framework Robot Operating requires a skilled operator that is alert at all times. Replacing parts
System (ROS) and can interface arbitrary algorithms for of the control by autonomy reduces fatigue of the operator which
navigation and exploration. Interfaces to the commonly used ROS can lead to more efficiency when autonomy may fail and the
navigation stack and the explore_lite package are already included operator is required to execute tasks manually.
and can be utilized. In addition, routines for mapping and
inspection can be added freely to adapt to the area of application. The novel state machine described in this paper, hereinafter
The state machine features a teleoperation mode to which it referred to as Robot Statemachine (RSM), offers an aided control
changes as soon as a respective command was issued. It also for arbitrary mobile robots that can be used by simple GUI
implements a software emergency stop and multiplexes all commands. It enables sending the robot to explore or follow given
movement commands to the motor controller. To show the state waypoints autonomously and execute special routines when
machine’s capabilities several simulations and real-world reaching a goal. These routines can be implemented through
experiments are described in which it was used. plugins and range from informing the operator to carry out a
routine, to autonomously sweeping a camera and identifying
CCS Concepts certain objects to be mapped.
• Computer systems organization → Robotic autonomy • It can be adapted for different mobile robots and tasks through the
Software and its engineering→State systems • implementation of plugins for navigation, exploration and
Human-centered computing → Graphical user interfaces inspection tasks. Because of these plugins, the RSM is applicable
to 2D and 3D environments, but the following paper will only
Keywords discuss the 2D environment in which it was successfully tested
State Machine, Exploration, Inspection, Mobile Robotics already.
ACM Reference format: The operations enabled by the RSM can be applied to industrial
Marco Steinbrink, Philipp Koch, Stefan May, Bernhard Jung and settings, underground mining, agricultural areas and many more in
Michael Schmidpeter. 2020. State Machine for Arbitrary Robots which an initial map has to be extracted at first and repeating
for Exploration and Inspection Tasks. In Proceedings of 2020 4th routines executed at specified locations afterwards. Also, in rescue
International Conference on Vision, Image and Signal Processing scenarios simplified control and supervision of robots could
(ICVISP 2020), December 9-11, 2020, Bangkok, Thailand. ACM, enhance and alleviate their use.
New York, NY, USA,6 pages.
https://doi.org/10.1145/3448823.3448857 The organization of the paper will be described in the following.
Permission to make digital or hard copies of all or part of this work for personal or First, recent works regarding state machines for controlling robots
classroom use is granted without fee provided that copies are not made or are put into context with this work. Afterwards, the
distributed for profit or commercial advantage and that copies bear this notice and implementation of the RSM is described as well as the
the full citation on the first page. Copyrights for components of this work owned
by others than the author(s) must be honored. Abstracting with credit is permitted.
possibilities offered by the GUI. Interfaces to some existing ROS
To copy otherwise, or republish, to post on servers or to redistribute to lists, packages, for example navigation and explore_lite, are also
requires prior specific permission and/or a fee. Request permissions from explained. Simulations and experiments are described to show use
Permissions@acm.org. cases for the RSM and verify it is working. For example, its
ICVISP 2020, December 9–11, 2020, Bangkok, Thailand application on the robot Schroedi during the RoboCup Sydney
© 2020 Copyright is held by the owner/author(s). Publication rights licensed to 2019, as can be seen in figure 1.
ACM.
ACM ISBN 978-1-4503-8953-2/20/12…$15.00
https://doi.org/10.1145/3448823.3448857
also requires an operator with programming experience which the
RSM tries to render unnecessary.
An addition to FlexBE furthermore integrates its own plugins for
navigation, enabling more interaction with the underlying classes
of the navigation stack[3]. The necessary part of the extended
interaction for mobile robots is also possible with the RSM.
The package ros_control is offering a framework to control all
robot joints and the robot’s movement [2]. It rather aims at
controlling hardware and therefore is not tailored for exploration
and inspection unlike the RSM which offers control of the robot’s
(a) movement as well.
Another alternative is the decision_making_tools package1 which
allows construction of arbitrary behaviors for robots in ROS. But
it is targeted at a lower level control while the RSM targets
high-level autonomy for mobile robots.
Even though the above-mentioned state machines provide
adaptable and extensive frameworks, the RSM aims to offer a less
complex solution for exploration and inspection with mobile
robots while focusing on usability for operators.
(b)
3. STATEMACHINE CONCEPTS AND
Figure 1. Robot Statemachine being used on the robot Schrödi IMPLEMENTATION
for exploration in a secluded area during RoboCup Sydney The RSM was written in C++ and follows the UML state pattern
2019 in (a) and the Robot Statemachine’s GUI embedded in [5]. The class responsible for state transitions only allows volatile
RViz in (b). states which makes an additional class for handling data necessary.
All implemented states need to inherit from a virtual base state
2. RELATED WORK which class diagram is shown in figure 2 together with the
The RSM uses the previously mentioned ROS framework which
surrounding structures. Each state’s base functions are called by
was introduced by Quigley et. al [9] and is one of the most-used
the class handling state transitions. To obtain data necessary for
frameworks in robotics research nowadays. It became so popular
processing, each state has to interact with the data handler class
because it is available as open-source and enables its worldwide
through services and topic subscriptions.
community to participate on features to be added next. It also
offers many packages which can be used for commonly applicable The RSM features some integrated states offering basic
tasks like Simultaneous Localization and Mapping (SLAM), functionalities which are listed below:
navigation and exploration as well as interfaces to a lot of much
used sensors. • Boot State
• Idle State
In most cases, to operate a robot using ROS, a multitude of ROS • Teleoperation State
packages which offer different functionalities must be started • Emergency Stop State
using specifically designed files or commands issued in the • Waypoint Following State
terminal. A change of robot behavior therefore requires a skilled The Boot State is always the first state to be called when the RSM
operator who mostly has to have knowledge about the is started and simply subscribes to a service that should inform
programming as well. There currently is a selection of available about the boot-up process. When the process finishes, the Boot
state machines in ROS which will be compared to the RSM in the State will initiate a transition to the Idle State. The latter only
following. awaits input from the operator to transition to a desired state. One
of these is the Teleoperation State which becomes active as soon
One of those is SMACH which was developed by Boren and
as a teleoperation command is issued to the robot. The Emergency
Cousins [1] and offers a finite state machine which can be realized
Stop State is activated when the operator pushes the software stop
with Python code and supervised through a provided GUI. Many
button in the GUI. A transition to the Idle State is only initiated
additions to SMACH were published which for example enable
when the button is released again. The Waypoint Following State
preconfigured, repeatable behaviors [8], decouple design from
is called when waypoint following is started from the GUI. It
programming by providing a description language for the
manages the list of waypoints and forwards the next waypoint as a
respective states [4] or introduce core templates and automatic
navigation goal.
code block generation [10]. SMACH and its additions allow to
implement complicated behaviors whereas the RSM is more To realize exploration and waypoint following, the three plugins
focused on usability instead of complexity. Therefore it is not as listed below need to be implemented with interfaces to arbitrary
adaptable as SMACH but can be deployed with less effort for packages:
mobile robots.
• Calculate Goal State
FlexBE is also based on SMACH and provides flexibility through • Navigation State
enabling changes on the fly by the operator. It introduces • Mapping State
behaviors for pre-specified tasks which are also adjustable [11].
Even though it offers many possibilities and great flexibility, it 1
www.wiki.ros.org/decision_making_tools
Figure 2. RSM partial class diagram showing the most important attributes and methods of each class.
The Calculate Goal State is responsible for extracting a most An intended process for exploration would be that the Calculate
suitable exploration goal to go to next. Therefore, it should Goal State forwards a goal to the Navigation State which then tries
interface a package calculating exploration goals. The data handler to reach said goal. If it succeeds, the Mapping State is called and
class expects a list of possible exploration goals to evaluate if the after finishing, transitions back to Calculate Goal State to find a
current goal is still viable or has already been explored while new exploration goal. If navigation fails, the goal is blacklisted
moving. This is only used when exploration is run in interrupting and Calculate Goal State called to find a new exploration goal. A
mode, in which navigation is aborted as soon as the current goal state diagram showing these transitions can be seen in figure 3.
becomes obsolete. The extracted goal from Calculate Goal State is
then forwarded to the Navigation State which needs to implement Waypoint following works in a similar fashion. The Waypoint
an interface to a designated navigation package. This interface Following State extracts a navigation goal from the list of
should be able to retrieve the current status of the navigation and waypoints and forwards it to the Navigation State. If the
move forward and in reverse. The Mapping State can implement Navigation State succeeds in reaching the goal, the respective
behaviors to rigorously scan the surrounding by moving the Routine State is called. When the routine is finished or if there
robot’s sensors. The Navigation State is also used for reaching was no routine set for this waypoint, the Waypoint Following
waypoints while waypoint following is active. State is called again to determine a new navigation goal. The
respective waypoint’s status is then set to visited. If navigation
Waypoints can be linked to certain routines that are implemented fails, its status is set to unreachable and the Waypoint Following
as Routine States. These are called when the respective waypoint State is called to provide the next navigation goal.
was reached and can execute arbitrary behaviors. Routine States
are not mandatory to implement, but there can be up to ten The RSM also features a class to control the command velocity
different ones. output to the motor controller interface. It either maps the
command velocity from teleoperation, from autonomous operation
or a stop command to the motor controller interface. The
command forwarded can be set through the GUI or in case of
teleoperation also automatically by issuing a teleoperation
command. This only works when the software emergency stop is
not pushed in the GUI. If it is, only the stop command is sent to
the motor controller interface and the robot will not move.
A sample implementation provided in the rsm_additions package
features plugins for all of the above states. The Calculate Goal
State interfaces the ROS package explore_lite which is based on
the frontier exploration algorithm introduced by Yamauchi [12].
The plugin subscribes to explore_lite’s visualization that shows
frontiers on a 2D map and extracts the closest frontier center point
to the robot as a navigation goal. The Navigation State realizes an
interface to the navigation ROS package [7]. It forwards received
goals to the navigation stack and also gets feedback from it
regarding the progress. There are two implementations for the
Mapping State where the first one is merely a dummy that
transitions back to the Calculate Goal State. The second one is
meant for an included simulation that will be explained later. This
Mapping State will swivel a depth camera from one side to the
other and back to create a dense 3D pointcloud. A Routine State
called Reversing Routine State is also included and toggles the
reverse mode when the routine is executed. This means the robot
Figure 3. State diagram showing an exemplary is driving in reverse now when it was going forward before and
implementation with normal states, additional plugin states vice versa. An additional data handler class is provided that adds
(bold border) and transitions. services to interface the explore_lite and navigation packages.
A secondary sample implementation realizes an interface to the The single mode lets the robot start from the first waypoint and
RoNa2 navigation package which is available as open source. This then moves to all consecutive ones in order. Upon reaching the
secondary sample only offers a Navigation State plugin and last one it stops. In roundtrip mode, after reaching the last
henceforth still requires the other plugin states. waypoint, all waypoints are reset and it starts anew from the first
waypoint. This is repeated until manually stopped. Patrol mode
To apply the RSM with an arbitrary mobile robot, f.e. the popular works in a similar fashion. After reaching the last waypoint, all
TurtleBot, a user would need to configure the navigation stack waypoints are reset and it starts again in reverse order. The first
including running SLAM. With these prerequisites the RSM can and last waypoints are only targeted once and their attached
be executed using the plugins from rsm_additions to explore or routines executed only once as well. It can only be stopped
inspect the area. manually.
4. GUI IMPLEMENTATION The GUI also offers the possibility to set a waypoint at the robot’s
The RSM can be operated through a GUI that enables the use of current location, with the robot’s current orientation and a desired
all its core functionalities. The GUI is depicted in figure 4 and can routine.
be integrated into RViz or rqt which can be used in ROS for
visualization. It always shows which state is currently active and Furthermore, a checkbox enables setting the reverse mode
gives the user the options explained below. manually. When the box is checked, the robot moves in reverse.
The GUI offers control over the class handling the command
velocities forwarded to the motor controller interface. This
includes the software emergency stop as well as choosing
autonomy, teleoperation or stopped. When the software
emergency stop is active, the other choices are disabled and the
command velocity is set to stopped until the software emergency
stop is released again.
(a) (b)
(c) (d)
Figure 6. Robot Statemachine simulations with gazebo in (a) and stdr_simulator in (c) showing the simulation view and the
respective RViz view in (b) and (d).