Please wait a minute...
Frontiers of Computer Science

ISSN 2095-2228

ISSN 2095-2236(Online)

CN 10-1014/TP

邮发代号 80-970

2019 Impact Factor: 1.275

Frontiers of Computer Science  2025, Vol. 19 Issue (6): 196320   https://doi.org/10.1007/s11704-024-3660-9
  本期目录
ROS package search for robot software development: a knowledge graph-based approach
Shuo WANG1,2(), Xinjun MAO1,2(), Shuo YANG3, Menghan WU4, Zhang ZHANG1,2
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
 全文: PDF(5039 KB)   HTML
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.

Key words: robot software    ROS    package search    knowledge graph
收稿日期: 2023-08-19      出版日期: 2024-08-29
Corresponding Author(s): Xinjun MAO   
 引用本文:   
. [J]. Frontiers of Computer Science, 2025, 19(6): 196320.
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://academic.hep.com.cn/fcs/CN/10.1007/s11704-024-3660-9
https://academic.hep.com.cn/fcs/CN/Y2025/V19/I6/196320
Fig.1  
Fig.2  
Fig.3  
Fig.4  
Fig.5  
Fig.6  
Fig.7  
Fig.8  
Feature Regular expression
Function(VB.*) + (CD) * (DT)?(CD) * (JJ) * (CD) * (VBD|VBG) * (NN.*) * (POS) * (CD) * (VBD|VBG) * (NN.*) * (VBD|VBG) * (NN.*) * (POS) * (CD) * (NN.*)+
Characteristics(CD) * (DT)?(CD) * (JJ) * (CD) * (VBD|VBG) * (NN.*) * (POS) * (CD) * (VBD|VBG) * (NN.*) * (VBD|VBG) * (NN.*) * (POS) * (CD) * (NN.*)+
Tab.1  
Fig.9  
Phrase#1Phrase#2Cosine similarity of embeddings
BERT-BaseBERT-ROS
TurtlebotTurtlebot20.8340.954
TurtlebotTurtlebot30.8310.936
Turtlebot2Turtlebot30.9310.915
rplidarrospeex0.7960.682
bringup rplidarstart rplidar sensor0.8680.885
MoveIt frameworkMoveIt library0.8980.901
Gazebo simulatorGazebo simulation environment0.8640.881
OMPLOpen Manipulator Planning Library0.6580.779
Tab.2  
Fig.10  
  
FeaturesHints for user input
RobotWhat robot do you use?
SensorWhat sensor do you use?
CategoryWhat is the category of the package?
FunctionWhat is the expected function of the package?
CharacteristicsList the characteristics of the package, separated by commas
ActionWhat is the action name in the package?
NodeWhat is the node name in the package?
ServiceWhat is the service name in the package?
MessageWhat is the message name in the package?
LaunchWhat is the launch name in the package?
Tab.3  
AspectAccuracy#1Accuracy#2Accuracy#FKappa agreement
Code file names100.0%100.0%100.0%1.000
Package category100.0%100.0%100.0%1.000
Hardware device95.8%96.9%95.8%0.852
Function93.0%90.1%91.6%0.898
Characteristics90.3%92.5%93.0%0.748
Tab.4  
Fig.11  
Task No.Subtask descriptionQuery for ROS packageDesired package
11-1 Discover other ROS mastersFunction:discover other ROS mastersmaster_discovery_fkie
1-2 Synchronize the local ROS masterFunction:synchronize the local ROS mastermaster_sync_fkie
1-3 Use GUI to pilot the robot with Twist messageFunction:pilot the robotCharacteristics:GUI, Twist messagerqt_robot_steering
22-1 Meta-package for easily installing Velodyne simulation componentsSensor:Velodyne HDL-64E 3D lidarFunction:install velodyne Category:meta packagevelodyne_simulator
2-2 Description package for Velodyne lidarSensor:Velodyne HDL-64E 3D lidarCategory:description packagevelodyne_description
2-3 Use Gazebo plugin to provide simulated data from Velodyne lidarSensor:Velodyne HDL-64E 3D lidarFunction:provide simulated dataCharacteristics:Gazebo pluginvelodyne_gazebo_plugins
33-1 Simulate Turtlebot2 in GazeboRobot:Turtlebot2Function:simulate Turtlebot2Characteristics:Gazeboturtlebot_gazebo
3-2 Open dashboard for Turtlebot2Robot:Turtlebot2Function:open dashboardturtlebot_dashboard
44-1 Start the Turtlebot2 robotRobot:Turtlebot2Function:start the TurtleBot2turtlebot_bringup
4-2 Use Turtlebot2 to create maps with gmapping_demo.launchRobot:Turtlebot2Function:create mapsLaunch:gmapping_demo.launchturtlebot_navigation
4-3 Visualize Turtlebot2 with RVizRobot:Turtlebot2Function:visualize Turtlebot2Characteristics:RVizturtlebot_rviz_launchers
4-4 Teleoperate Turtlebot2 with joysticks or keyboardRobot:Turtlebot2Function:teleoperate Turtlebot2Characteristics:joysticks, keyboardturtlebot_teleop
4-5 Save the mapFunction:save the mapmap_server
55-1 Package that includes tools for Bebop robotFunction:include toolsCharacteristics:Bebopbebop_tools
5-2 Message package for Bebop robotCharacteristics:BebopCategory:message packagebebop_msgs
5-3 Package that includes bebop_driver_node nodeCharacteristics:BebopNode:bebop_driver_nodebebop_driver
5-4 Description package for Bebop robotCharacteristics:BebopCategory:description packagebebop_description
66-1 Start the setup helper for MoveItFunction:start the setup helperCharacteristics:MoveItmoveit_setup_assistant
6-2 Provide base 3D markersFunction:provide base markersCharacteristics:3D markeraruco_ros
6-3 Start the server for grasp with MoveItFunction:start the serverCharacteristics:grasp, MoveItmoveit_simple_grasps
Tab.5  
Fig.12  
Sample sizeTop1Top5Top10Top15Top20
100.700.800.800.900.90
200.650.700.750.750.75
300.500.730.730.800.80
400.630.730.780.800.80
500.580.720.800.800.82
600.550.730.800.820.82
700.560.710.770.790.80
800.580.730.760.780.79
900.600.720.790.810.82
1000.560.700.760.780.79
Tab.6  
Fig.13  
Fig.14  
Fig.15  
MethodAverage time/sCoefficient of variation
RPKG1.0170.572
ROS Index0.0691.522
GitHub0.5411.523
Google0.3050.190
ChatGPT24.6111.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
4 S, Cousins B, Gerkey K, Conley W Garage . Sharing software with ROS [ROS topics]. IEEE Robotics & Automation Magazine, 2010, 17( 2): 12–14
5 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
[1] Highlights Download
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed