Skip to content

Abstract

Robotic applications are often designed to be
reusable and configurable. Sometimes, due to the different supported software and hardware components, as well as the different implemented robot capabilities, the total number of possible configurations for a single system can be extremely large. In these scenarios, understanding how different configurations coexist and which components and capabilities are compatible with each other is a significant time sink both for developers and end users alike. In this paper, we present a static analysis tool, specifically designed for robotic software developed for the Robot Operating System (ROS), that is capable of presenting a graphical and interactive overview of the system’s runtime variability, with the goal of simplifying the deployment of the desired robot configuration.

Introduction

Robots are evolving at an astounding pace in recent years. Developments in software controllers and hardware components led us from mostly static machines, performing repetitive tasks, to autonomous vehicles and assistants, capable of adapting to a multitude of scenarios. This shift is associated with highly modular designs, now pursued by many robot makers, that enable users to switch software and hardware components as they see fit – be it for cost reduction, or simply to enable different capabilities. As long as the different components agree on a communication interface and protocol, the same robotic components that are assembling goods in a factory today, could be helping doctors save lives tomorrow.

The use of middlewares, such as the Robot Operating System (ROS) [1], was crucial to standardize communication interfaces, as well as managing some of the complexity associated with lower-level tasks. ROS is very lenient in its design, enabling highly dynamic and reconfigurable applications based on independent components and message exchange channels. However, while key to achieve modularity, this level of flexiblity raises an array of well-known problems in software engineering,namely variability management.

Variability essentially describes the features of a system, points where components, parameters, or capabilities may change due to configuration. As the number of features increases and their interaction becomes more complex, development becomes unmanageable without a unified view of the commonalities and variation points among the acceptable configurations of a system (i.e., its variants or products), leading to the concept of Software Product Line (SPL) development [2]. Here, domain engineering is fundamental, which includes domain analysis – identifying and analysing the interaction between different features, including detecting invalid configurations – domain design – defining a generic system architecture shared by all variants – and domain implementation – defining how variability is resolved to obtain executable applications.

This work focuses precisely on variability management in the ROS ecosystem, a domain where the issue is evident – robots such as the TurtleBot2, a simple mobile robot with a few different sensors, already come with hundreds of packaged configurations. We first studied how variability manifests in a ROS application and how it is often expressed. We found out that variability management is a mostly manual and error-prone process, both for developers and (perhaps more so) for users. This served as motivation for us to develop a methodology and tool where ROS applications are interpreted as SPLs.

The proposed technique shows that it is possible, albeit with some assumptions and limitations, to automatically extract variability points (features) from source code, namely launch files (commonly used both in ROS and ROS2), and identify feature conflicts that would lead to invalid configurations. This extracted information is displayed graphically to support the developer in domain analysis. To aid in domain design, the tool presents the system’s computation graph – its runtime architecture – annotated with presence conditions, aiding the user in understanding which runtime entities are tied to particular features. Users can select features and see live updates on the shape of the resulting graph. Users are also alerted when a given configuration is potentially invalid, according
to a limited set of rules. Lastly, the tool supports domain implementation by generating a configuration artefact (a launch command) that deploys the selected variant.
For evaluation purposes, we have studied four open-source robotic systems in depth and assessed how the tool handled source code from those real-world applications. The technique was implemented on top of the HAROS [3], [4] framework for the development of high-assurance ROS applications, providing a friendly interface for ROS developers. This is also a first step towards supporting variability-aware analyses that would not otherwise scale if applied individually to each of the (many possible) configurations.

The remainder of this paper is structured as follows.
Section II provides some necessary background on software variability. Section III complements it, providing background on ROS and how variability may manifest in ROS applications according to our preliminary study. We follow with Section IV, describing our approach and tool implementation, which are evaluated in Section V. Lastly, Section VI compares our work to prior approaches in the same domain, and Section VII lays down our conclusions and directions for future work.

[1] M. Quigley, K. Conley, B. P. Gerkey, J. Faust, T. Foote, J. Leibs, R. Wheeler, and A. Y. Ng, “ROS: An open-source Robot Operating System,” in ICRA Workshop on Open Source Software, 2009.
[2] S. Apel, D. Batory, C. Kästner, and G. Saake, Feature-oriented Software Product Lines. Springer, 2016.
[3] A. Santos, A. Cunha, N. Macedo, and C. Lourenço, “A framework for quality assessment of ROS repositories,” in IROS. IEEE, 2016, pp. 4491–4496.

Conclusion

Variability analysis is a current and complex problem in the world of software engineering, but especially so in robotics.
As developers shift deeper into modular designs, building a robotic system revolves largely around reusing, configuring and orchestrating third-party components. This can be seen in ROS launch files, files designed for the purpose of system orchestration, which are also a major source of variability.
In this paper, we have proposed a method to automatically extract a variability model of a ROS application, and presented a prototype tool that implements this approach. The interactive view shows how each feature will impact the system’s architecture at runtime, as it calculates the resulting ROS computation graph in real time. The tool is also capable of identifying invalid configurations and allows users to execute queries over the model, to identify further issues.
XML launch files are supported by the original ROS and
ROS2, but the latter favours Python launch files instead, which make analysis much more of a challenge. Regardless, it is a challenge that we intend to take on.
Another limitation of our approach is that static analysis is sometimes unable to extract a fully resolved computation graph, as evidenced during our experiments. The underlying tool for this, HAROS, requires user-provided extraction hints that supply the missing pieces of information. In our case, such hints must also take presence conditions into consideration, since the way a system’s features are integrated and configured certainly has an effect on the final product. How to best approach this is a challenge that we intend to study further.
Lastly, we intend to explore how software analysis tools, such as HAROS, can be altered or reused in such a way that they are able to operate on variational models. The goal is to, ideally, analyse once, and determine all possible configurations that would cause an issue to manifest.

Acknowledgement

The research leading to these results has received funding support from the projects: “STEROID – Verification and Validation of ADAS Components for
Intelligent Vehicles of the Future” from the European Union Financial Support (FEDER) under grant agreement No. 69989; “NORTE-06-3559-FSE-000046 – Emprego altamente qualificado nas empresas – Contratação de Recursos Humanos Altamente Qualificados (PME ou CoLAB)” financed by the Norte’s Regional Operational Programme (NORTE 2020) through the European Social Fund (ESF); and National Funds through the Portuguese funding agency, FCT – Fundação para a Ciência e a Tecnologia, within project LA/P/0063/2020.

Access Complete Publication

For an in-depth exploration of our findings and methodologies, download here

shape
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.