1. College of Computer, National University of Defense Technology, Changsha 410000, China 2. Key Laboratory of Software Engineering for Complex Systems, Changsha 410000, China 3. College of Systems Engineering, National University of Defense Technology, Changsha 410000, China 4. College of Computer Science and Technology, Zhejiang University, Hangzhou 310058, China
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.
Function:start the setup helperCharacteristics:MoveIt
moveit_setup_assistant
6-2 Provide base 3D markers
Function:provide base markersCharacteristics:3D marker
aruco_ros
6-3 Start the server for grasp with MoveIt
Function:start the serverCharacteristics:grasp, MoveIt
moveit_simple_grasps
Tab.5
Fig.12
Sample size
Top1
Top5
Top10
Top15
Top20
10
0.70
0.80
0.80
0.90
0.90
20
0.65
0.70
0.75
0.75
0.75
30
0.50
0.73
0.73
0.80
0.80
40
0.63
0.73
0.78
0.80
0.80
50
0.58
0.72
0.80
0.80
0.82
60
0.55
0.73
0.80
0.82
0.82
70
0.56
0.71
0.77
0.79
0.80
80
0.58
0.73
0.76
0.78
0.79
90
0.60
0.72
0.79
0.81
0.82
100
0.56
0.70
0.76
0.78
0.79
Tab.6
Fig.13
Fig.14
Fig.15
Method
Average time/s
Coefficient of variation
RPKG
1.017
0.572
ROS Index
0.069
1.522
GitHub
0.541
1.523
Google
0.305
0.190
ChatGPT
24.611
1.523
Tab.7
Fig.16
1
S, Kolak A, Afzal Goues C, Le M, Hilton C S Timperley . 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
M, Quigley K, Conley B P, Gerkey J, Faust T, Foote J, Leibs R, Wheeler A Y Ng . ROS: an open-source robot operating system. In: Proceedings of the ICRA Workshop on Open Source Software. 2009
3
M, Pichler B, Dieber M Pinzger . 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
S, Robertson H Zaragoza . 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
K, Yang X, Mao S, Wang T, Zhang B, Lin Y, Wang Y, Qin Z, Zhang X Mao . Enhancing code intelligence tasks with ChatGPT. 2023, arXiv preprint arXiv: 2312.15202
8
P, Estefo J, Simmonds R, Robbes J Fabry . The robot operating system: package reuse and community dynamics. Journal of Systems and Software, 2019, 151: 226–242
9
P, Estefo R, Robbes J Fabry . Code duplication in ROS launchfiles. In: Proceedings of the 34th International Conference of the Chilean Computer Science Society. 2015, 1–6
10
G, Jiang X Mao . 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
T, Witte M Tichy . Checking consistency of robot software architectures in ROS. In: Proceedings of the 1st International Workshop on Robotics Software Engineering. 2018, 1–8
12
I, Malavolta G A, Lewis B, Schmerl P, Lago D Garlan . Mining guidelines for architecting robotics software. Journal of Systems and Software, 2021, 178: 110969
13
P, Canelas M, Tavares R, Cordeiro A, Fonseca C S Timperley . 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
S, Macenski T, Foote B, Gerkey C, Lalancette W Woodall . Robot operating system 2: design, architecture, and uses in the wild. Science Robotics, 2022, 7( 66): eabm6074
15
J, Sun Z, Xing R, Chu H, Bai J, Wang X Peng . 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
S, Bo X, Mao S, Yang L Chen . 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
M, Tenorth M Beetz . KnowRob: a knowledge processing infrastructure for cognition-enabled robots. The International Journal of Robotics Research, 2013, 32( 5): 566–590
18
Y, Zou M, Wang B, Xie Z Lin . Software knowledge graph construction and Q&A technology based on big data. Big Data Research, 2021, 7( 1): 22–36
19
R C, Seacord S A, Hissam K C Wallnau . AGORA: a search engine for software components. IEEE Internet Computing, 1998, 2( 6): 62
20
Pino B E López . Sistema de recomendación de expertos para ROS Answers. Universidad de Chile, Dissertation, 2019
21
Z, Yang E Nyberg . 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
Silva R F G, da C K, Roy M M, Rahman K A, Schneider K, Paixão Carvalho Dantas C E, de Almeida Maia M de . CROKAGE: effective solution recommendation for programming tasks by leveraging crowd knowledge. Empirical Software Engineering, 2020, 25( 6): 4707–4758
23
J, Devlin M W, Chang K, Lee K Toutanova . 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
H, Li S, Li J, Sun Z, Xing X, Peng M, Liu X Zhao . 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
X, Ren X, Ye Z, Xing X, Xia X, Xu L, Zhu J Sun . 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
Y, Liu M, Liu X, Peng C, Treude Z, Xing X Zhang . 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
R, Singh N S Mangat . Elements of Survey Sampling. Dordrecht: Springer, 1996
28
J R, Landis G G Koch . An application of hierarchical kappa-type statistics in the assessment of majority agreement among multiple observers. Biometrics, 1977, 33( 2): 363–374
29
A, Mahtani L, Sánchez E, Fernández A Martinez . Effective Robotics Programming with ROS. 3rd ed. Birmingham: Packt Publishing Ltd, 2016
30
C, Fairchild T L Harman . ROS Robotics By Example: Learning to Control Wheeled, Limbed, and Flying Robots Using ROS Kinetic Kame. 2nd ed. Birmingham: Packt Publishing Ltd, 2017
31
R, Gandhinathan L Joseph . 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