<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>IoT and Robot Control Interoperability in Collaboration Environments Human-Robot</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>María del Mar Plaza</string-name>
          <email>aldelro@ai2.upv.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francisco Blanes</string-name>
          <email>pblanes@ai2.upv.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alberto Delgado</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Eduard Conesa</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Patricia Balbastre</string-name>
          <email>patricia@ai2.upv.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Instituto Universitario de Automática e Informática Industrial, Universitat Politècnica de València</institution>
          ,
          <addr-line>Camino de Vera S/N, Valencia, 46022</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>With humans and robots working in closer proximity in many industrial applications, there is a need to merge data from both. But robots typically manage information in middleware or control environments separate from the IoT, which is often the framework for human data information. This paper presents the advantages of IoT and robot control interoperability in human-robot collaboration environments for real-time logistic applications.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;UWB</kwd>
        <kwd>RTLS</kwd>
        <kwd>positioning</kwd>
        <kwd>industry</kwd>
        <kwd>HRI</kwd>
        <kwd>robot</kwd>
        <kwd>ROS</kwd>
        <kwd>logistics</kwd>
        <kwd>IoT</kwd>
        <kwd>MQTT</kwd>
        <kwd>IPS</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>• Study of behavioral patterns. Much research is currently being invested in this area, especially
in marketing. The aim is to determine how long users spend in certain areas to increase sales,
improve infrastructures, or modify the processes.</p>
      <p>There are various positioning technologies that operate based on radio waves, magnetic waves,
acoustic waves, infrared, or satellites. However, the current trend is the implementation of radio-wave
positioning systems in enclosed spaces. These are divided into narrowband radio communication
systems, such as Bluetooth or WiFi, and ultra-wideband systems. In addition, 5G positioning should
be considered, but this technology is not fully mature nowadays, there are still many limitations that
need to be addressed before we see the technology widely deployed.</p>
      <p>
        Ultra-wideband (UWB) technology has gained significant importance in the field of indoor
