<!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>ROS-TiPlEx: A collaborative design tool for Timeline-based Planning &amp; Scheduling applications with ROS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Carlo La Viola</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Orlandini</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alessandro Umbrico</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Amedeo Cesta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Cognitive Science and Technology, National Research Council of Italy Via San Martino della battaglia 44</institution>
          ,
          <addr-line>00185 Rome</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper provides a quick overview of a Knowledge Engineering system, called ROS-TiPlEx (Timeline-based Planning and Execution with ROS), to provide a shared environment in which experts in robotics and planning can easily interact to, respectively, encode information about low-level robot control and de ne task planning and execution models. ROS-TiPlEx aims at facilitating the interaction between both kind of experts, thus, enhancing and possibly speeding up the process of an integrated control design. ROS-TiPlEx is the rst tool addressing the connection of ROS and timeline-based planning.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Deploying interactive robots in human-populated scenarios requires to address
multiple challenges. Among others, it is of paramount importance the ability of
the robot to quickly adapt its behaviours to the actual state of the environment
and to keep the user engaged in the interaction. Such highly exible and
adaptive behaviours are necessary also to guarantee safe and e ective human-robot
interactions. There are several approaches that aim to achieve robust action
selection via planning, e.g., [
        <xref ref-type="bibr" rid="ref2 ref3 ref7">2, 3, 7</xref>
        ] or robust execution via some form of nite
state machine (FSM), e.g., [
        <xref ref-type="bibr" rid="ref1 ref12">1, 12</xref>
        ]. The introduction of tools to facilitate the
integration of planning and robotics and the design of well-integrated solutions
entails di erent kind of expertise to address a wide variety of control issues,
spanning from low-level control to decisional autonomy con guration. The
variety of the topic introduces some engineering problems; information sharing at
di erent abstraction levels may cause redundancies or inconsistencies in
planning speci cations; the lack of a generally accepted design methods may entail
many potential back-and-forth (re)work over models and control parameters
before de ning the proper control con guration. A workaround for this solution is
to use state-of-the-art software tools which are in most of the cases developed
to support either robotics or planning experts [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and not the overall process as
a collaborative work. In this paper we present a tool that allows to overcome
these problems, acting as a base for information sharing and monitoring of the
overall process.
      </p>
      <p>Copyright © 2020 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).</p>
    </sec>
    <sec id="sec-2">
      <title>A tool to foster collaboration</title>
      <p>In real-world application the design of a Human-Robot Interaction (HRI) system,
presents various needs that can not be ful lled by a single person. The main
issue is the variety of information that must be processed all together to reach
the nal result. Often the contribute of the expert is speci c to its eld and
not integrated with the rest of the solutions; each actor takes in charge single
building-blocks of the process to which he contributes with his expertise. The
main role in the construction of such scenario is focused on the mission expert,
or rather the person that knows the mission objectives, and is able to dispatch
the work to the engineers that best match the competencies for the speci c task.
Such an expert will be responsible for the correct execution of the separated
tasks and it will be the main point of contact in case of any issue in the project.
But if the mission leader is responsible for the overall success of the project,
then other gures will have responsibility on the single building-blocks of the
system. For the sake of brevity, we can summarize the main gure of expertise
in a planning expert and a robot expert. The rst has knowledge of P&amp;S, and
can provide robust planning for the system, to reach the standard of quality and
safety that must be met for any HRI application; the second, on the other hand,
is the one responsible for the robot itself. He should provide hardware capable
of satisfying the mission objective and equipped with all the tool that is needed
by the speci c application (e.g. robot arms, camera, working tools, etc...). If we
want to summarize the main roles and tasks:
1. Mission leader : Responsible for the whole project and in charge of
dispatching the tasks to the people with the matching competencies;
2. Planning expert : In charge of creating a robust P&amp;S domain to reach the
standard of quality and safety imposed by the mission leader; also responsible
for the validation and real-time execution of the plan;
3. Robot expert : In charge of the hardware platform that must provide all the
tool needed to accomplish the mission objectives de ned by the mission
leader. It is also responsible for the quality of the hardware.</p>
      <p>Such di erent roles will most likely have di erent background and di erent
