arrow
Return

Evaluating LLMs in ROS robotic software code generation

delete2026-08-05
delete0
PRE
AI
Y
Yuxin Zhao *
X
Xinjun Mao
T
Tanghaoran Zhang
T
Tun Li
Z
Zhiqun Xiao
DOI:10.1007/s10664-026-10910-7delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code generation has emerged as a valuable technique for accelerating robotic software development. However, unlike general-purpose programming, generating code for Cyber-Physical Systems (CPS) requires navigating complex, domain-specific frameworks like the Robot Operating System (ROS). Although Large Language Models (LLMs) excel in general-purpose code generation, their capability to synthesize executable, middleware-compliant ROS code remains poorly understood. This task demands that LLMs not only solve robotic tasks but also generate code that seamlessly integrates within the distributed ROS framework. To address this gap, we construct ROSDevEval, a specialized benchmark comprising 240 real-world ROS programming tasks, and conduct a comprehensive empirical study to evaluate four state-of-the-art LLMs alongside a specialized code assistant (GitHub Copilot). Our results reveal a severe domain capability gap: while state-of-the-art LLMs achieve up to 88.4% Pass@1 on general-purpose C++, their performance suffers a precipitous relative decline ranging from 78.8% to 85.4% in robotic contexts, and even the specialized assistant struggles to exceed a 32.5% success rate. Through a rigorous open-coding analysis, we systematically categorize LLMs’ generation failures into two distinct dimensions. In robotic task resolution, LLMs struggle to apply physical constraints and produce functional logic. In ROS framework integration, they systematically violate strict middleware contracts required for system orchestration. Furthermore, our root cause analysis explicitly decouples these surface-level failures from their underlying etiology, revealing a profound dual cognitive deficit: LLMs lack the long-horizon procedural decomposition capability to translate abstract tasks into executable sequences, and they fail to grasp the rigid architectural topology required for distributed system integration. These findings delineate current limitations and provide actionable, architecture-aware implications for advancing the next generation of robotic foundation models. Code and datasets are available at https://github.com/zyx065/rosdeveval .
Keywords:
Code generation
Robot software
Robot operating system
Large language model

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

N
National University of Defense and Technology
Scholars:
27
Papers: 4
Citations: 0
Cited Papers

Cited Papers

Code as Policies: Language Model Programs for Embodied Control
err2023-05-29
err0
errOAAI
errJacky Liang; Wenlong Huang; Fei Xia; Peng Xu; Karol Hausman; Brian Ichter; Pete Florence; Andy Zeng
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Safety for mobile robotic systems: A systematic mapping study from a software engineering perspective
err2019-05-01
err36
errOAAI
errBozhinoski, Darko; Di Ruscio, Davide; Malavolta, Ivano; Pelliccione, Patrizio; Crnkovic, Ivica
errShare
errSave
Demystifying issues, causes and solutions in LLM open-source projects
err2025-05-05
err0
PREAI
errCai, Yangxiao; Liang, Peng; Wang, Yifei; Li, Zengyang; Shahin, Mojtaba
errShare
errSave
CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-X
err2023-08-04
err0
errOAAI
errQinkai Zheng; Xiao Xia; Xu Zou; Yuxiao Dong; Shan Wang; Yufei Xue; Lei Shen; Zihan Wang; Andi Wang; Yang Li; Teng Su; Zhilin Yang; Jie Tang
errShare
errSave
Industrial Progress of Robotic Automation in Mining Applications: A Survey
err2025-04-01
err0
PREAI
errDu,Haiping; Chan,Linping; Tong,Jun; Raad,Raad; Naghdy,Fazel; Guo,Qinghua; Yu,Yanguang; Islam,Md Rabiul; Tubbal,Faisel; Ros,Montserrat; Li,Zheng; Ritz,Christian
errShare
errSave
Runtime Verification and Field-Based Testing for ROS-Based Robotic Systems
err2024-10-01
err0
errOAAI
errCaldas, Ricardo; Garcia, Juan Antonio Pinera; Schiopu, Matei; Pelliccione, Patrizio; Rodrigues, Genaina; Berger, Thorsten
errShare
errSave
researcher View more