# Modeling and Recovering Hierarchical Structural Architectures of ROS 2 Systems from Code and Launch Configurations using LLM-based Agents

arXiv: https://arxiv.org/abs/2602.18644 · HTML: https://mlsanity.com/paper/2602.18644/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use.
- Builds on 3 of its 24 references that are in the map.
- First posted on arXiv 20 Feb 2026.

## Placed in

- LLM agents and tool use / [Software engineering coding agents](https://mlsanity.com/agents/software-engineering-coding-agents/)

## Builds on (most cited first, 3 of 3)

- [MeROS: SysML-based Metamodel for ROS-based Systems](https://mlsanity.com/paper/2303.08254/) (2023)
- [Generating Software Architecture Description from Source Code using Reverse Engineering and Large Language Model](https://mlsanity.com/paper/2511.05165/) (2025)
- [Towards Automatically Extracting UML Class Diagrams from Natural Language Specifications](https://mlsanity.com/paper/2210.14441/) (2022)

## Built on by (most cited first, 2 of 2)

- [Describing Agentic AI Systems with C4: Lessons from Industry Projects](https://mlsanity.com/paper/2603.15021/) (2026)
- [Towards LLM-Assisted Architecture Recovery for Real-World ROS~2 Systems: An Agent-Based Multi-Level Approach to Hierarchical Structural Architecture Reconstruction](https://mlsanity.com/paper/2605.20055/) (2026)

## Abstract (arXiv)

Model-Driven Engineering (MDE) relies on explicit architecture models to document and evolve systems across abstraction levels. For ROS~2, subsystem structure is often encoded implicitly in distributed configuration artifacts -- most notably launch files -- making hierarchical structural decomposition hard to capture and maintain. Existing ROS~2 modeling approaches cover node-level entities and wiring, but do not make hierarchical structural (de-)composition a first-class architectural view independent of launch artifacts. We contribute (1) a UML-based modeling concept for hierarchical structural architectures of ROS~2 systems and (2) a blueprint-guided automated recovery pipeline that reconstructs such models from code and configuration artifacts by combining deterministic extraction with LLM-based agents. The ROS~2 architectural blueprint (nodes, topics, interfaces, launch-induced wiring) is encoded as structural contracts to constrain synthesis and enable deterministic validation, improving reliability. We evaluate the approach on three ROS~2 repositories, including an industrial-scale code subset. Results show high precision across abstraction levels, while subsystem-level recall drops with repository complexity due to implicit launch semantics, making high-level recovery the remaining challenge.
