  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 or code hosting platforms 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
from the dataset of ROS package text descriptions. The semantic features
extracted from this process result in a substantial number of entities and
relationships. 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.