vision of the system. Not to mention other constraints like geographic position
(the experts could be in di erent parts of the globe). If we consider the
heterogeneity of such scenario, it is clear the need for a shared framework that helps
the di erent actors to collaborate, share the same vision, and have a common
platform where they can communicate. ROS-TiPlEx aims to ll the gap and
promotes communication among these di erent gures, even though in its rst
implementation it can`t support all the actors in the integrity of the process,
even though automates the most part of it.
3</p>
    </sec>
    <sec id="sec-3">
      <title>ROS-TiPlEx</title>
      <p>
        The context. ROS-TiPlEx([
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]) has been developed with the main focus on
re-usability and capability to adapt with minimum e ort to di erent scenarios.
Apart from the di erences among all the actors, the robotic world also presents
a multitude of technologies [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], and there is need to develop a tool that is built
on shared standard, in order to promote reuse and information sharing. With
this objective, ROS-TiPlEx is built on top of ROS, a standard in robotics that
has already shown the capacity of integration with planning software [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. ROS
is an operating system for robots and o ers an abstraction of the physical layer,
o ering libraries that simplify the control of the low-level components. The other
main technological pillar of ROS-TiPlEx is timeline-based P&amp;S [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], which is
integrated through the use of a framework, called PLATINUm[
        <xref ref-type="bibr" rid="ref10 ref11">11, 10</xref>
        ]. It is worth
underscoring that ROS-TiPlEx is built on top of a formal framework of
Timelinebased P&amp;S [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], hence it can be adapted to work with any planning software that
exploits such a paradigm.
      </p>
      <p>The architecture. ROS-TiPlEx is designed with a Layered architecture,
that allows introducing progressive levels of abstraction throughout the process,
which lead to the modularity of the whole process. The process starts from Layer
0, that is in contact with the ROS platform (i.e., the robotic platform), and is
able to access its data. In the speci city of ROS, layer 0 behaves as a publisher
and subscriber that registers to the ROS topics involved in the execution of
the mission tasks. Once the system is scanned, the process can pass to Layer
1, where the robot expert should start his activity. Knowing the robot and the
premises given by the mission leader, he should rstly de ne an atomic action
of the robot (e.g. move from A to B), and map such action on an FSM (Finite
State Machine), where the edges correspond to the topics involved in the action,
and the states are unique names decided by the expert in relation to the speci c
domain or mission goals. In this FSM, when a message passes on the topic related
to the edges, a change of state is triggered and re ected on the P&amp;S system. The
manipulations on this layer are allowed thanks to two components integrated into
ROS-TiPlEx: the ROS-bridge component that allows the access to the system
thanks to a Javascript UI, and the Mongo-DB component, that stores the data
in the DB and allows them to be reused. These same components are the one
used on Layer 2, granting now the access for a planning expert. He has access
to the atomic actions created in the previous layer and can manipulate them,
to transform the simple FSMs in more complex ones. Such conversion is still
based on the speci cation given by the mission leader and is needed to prepare
a suitable model for the P&amp;S domain, that would allow improved performances
and stability when it comes to elaborate the planning domain and the execution
plan. After the rework performed by the planning expert, the information in the
system goes through the last block, the Layer 3, whose purpose is to convert
all the data in les that will serve as input for the P&amp;S software. In the case of
PLATINUm, the output will be composed by the domain description and some
Java classes which still need to be updated, in order to allow the execution of
the plan that will be dispatched by PLATINUm.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Use case</title>
      <p>
        A simple yet signi cant use case has been deployed together with the
ROSTiPlEx, to test and evaluate the software. It is possible to run the software using
the code in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], that provides all the information needed for the execution. In our
usage scenario, a mission leader de nes the mission goals that can be summarized
in 1) Autonomous movement in unknown space; 2) Ability to take photos of
speci c points of interest, when a human operator triggers the action through a
remote controller; 3) Apply analytics and extract information from the pictures.
At the rst stage of the process, the rst actor to be involved in the con guration
is the robot expert. He is supposed to know the robot and its capabilities, hence
know how to correctly trigger the robot to reach the mission objectives. Through
the use of ROS-TiPlEx, he can input such information and elaborate the FSMs
in gure 2. As we can notice, such FSMs are very basic and unlikely to bring a
real added value when it comes to the generation of a P&amp;S domain; it is for this
reason that a further re nement is needed by the planning expert, that can use
his understanding of the mission objectives to generate State Variables, that will
provide a suitable input for the P&amp;S software, PLATINUm in the speci c case.
To construct a state variable, the planning expert accesses ROS-TiPlEx on the
dedicated interface and can read the inputs from the robot expert that where
previously stored in the MongoDB ROS node. When reworking such information,
it is possible to introduce new constraints among the states, merge the FSMs
to obtain a more structured datum, and also introduce Temporal Constraints,
that will force the system to behave as expected by the mission leader. In the
example of gure 3, the Photo state must always be preceded by a transition of
the rst State Variable through the Trigger state. Such condition implements
the rule for which it is the human inside the system that must interact with the
robot and send commands to it at the right time.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and further improvements</title>
      <p>In this rst implementation of ROS-TiPlEx, we have shown how it is possible
to build an engineering tool that allows the communication and the information
sharing of di erent entities, with di erent skills, such as a robotic expert and
a P&amp;S expert. Albeit this strategy has been presented and experimented, there
still are improvements that will lead to a more complete and more usable tool. A
rst advancement should be done on adding to ROS-TiPlEx a module that allows
the mission leader to de ne an unambiguous description of the mission scenario
so that the experts participating to the process can have a common vision of
the nal result. Nonetheless, the shared point of information could be accessible
from di erent geographical points, enabling the faculty to work on the same topic
even without a physical presence. Another advancement needed in ROS-TiPlEx
is to improve the UI implementation, that now is not very satisfactory when
it comes to user experience or usability. Moreover, an overall refactoring of the
code is needed to improve the separation of the front and the back end, enabling
better portability and the faculty to split the components in multiple machines,
centralizing on the robot only what is strictly needed to the elaboration and
execution of the plan. Last but not least, ROS-TiPlEx could be equipped with
one level more of abstraction, in order to make its implementation independent
from the actual ROS version, because this OS is in constant evolution and a
new tool can not be limited by the versioning of the underlying platform. In
conclusion, the added value of ROS-TiPlEx is to bring a shared vision in the
process of development related to the P&amp;S applied to robotics, on the for of an
engineering tool that is able to connect di erent experts with di erent needs,
and help them to reach the common goal of the the mission scenario satisfaction.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bohren</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cousins</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The smach high-level executive [ros news]</article-title>
          .
          <source>IEEE Robotics Automation Magazine</source>
          <volume>17</volume>
          (
          <issue>4</issue>
          ),
          <volume>18</volume>
          {
          <fpage>20</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Cashmore</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fox</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Long</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Magazzeni</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ridder</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Carrera</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Palomeras</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hurtos</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Carreras</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Rosplan: Planning in the robot operating system</article-title>
          .
          <source>In: Proceedings of ICAPS</source>
          . vol. 2015-January, pp.
          <volume>333</volume>
          {
          <fpage>341</fpage>
          . AAAI press (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Chanel</surname>
            ,
            <given-names>C.P.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lesire</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Teichteil-Knigsbuch</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>A robotic execution framework for online probabilistic (re)planning</article-title>
          .
          <source>In: Proceedings of ICAPS</source>
          . AAAI press (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Cialdea</given-names>
            <surname>Mayer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Orlandini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Umbrico</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Planning and execution with exible timelines: a formal account</article-title>
          .
          <source>Acta Inf</source>
          .
          <volume>53</volume>
          (
          <issue>6-8</issue>
          ),
          <volume>649</volume>
          {
          <fpage>680</fpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>La</given-names>
            <surname>Viola</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          :
          <article-title>Ros-tiplex docker and installation details</article-title>
          . https://github.com/carloLV/ros-tiplex-docker,
          <source>accessed: 2019-07-22</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>La</given-names>
            <surname>Viola</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Orlandini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Umbrico</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Cesta</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Ros-tiplex: How to make experts in a.i. planning and robotics talk together and be happy</article-title>
          .
          <source>In: 28th IEEE International Conference on Robot &amp; Human Interactive Communication (ROMAN</source>
          <year>2019</year>
          )
          <article-title>(</article-title>
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lacerda</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parker</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hawes</surname>
          </string-name>
          , N.:
          <article-title>Optimal and dynamic planning for markov decision processes with co-safe ltl speci cations</article-title>
          .
          <source>In: IEEE International Conference on Intelligent Robots and Systems</source>
          . pp.
          <volume>1511</volume>
          {
          <fpage>1516</fpage>
          .
          <article-title>Institute of Electrical and Electronics Engineers Inc</article-title>
          . (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Muscettola</surname>
          </string-name>
          , N.:
          <article-title>HSTS: Integrating Planning and Scheduling</article-title>
          . In: Zweben,
          <string-name>
            <given-names>M.</given-names>
            and
            <surname>Fox</surname>
          </string-name>
          , M.S. (ed.)
          <article-title>Intelligent Scheduling</article-title>
          . Morgan Kau mann (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Quigley</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gerkey</surname>
            ,
            <given-names>B.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Conley</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faust</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Foote</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leibs</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Berger</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wheeler</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ng</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Ros : an open-source robot operating system</article-title>
          .
          <source>In: ICRA Workshop on Open Source Software</source>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Umbrico</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cesta</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cialdea</surname>
            <given-names>Mayer</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Orlandini</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Integrating resource management and timeline-based planning</article-title>
          .
          <source>In: The 28th International Conference on Automated Planning and Scheduling (ICAPS)</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Umbrico</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cesta</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cialdea</surname>
            <given-names>Mayer</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Orlandini</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Platinum: A new framework for planning and acting</article-title>
          .
          <source>In: AI*IA 2017 Advances in Arti cial Intelligence</source>
          . pp.
          <volume>498</volume>
          {
          <issue>512</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Ziparo</surname>
            ,
            <given-names>V.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Iocchi</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lima</surname>
            ,
            <given-names>P.U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nardi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Palamara</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          :
          <article-title>Petri net plans</article-title>
          .
          <source>Autonomous Agents and Multi-Agent Systems 23(3)</source>
          ,
          <volume>344</volume>
          {
          <fpage>383</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>