positioning because it allows, in most cases, direct distance measurements with various calculation
methods, not merely employing the received signal strength (Figure 1). This technology can generate
positioning data with accuracies of less than 10 centimeters. It also provides greater robustness in
environments where the presence of obstacles between transmitter and receiver is significant, as radio
waves are very short signal pulses (in the order of nanoseconds) in an ultra-wide frequency band that
hardly interfere with the signals of other positioning technologies and can pass through many
structures [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This makes it easier to measure the signal's arrival time at the receiver, which makes
this technology ideal for precise positioning calculations.
      </p>
      <p>On the other hand, the radiated power levels of UWB chips are very low, in the order of half mW
compared to several hundred mW for Bluetooth and tens of mW for WiFi. This means that the
autonomy of the devices where the UWB chip is integrated is practically unaffected.</p>
      <p>
        A comparative table with the technical data of the aforementioned indoor positioning technologies
is summarized in the Table 1 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>These UWB localization systems allow greater human-robot interaction while providing relevant
information on the efficiency of production systems. The integration of data from all points of a
production process (machines, humans, products) allows the control, monitoring, and analysis
necessary to achieve efficient systems. In the case of IoT systems, the use of communication brokers
with MQTT protocol is one of the widely standardized solutions due to its simplicity and lightness.
On the other hand, using the ROS (Robot Operating System) platform as middleware for interaction
with robots is also a widely accepted solution within robotics applications. This middleware provides
standard operating system services such as hardware abstraction, low-level device control,
implementation of commonly-used functionality, inter-process message passing, and packet
maintenance.</p>
      <p>This article evaluates a UWB localization system and its application to determine the position of
humans and robots in industrial environments with high accuracy for its integration into the ROS
architecture of a mobile robot to track operators in their logistic tasks.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Interoperability between ROS and UWB</title>
      <p>In this paper, we have an IoT indoor positioning system with UWB technology with which the
location of assets in a given workspace can be obtained with high precision. On the other hand, the
aim is to implement a logistics application for tracking operators by mobile robots to facilitate
working conditions and comfort. There is also a mobile robot with the ROS software architecture. The
main objective here is to achieve the interconnection of both systems (robot control and IoT system)
to implement such an application.
2.1.</p>
    </sec>
    <sec id="sec-3">
      <title>UWB positioning system by Pozyx configuration</title>
      <p>The system is composed of three different parts (Figure 2).</p>
      <p>Firstly, a network of antennas and tags form the main structure of the communication system to
obtain the real-time positioning of people or mobile objects. The tags are mobile devices whose
position is to be known as well as the orientation if needed. At the same time, the antennas are devices
that are fixed at a given position and receive the information emitted by the tags.</p>
      <p>Secondly, a gateway. This device is the positioning server and connects the antennas via Ethernet.
It also collects the data it receives from the antennas and converts it into positions. The Gateway
enables the connection to the Pozyx web application and the ROS module developed to access the
data generated by the positioning system. To do this, an MQTT bridge must be made through the
public IP generated by the Gateway when it connects to the Internet and through port 1883.</p>
      <p>Finally, the web interface. Here the devices can be configured, and it allows us to view the
trajectories followed by the tags connected to the server in real-time.
2.2.</p>
    </sec>
    <sec id="sec-4">
      <title>RB-1 mobile robot from Robotnik company</title>
      <p>
        RB-1 is an autonomous mobile robot for transporting loads indoors that supports loads of up to 50
kg and has up to 10 hours of autonomy [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The Figure 3 shows the laser sensor used for navigation
and localization and a Red Green Blue Depth (RGB-D) sensor for obstacle detection.
      </p>
      <p>
        RB-1 is based on ROS, an open-source framework based on a graph architecture where processing
takes place in nodes that can receive, send and multiplex messages from sensors, control, states,
schedules, and actuators, among others [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. These nodes communicate with each other under the
hierarchy of the Master node, as shown in the above diagram. Thus, each node sends messages to a
particular topic. Sending messages to a topic is called "publishing," and reading the data of a topic is
called "subscribing." Messages can be of integer, floating-point, or Boolean type, but a given topic
can only send or receive one type of message at a time.
      </p>
      <p>On the other hand, there are services when an interaction between nodes is required. Services have
a message type definition, so we can send a service request to another node that performs it. The
result of the service is sent as a response. The node must wait until the result is received at the other
node. This is also shown in the diagram above.</p>
      <p>The library is oriented for a UNIX system (Ubuntu -Linux) although it is also being adapted to
other operating systems.</p>
    </sec>
    <sec id="sec-5">
      <title>2.3. Interconnection module between the localization system and the robot</title>
      <p>For the two systems to interoperate, it is necessary to create an interconnection module to be
executed in the mobile robot. First of all, the antennas read the position of the active tags, in this case,
the operator tag and the mobile robot tag. This information is processed in the Gateway or server,
where the MQTT broker is. Now, it is possible to subscribe to the topic that the broker raises with the
positions of the tags. Next, a module is developed in ROS with an MQTT client to receive the
position data of the tag carried by the operator and the robot tag. This position data can be filtered to
calculate the trajectory that the robot must follow to stay close to the operator at all times, always
maintaining a safety margin. The functional diagram is shown in Figure 4.</p>
    </sec>
    <sec id="sec-6">
      <title>3. Application</title>
      <p>Service robotics is booming in the logistics sector. The automation of processes and optimization
of resources is constantly growing, aiming to reduce heavy or tedious tasks for operators. The industry
increasingly requires autonomous robots to move freely around the work environment without being
constantly supervised by operators.</p>
      <p>However, in order to be able to track the human, the robot first needs to identify the human.
Taking advantage of the UWB localization system makes it easier to track using tags without
integrating artificial vision into the robot, as is usually the case. This system provides the robot with
information on the human's position without processing the data obtained by its sensors. Moreover, as
each tag has its identifier, the robot only needs to be told which tag to follow.</p>
      <p>This application aims to free operators from transporting small or medium-sized loads through
production areas, which guarantees greater comfort for the operator and improves risk prevention in
terms of industrial safety (Figure 5). The robot tracks the operator (tag holder) employing the UWB
localization system, always respecting a safety margin between the robot and the operator. The robot
continuously reads the operator's position through an MQTT client implemented in the ROS module
developed and tries to stay close to the last position read. Thus, when the operator stops to perform a
task, the mobile robot stops, and the operator can place the load to be transported on its platform.
Once the load has been deposited, the operator starts his trajectory again, followed by the robot
towards a new destination point where the load will be deposited. It is important for the navigating
robot map and the map loaded in the Pozyx interface to calculate the coordinates of the tags to have
the same origin, so the coordinates in the robot map are the same as the coordinates in the Pozyx map.</p>
      <p>The code developed to achieve this application would be as follows. Firstly, establishing the
identifier of the tag that the robot carries and the identifier of the tag that it must follow. Secondly, the
user has to create an MQTT connection thread to the broker in the ROS module (Figure 6) to obtain
the data collected by the UWB localization system. This data is classified according to the identifier
of the tag that emits it. Thus, the operator's position is continuously published in the robot's path
planning algorithm in another thread because the update frequency of the Pozyx positioning data is
higher than the frequency of the robot control loop. In this case, as the robot receives the operator's
position at a high frequency, it can shorten the trajectory to be followed if, instead of saving all the
positions received, it gives priority to the last one. Therefore, despite the trajectory followed by the
human, the robot will track with a longer sampling period than the one for the positioning reading
with the UWB location system.</p>
      <p>The robot, knowing its position, moves in the direction of the operator's tag, respecting a safety
margin around it. However, the robot moves only if the change in actual coordinates compared to
previous coordinates is bigger than a specific tolerance, to avoid the robot moving due to the
positioning noise of UWB positioning data when it is in a static position.</p>
      <p>Thus, the mobile robot tracks the operator employing a virtual sensor, maintaining the robot's
autonomy to avoid any obstacles that may come between the robot and the operator during the
tracking of the trajectory, in this case, with the conventional sensors installed in the robot.</p>
    </sec>
    <sec id="sec-7">
      <title>4. Acknowledgements</title>
      <p>This research has been funded by the Agència Valenciana de la Innovació, under
the program Projectes Estratègics en Cooperació 2021 (INNEST/2021/226). Action co-financed by
the European Union through the European Regional Development Fund (ERDF) Operational
Programme for the Valencia Region 2014-2020.
5. References</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>L.</given-names>
            <surname>Mihaylova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.-G.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.P.</given-names>
            <surname>Dogra</surname>
          </string-name>
          ,
          <source>Ultra Wideband Indoor Positioning Technologies: Analysis and Recent Advances, Sensors</source>
          ,
          <volume>16</volume>
          (
          <year>2016</year>
          )
          <article-title>707</article-title>
          . doi:
          <volume>10</volume>
          .3390/s16050707.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Sewio</surname>
          </string-name>
          , UWB Technology,
          <year>2021</year>
          . URL: https://www.sewio.net/uwb-technology/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Decawave</surname>
            ,
            <given-names>Our</given-names>
          </string-name>
          <string-name>
            <surname>Technology</surname>
          </string-name>
          ,
          <year>2020</year>
          . URL: https://www.decawave.com/technology1/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Pozyx</surname>
          </string-name>
          ,
          <article-title>Flexible real-time location systems (RTLS) for indoor tracking based on UWB (ultra-wide band) technology</article-title>
          ,
          <year>2022</year>
          . URL: https://docs.pozyx.io/enterprise/latest
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Robotnik. Robot Movil</surname>
          </string-name>
          RB-1
          <string-name>
            <surname>Base</surname>
          </string-name>
          ,
          <year>2022</year>
          . URL: https://robotnik.eu/es/productos/robotsmoviles/rb-1-base/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6] ROS.org, Introduction,
          <year>2018</year>
          . URL: https://Wiki.ros.org/ROS/Introduction.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lentin</surname>
          </string-name>
          , Learning Robotics Using Python, Packt Publishing Ltd, Birmingham,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>