ROS package search for robot software development: a knowledge graph-based approach

Shuo WANG, Xinjun MAO, Shuo YANG, Menghan WU, Zhang ZHANG

PDF(5039 KB)
PDF(5039 KB)
Front. Comput. Sci. ›› 2025, Vol. 19 ›› Issue (6) : 196320. DOI: 10.1007/s11704-024-3660-9
Artificial Intelligence
RESEARCH ARTICLE

ROS package search for robot software development: a knowledge graph-based approach

Author information +
History +

Abstract

In recent years, ROS (Robot Operating System) packages have become increasingly popular as a type of software artifact that can be effectively reused in robotic software development. Indeed, finding suitable ROS packages that closely match the software’s functional requirements from the vast number of available packages is a nontrivial task using current search methods. The traditional search methods for ROS packages often involve inputting keywords related to robotic tasks into general-purpose search engines (e.g., Google) or code hosting platforms (e.g., GitHub) to obtain approximate results of all potentially suitable ROS packages. However, the accuracy of these search methods remains relatively low because the task-related keywords may not precisely match the functionalities offered by the ROS packages. To improve the search accuracy of ROS packages, this paper presents a novel semantic-based search approach that relies on the semantic-level ROS Package Knowledge Graph (RPKG) to automatically retrieve the most suitable ROS packages. Firstly, to construct the RPKG, we employ multi-dimensional feature extraction techniques to extract semantic concepts, including code file name, category, hardware device, characteristics, and function, from the dataset of ROS package text descriptions. The semantic features extracted from this process result in a substantial number of entities (32,294) and relationships (54,698). Subsequently, we create a robot domain-specific small corpus and further fine-tune a pre-trained language model, BERT-ROS, to generate embeddings that effectively represent the semantics of the extracted features. These embeddings play a crucial role in facilitating semantic-level understanding and comparisons during the ROS package search process within the RPKG. Secondly, we introduce a novel semantic matching-based search algorithm that incorporates the weighted similarities of multiple features from user search queries, which searches out more accurate ROS packages than the traditional keyword search method. To validate the enhanced accuracy of ROS package searching, we conduct comparative case studies between our semantic-based search approach and four baseline search approaches: ROS Index, GitHub, Google, and ChatGPT. The experiment results demonstrate that our approach achieves higher accuracy in terms of ROS package searching, outperforming the other approaches by at least 21% from 5 levels, including top1, top5, top10, top15, and top20.

Graphical abstract

Keywords

robot software / ROS / package search / knowledge graph

Cite this article

Download citation ▾
Shuo WANG, Xinjun MAO, Shuo YANG, Menghan WU, Zhang ZHANG. ROS package search for robot software development: a knowledge graph-based approach. Front. Comput. Sci., 2025, 19(6): 196320 https://doi.org/10.1007/s11704-024-3660-9

Shuo Wang is a PhD graduate student in the College of Computer, National University of Defense Technology, China. His research interests include robotics software engineering, data mining, and knowledge graph

Xinjun Mao is a professor in the College of Computer, National University of Defense Technology, China. He received his PhD degree in computer science from the National University of Defense Technology, China in 1998. His research interests include intelligent software engineering, multi-agent system, autonomous robot software, self-adaptive system, and crowdsourcing

Shuo Yang is a lecturer in the College of Systems Engineering, National University of Defense Technology, China. He received his PhD degree in software engineering from National University of Defense Technology, China in 2022. His research interests include robotics software engineering, automated planning, and component-based robotic frameworks

Menghan Wu is a PhD student at the College of Computer Science and Technology, Zhejiang University, China. Her current research interests include artificial intelligence for software engineering

Zhang Zhang is a PhD graduate student in the College of Computer, National University of Defense Technology, China. His work interests include open source software engineering, data mining, and crowdsourced learning

References

