ROSInfer


Finding Architectural Bugs in ROS-based Robotics Systems

Model-based analysis is a common technique to identify incorrect behavioral composition of complex, safety-critical systems, such as robotics systems. However, creating structural and behavioral models for hundreds of software components manually is often a labor-intensive and error-prone process. In this project, we present an approach to infer behavioral models for components of systems based on the Robot Operating System (ROS), the most popular framework for robotics systems, using static analysis by exploiting assumptions about the usage of the ROS framework. This work is a contribution towards making well-proven and powerful but infrequently used methods of model-based analysis more accessible and economical in practice to make robotics systems more reliable and safe.

We are looking for ROS developers who would like to apply our tools to their projects. Currently our tools only support ROS 1 project written in C++ (we might add ROS 2 and Python later). If you are interested, please email us at duerschmid@cmu.edu and put ROSInfer in the subject line.

We are also very interested in learning about real-world bugs that developers experience in their projects, and challenges in composing architectures. If you would like to share your experience with you, please send us a message! This will help us to build tools that are more usable in your practical setting.


Tell Us About YOUR Bugs!

Send via Formspree.

2024

ROSInfer: Statically Inferring Behavioral Component Models for ROS-based Robotics Systems

Tobias Dürschmid, Chris Timperley, David Garlan, and Claire Le Goues
ICSE '24: 46th International Conference on Software Engineering 2024

Abstract, BibTeX, Tool, Paper (Open Access)

Robotics systems are complex, safety-critical systems that can consist of hundreds of software components that interact with each other dynamically during run time. Software components of robotics systems often exhibit reactive, periodic, and state-dependent behavior. Incorrect component composition can lead to unexpected behavior, such as components passively waiting for initiation messages that never arrive. Model-based software analysis is a common technique to identify incorrect behavioral composition by checking desired properties of given behavioral models that are based on component state machines. However, writing state machine models for hundreds of software components manually is a labor-intensive process. This motivates work on automated model inference. In this paper, we present an approach to infer behavioral models for systems based on the Robot Operating System (ROS) using static analysis by exploiting assumptions about the usage of the ROS API and ecosystem. Our approach is based on searching for common behavioral patterns that ROS developers use for implementing reactive, periodic, and state-dependent behavior using the ROS framework API.We evaluate our approach and our tool ROSInfer on five complex real-world ROS systems with a total of 532 components. For this purpose we manually created 155 models of components from the source code to be used as a ground truth and available data set for other researchers. ROSInfer can infer causal triggers for 87 % of component architectural behaviors in the 532 components.

@inproceedings{Duerschmid2024ROSInfer,
  author = {D\"{u}rschmid, Tobias and Timperley, Christopher Steven and Garlan, David and {Le~Goues}, Claire},
  title = {ROSInfer: Statically Inferring Behavioral Component Models for ROS-based Robotics Systems},
  year = {2024},
  isbn = {9798400702174},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  url = {https://doi.org/10.1145/3597503.3639206},
  doi = {10.1145/3597503.3639206},
  booktitle = {Proceedings of the IEEE/ACM 46th International Conference on Software Engineering},
  articleno = {144},
  numpages = {13},
  location = {Lisbon, Portugal},
  series = {ICSE '24}
}

2022

ROSDiscover: Statically Detecting Run-Time Architecture Misconfigurations in Robotics Systems

Chris Timperley, Tobias Dürschmid, Bradley Schmerl, David Garlan, and Claire Le Goues
ICSA '22: 19th IEEE International Conference on Software Architecture 2022

Abstract, BibTeX, DOI, Tool, Talk, Replication Package

Robot systems are growing in importance and complexity. At the same time, it is becoming more important for them to be free of errors. Ecosystems for robot software, such as the Robot Operating System (ROS), provide libraries of reusable software components that can be configured and composed into larger systems. To support compositionality, ROS uses late binding and architecture configuration via “launch files” that describe how to initialize the components in a system. However, late binding often leads to systems failing silently due to misconfiguration, for example by misrouting or dropping messages entirely. In this paper we present ROSDiscover, which statically recovers the run-time architecture of ROS systems to find such architecture misconfiguration bugs. First, ROSDiscover constructs component level architectural models (ports, parameters) from source code. Second, architecture configuration files are analyzed to compose the system from these component models and derive the connections in the system. Finally, the reconstructed architecture is checked against architectural rules described in first-order logic to identify potential misconfigurations. We present an evaluation of ROSDiscover on real world, offthe-shelf robotic systems, measuring the accuracy, effectiveness, and practicality of our approach. To that end, we collected the first data set of architecture configuration bugs in ROS from popular open-source systems and measure how effective our approach is for detecting configuration bugs in that set.

@inproceedings{Timperley2022ROSDiscover,
  author = {Timperley, Christopher S. and D\"{u}rschmid, Tobias and Schmerl, Bradley and Garlan, David and {Le~Goues}, Claire},
  title = {ROSDiscover: Statically Detecting Run-Time Architecture Misconfigurations in Robotics Systems},
  booktitle = {Proceedings of the 19th IEEE International Conference on Software Architecture.},
  series = {ICSA '22},
  year = {2022},
  numpages = {12}, 
  location = {Honolulu, HI, USA},
  publisher = {IEEE},
  pages={112-123},
  doi={10.1109/ICSA53651.2022.00019}
}