Bridging the Gap: Model-Driven Development and ROS

Model-driven development (MDD) has long proven its value in software engineering, but they have struggled to gain traction in robotics. Why? Because we already have ROS and ROS 2. Their development methodology - centered on writing code by hand - doesn’t align well with traditional MDD. For years, ROS became the de facto standard thanks to its advantages and strong community, so there was little motivation to “reinvent the wheel” with new approaches.

But robotics has changed. Nowadays, robotic systems are increasingly complex and modular, which is why MDD can provide significant benefits.

As someone who strongly believes in the ROS ecosystem, I’ve been exploring ways to bridge the gap between ROS and MDD. My approach allows developers to keep building components in the usual way while using introspection and static code analysis to automatically transform those components into models. These models can then be composed at the system level, validated, and used to generate ROS deployment artifacts. In other words, let the programmer focus on the complex logic, while automating the generation of package.xml, CMakeLists, launch files, documentation, and similar artifacts.

I’ve also conducted an evaluation study to show when this approach is most useful and what concrete benefits it brings.

This study was recently published, and it is available online at https://journals.sagepub.com/doi/pdf/10.1177/17298806251363648

From all the data collected, you can see these two graphs showing the reduction in development time as the complexity of the system increases, and how the number of lines of code written is reduced, and more importantly, the files (and languages) to be implemented.

The most relevant positive outcomes os this study are:

  • MDD reduces testing time and error correction effort.
  • Once learned and supported by a model base, development time is significantly reduced.
  • Code generation reduces manual coding and lowers the risk of errors.
  • Developers only need to learn one modeling language instead of multiple programming languages.
  • MDD improves portability, which is especially beneficial for modular robots and serial production.

The following repository collects all the files and data: GitHub - ipa-nhg/MDD_Evaluation_Study.github.io: This repository collects data from the study carried out to evaluation the use of MDD techniques over ROS

I hope this information is useful. If you would like to collaborate on this line of research or get more information about what I have done, please do not hesitate to contact me.

:woman_raising_hand: https://www.linkedin.com/in/nadiahg/

6 Likes