[1]
Kolak S, Afzal A, Le Goues C, Hilton M, Timperley C S. It takes a village to build a robot: an empirical study of the ROS ecosystem. In: Proceedings of 2020 IEEE International Conference on Software Maintenance and Evolution. 2020, 430–440
[2]
Quigley M, Conley K, Gerkey B P, Faust J, Foote T, Leibs J, Wheeler R, Ng A Y. ROS: an open-source robot operating system. In: Proceedings of the ICRA Workshop on Open Source Software. 2009
[3]
Pichler M, Dieber B, Pinzger M. Can I depend on you? Mapping the dependency and quality landscape of ROS packages. In: Proceedings of the 3rd IEEE International Conference on Robotic Computing. 2019, 78–85
[4]
Cousins S, Gerkey B, Conley K, Garage W . Sharing software with ROS [ROS topics]. IEEE Robotics & Automation Magazine, 2010, 17( 2): 12–14
[5]
Robertson S, Zaragoza H . The probabilistic relevance framework: BM25 and beyond. Foundations and Trends® in Information Retrieval, 2009, 3( 4): 333–389
[6]
Booth J D. Github Succinctly. Syncfusion, 2016
[7]
Yang K, Mao X, Wang S, Zhang T, Lin B, Wang Y, Qin Y, Zhang Z, Mao X. Enhancing code intelligence tasks with ChatGPT. 2023, arXiv preprint arXiv: 2312.15202
[8]
Estefo P, Simmonds J, Robbes R, Fabry J . The robot operating system: package reuse and community dynamics. Journal of Systems and Software, 2019, 151: 226–242
[9]
Estefo P, Robbes R, Fabry J. Code duplication in ROS launchfiles. In: Proceedings of the 34th International Conference of the Chilean Computer Science Society. 2015, 1–6
[10]
Jiang G, Mao X. Exploring problems and solutions about launch files in ROS from Q&A community. In: Proceedings of the 3rd International Conference on Big Data & Artificial Intelligence & Software Engineering. 2022, 9–14
[11]
Witte T, Tichy M. Checking consistency of robot software architectures in ROS. In: Proceedings of the 1st International Workshop on Robotics Software Engineering. 2018, 1–8
[12]
Malavolta I, Lewis G A, Schmerl B, Lago P, Garlan D . Mining guidelines for architecting robotics software. Journal of Systems and Software, 2021, 178: 110969
[13]
Canelas P, Tavares M, Cordeiro R, Fonseca A, Timperley C S. An experience report on challenges in learning the robot operating system. In: Proceedings of the 4th IEEE/ACM International Workshop on Robotics Software Engineering. 2022, 33–38
[14]
Macenski S, Foote T, Gerkey B, Lalancette C, Woodall W . Robot operating system 2: design, architecture, and uses in the wild. Science Robotics, 2022, 7( 66): eabm6074
[15]
Sun J, Xing Z, Chu R, Bai H, Wang J, Peng X. Know-how in programming tasks: from textual tutorials to task-oriented knowledge graph. In: Proceedings of 2019 IEEE International Conference on Software Maintenance and Evolution. 2019, 257–268
[16]
Bo S, Mao X, Yang S, Chen L. Towards an efficient searching approach of ROS message by knowledge graph. In: Proceedings of the 46th IEEE Annual Computers, Software, and Applications Conference. 2022, 934–943
[17]
Tenorth M, Beetz M . KnowRob: a knowledge processing infrastructure for cognition-enabled robots. The International Journal of Robotics Research, 2013, 32( 5): 566–590
[18]
Zou Y, Wang M, Xie B, Lin Z . Software knowledge graph construction and Q&A technology based on big data. Big Data Research, 2021, 7( 1): 22–36
[19]
Seacord R C, Hissam S A, Wallnau K C . AGORA: a search engine for software components. IEEE Internet Computing, 1998, 2( 6): 62
[20]
López Pino B E. Sistema de recomendación de expertos para ROS Answers. Universidad de Chile, Dissertation, 2019
[21]
Yang Z, Nyberg E. Leveraging procedural knowledge for task-oriented search. In: Proceedings of the 38th International ACM SIGIR Conference on Research and Development in Information Retrieval. 2015, 513–522
[22]
da Silva R F G, Roy C K, Rahman M M, Schneider K A, Paixão K, de Carvalho Dantas C E, de Almeida Maia M . CROKAGE: effective solution recommendation for programming tasks by leveraging crowd knowledge. Empirical Software Engineering, 2020, 25( 6): 4707–4758
[23]
Devlin J, Chang M W, Lee K, Toutanova K. BERT: pre-training of deep bidirectional transformers for language understanding. In: Proceedings of 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. 2019, 4171–4186
[24]
Li H, Li S, Sun J, Xing Z, Peng X, Liu M, Zhao X. Improving API caveats accessibility by mining API caveats knowledge graph. In: Proceedings of 2018 IEEE International Conference on Software Maintenance and Evolution. 2018, 183–193
[25]
Ren X, Ye X, Xing Z, Xia X, Xu X, Zhu L, Sun J. API-misuse detection driven by fine-grained API-constraint knowledge graph. In: Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering. 2020, 461–472
[26]
Liu Y, Liu M, Peng X, Treude C, Xing Z, Zhang X. Generating concept based API element comparison using a knowledge graph. In: Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering. 2020, 834–845
[27]
Singh R, Mangat N S. Elements of Survey Sampling. Dordrecht: Springer, 1996
[28]
Landis J R, Koch G G . An application of hierarchical kappa-type statistics in the assessment of majority agreement among multiple observers. Biometrics, 1977, 33( 2): 363–374
[29]
Mahtani A, Sánchez L, Fernández E, Martinez A. Effective Robotics Programming with ROS. 3rd ed. Birmingham: Packt Publishing Ltd, 2016
[30]
Fairchild C, Harman T L. ROS Robotics By Example: Learning to Control Wheeled, Limbed, and Flying Robots Using ROS Kinetic Kame. 2nd ed. Birmingham: Packt Publishing Ltd, 2017
[31]
Gandhinathan R, Joseph L. ROS Robotics Projects: Build and Control Robots Powered by the Robot Operating System, Machine Learning, and Virtual Reality. 2nd ed. Birmingham: Packt Publishing Ltd, 2019

Acknowledgements

This work was supported by the National Natural Science Foundation of China (Grant No. 62172426), the National Key R&D Program of China (2023YFB4503802) and the National University of Defense Technology Young Scientist Self-Innovation Science Fund Project (ZK2023-36).

Competing interests

The authors declare that they have no competing interests or financial conflicts to disclose.

RIGHTS & PERMISSIONS

2025 Higher Education Press
AI Summary AI Mindmap
PDF(5039 KB)

Accesses

Citations

Detail

Sections
Recommended

/