Full text
Treball de Fi de Master Master’s degree in Automatic Control and Robotics (MUAR) A smart and flexible perception framework for robotic manipulation MEMÒRIA July 3, 2023 Autor: Albert Dalmases Mendoza Director: Dr. Isiah Zaplana Agut Convocatòria: 07/2023 Escola Tècnica Superior d’Enginyeria Industrial de Barcelona
pàg. 1 Resum Aquesta tesi presenta la implementació d’un marc de percepció robòtica avançada destinat a millorar la capacitat d’un robot per interpretar i interactuar amb el seu entorn. Donada la creixent presència de la robòtica en diversos sectors, hi ha una demanda cada vegada major de sistemes de percepció més intel·ligents i flexibles. Aquest treball satisfà aquesta demanda combinant les dades provinents de càmeres, implementant tècniques de detecció d’objectes i d’estimació de posició i orientació, i introduint capacitats de raonament intel·ligent. Utilitzant el “Robot Operating System” (ROS), el marc de percepció proposat combina mètodes basats en marcadors fiducials i en aprenentatge profund per a la detecció d’objectes i l’estimació de posicions i orientacions. Un aspecte original d’aquesta contribució resideix en la incorporació d’ontologies per estructurar i raonar sobre les dades percebudes. El resultat és un sistema de percepció robust i intel·ligent capaç de manejar escenaris complexos simulats i en el món real. Aquest mòdul de percepció proporciona funcionalitats que milloren la comprensió de l’entorn per part d’un robot, centrant-se principalment en tasques de manipulació robòtica. El treball presentat proporciona una base sòlida per a futures investigacions i ampliacions.
pàg. 2
pàg. 3 Resumen Esta tesis presenta la implementación de un marco de percepción robótica avanzada destinado a mejorar la capacidad de un robot para interpretar su entorno e interactuar con él. Dada la creciente presencia de la robótica en diversos sectores, hay una demanda cada vez mayor de sistemas de percepción más inteligentes y flexibles. Este trabajo satisface dicha demanda combinando los datos proveninentes de cameras, implementando técnicas de detección de objetos y estimación de posición y orientación, e introduciendo capacidades de razonamiento inteligente. Utilizando el ’Robot Operating System’ (ROS), el marco de percepción propuesto combina métodos basados en marcadores fiduciales y en aprendizaje profundo para la detección de objetos y la estimación de posiciones y orientaciones. Un aspecto original de esta contribución reside en la incorporación de ontologías para estructurar y razonar sobre los datos percibidos. El resultado es un sistema de percepción robusto e inteligente capaz de manejar escenarios complejos simulados y en el mundo real. Este módulo de percepción proporciona funcionalidades que mejoran la comprensión del entorno por parte de un robot, centrándose principalmente en tareas de manipulación robótica. El trabajo presentado proporciona una base sólida para futuras investigaciones y ampliaciones.
pàg. 4
pàg. 5 Abstract This thesis presents the implementation of an advanced robotic perception framework intended to enhance a robot’s ability to interpret and interact with its environment. Given the increased prevalence of robotics across various industries, there is a growing demand for more intelligent and flexible perception systems. This work meets that demand by combining visual sensor data, implementing object detection and pose estimation techniques, and introducing smart reasoning capabilities. Utilizing the Robot Operating System (ROS), the proposed perception framework combines fiducial marker-based and deep learning-based methods for object detection and pose estimation. A unique aspect of this contribution lies in the incorporation of ontologies to structure and reason over the perceived data. The result is a robust, intelligent perception system capable of handling complex simulated and real-world scenarios. This perception module provides functionalities that enhance a robot’s understanding of its surroundings, with a primary focus on robotic manipulation tasks. The developments presented provide a solid foundation for further research and expansion.
pàg. 6
pàg. 7 Contents 1 Introduction 11 1.1 Problem Statement .................................... 12 1.2 Proposed Solution ..................................... 13 1.3 Motivation ......................................... 15 1.4 Objectives ......................................... 16 1.5 Scope ............................................ 17 2 Related Work 19 3 Theoretical Background 21 3.1 Object Detection and Pose Estimation ......................... 21 3.1.1 ArUco marker-based object detection and pose estimation ......... 22 3.1.2 Mask R-CNN and Augmented-autoencoder-based object detection and pose estimation .................................. 23 3.2 Ontologies ......................................... 28 3.2.1 Basic Overview .................................. 28 3.2.2 Classification ................................... 29 3.2.3 Languages for ontologies ............................ 30 3.2.3.1 SPARQL (SPARQL Protocol and RDF Query Language) ..... 31 3.2.3.2 SWRL (Semantic Web Rule Language) ............... 34 4 Methodology 37 4.1 Workspace, Hardware and Software. .......................... 37 4.2 Setting up object detection and pose detection pipelines ............... 39 4.3 Perception module implementation key ideas ..................... 43 4.4 Adding smartness to the project ............................. 45 4.5 Other Challenges and Limitations ........................... 47 5 The Smart Perception Ontology 49 5.1 Ontology Overview .................................... 49 5.2 Ontology Classes and Properties ............................ 51 6 The Perception Module 55 6.1 Module Architecture ................................... 55 6.1.1 Launching Camera Sensors ........................... 56 6.1.2 Configuring and Launching Camera Publisher Nodes ............ 57 6.1.3 ArUco Publisher Node .............................. 57 6.1.4 Autoencoder Publisher Node .......................... 58 6.1.5 Full Perception Manager Node ......................... 59 6.1.6 Full perception Server Node ........................... 61 6.1.7 Ontology Manager Node ............................ 62 6.2 Results ........................................... 66 6.2.1 Setting up the Test Scenario ........................... 66 6.2.2 Launching Object Detection and Pose Detection Systems, and Data Management ...................................... 67 6.2.3 ROS Functionalities ................................ 69 6.2.4 Unifying Perception and Ontology ....................... 70 6.2.5 Smart Reasoning ................................. 71
pàg. 14 tologies allows structuring the knowledge and enable decision-making processes necessary in autonomous robotics. The integration of ontologies into our system primarily aims to reason over spatial relationships between objects in the system, and its location within symbolic regions of the perceived environment. Such new information can then be retrieved via specific queries.
pàg. 15 1.3 Motivation The motivation to develop this project originates from a mixture of educational objectives, intellectual curiosity and career development goals. As we progress towards an era where robots are anticipated to be increasingly autonomous and intelligent, the need for advanced robotic perception modules arises. Interesting questions, such as what should a flexible perception system look like, what components it should have, what additional elements are needed to add the reasoning ability, and which tools can be used to implement everything and best achieve the objectives, are all projected to be addressed during the thesis development. The fact that the system is designed with the projection of being part of a larger robotic framework presents a significant challenge and makes the project more exciting. The project is planned to provide the student an opportunity to explore and implement state-of-the-art methodologies in several disciplines, such as object detection and pose estimation. Furthermore, it provides the chance of exploiting the Robot Operating System (ROS) capabilities, and try new tools that can facilitate reasoning in robotics. This project encapsulates the toolkit and skills required for a robotics engineer while offering the opportunity to gain practical experience with different robotics tools and technologies. By constructing a perception module from the ground up, the project provides an in-depth understanding of the operational principles of these systems, knowledge that can be significantly beneficial for future research or professional pursuits in robotics. Given the vast potential for real-world application and its relevance across a wide spectrum of robotics fields.
pàg. 16 1.4 Objectives This project highlights the conceptualization, design, and execution of a versatile and intelligent perception module for robotic systems. The objectives are formulated to address the several challenges in robotic perception while converging various disciplines like computer vision, deep learning, robotics, and information science. The primary objective of this project is the development of a vision-oriented perception module. This module is designed to efficiently structure and process data from an array of sensor cameras. Further, it incorporates two distinct methods for object recognition and pose estimation, ensuring that the strengths of one approach compensate for the weaknesses of the other. Importantly, all these elements must be developed to integrate smoothly with the Robot Operating System (ROS). A key differential objective consists of the introduction of semantic understanding and contextual awareness of the environment. The goal is not only to recognize objects but also to comprehend their relevance, potential functions, and probable interactions within the environment. As a result, it is crucial to understand the fundamentals of working with ontologies, asserting data, conducting reasoning, and querying data to successfully develop the project. Another pivotal aspect of this project is scalability. The design needs to be flexible enough to support future expansions and versatile enough to incorporate a diverse range of sensors such as contact sensors, torque sensors, light sensors, and more. Furthermore, the module should ensure real-time analysis of sensory data, maintaining its efficiency despite increasing complexity. Beyond the principal objectives, this project also sets out to establish a range of functional baselines within the Robot Operating System (ROS) environment. These include the ability to retrieve comprehensive system information such as sensor status, detected objects, and specific properties of these objects. The properties might include the object’s category, confidence of detection, pose relative to the camera or workspace origin, timestamps, occlusion details, colors, and more. Additionally, the project intends to introduce visualization capabilities that allow the display of bounding boxes for detected objects, as well as the positions of these objects within the workspace. The objectives outlined are structured to culminate in a smart and flexible perception module, thereby amplifying the abilities of a robotic system.
pàg. 17 1.5 Scope As previously outlined, the primary focus of this project lies in the creation of a perception module for robotic systems. The module is to be developed using camera sensors and integrated with the Robot Operating System (ROS). It will incorporate techniques like object recognition, pose estimation, and enhance reasoning capabilities through the application of ontologies. The physical application area of the project, is confined to the Institute of Industrial and Control Engineering 1(IOC) robotics laboratory. Consequently, the hardware resources such as cameras, computers or GPUs, as well as the object set available for testing, are limited to what it can be accessed within this facility. Nonetheless, the system is also capable of running in a simulated environment. The project’s duration is expected to span about 4 months, which establishes the timeline for planning all the tasks and activities. The perceptive scope of this project is currently limited to the use of camera sensors. This inherently constrains the types of sensory data that can be captured and processed. Despite this, additional complexity is added by exploring the fusion of redundant information that may come from multiple cameras readings. Furthermore, the use of deep learning techniques for object detection and pose estimation requires getting, processing and training a substantial amount of data, which in turn requires a considerable investment of computational resources and time. This is why certain limitations are imposed on the diversity and quantity of objects that the system can recognize and process. While ontologies can potentially support complex reasoning, the focus of this project is to introduce this field of robotics, limiting its reasoning capabilities to object spatial relationships and workspace regions. The computational efficiency associated with these reasoning tasks remains as an area for further investigation. By the completion of this project, we anticipate the successful development of a robust perception module, capable of processing and efficiently managing data from multiple camera sensors. The module is expected to demonstrate the successful implementation of deep learning techniques for object detection and pose estimation, despite inherent constraints in computational resources and time. A notable feature will be its reasoning capabilities, enabling the system to automatically infer object’s spatial relationships crucial in robotics manipulation. It is expected for the module to be able to run tests and evaluation in both the IOC robotics laboratory and a simulated environment, proving its validity and efficacy. 1https://ioc.upc.edu/en
pàg. 19 2 Related Work This chapter focuses on state-of-the-art research that incorporate knowledge representation and perception-based semantic knowledge in the domain of intelligent robotics. By painting a comprehensive picture of the current advancements and research directions in the field, it is aimed to set a foundation on what to explore in the thesis. Perception is fundamental to many robotic operations, providing the necessary context for other activities such as navigation, manipulation, and decision-making. Consequently, the focus of the current work is to enhance perception through ontology-based knowledge representation. In the vast world of autonomous robots, ontology-based knowledge representation has emerged as an important foundation. It allows autonomous systems to interact with a wide variety of environments, from static, structured, o fully observable to dynamic, unstructured or partially observable. This interaction allows robots to perform tasks, make decisions, and adapt to their surroundings, irrespective of their field of application. Significant work in this area spans across different robotics fields such as manipulation [5,6,7], navigation [8,9,10,11,12], robot-human interaction [13], service robotics[14], social robotics [15], search and rescue [16], or general industrial applications[17,18,19]. However, it’s critical to note that most frameworks or ontologies referenced are contextualized on a variety of robotics processes such as decision-making, planning, monitoring, reasoning, execution, communication, or learning rather than just on the perception. For this reason, we will now dive deeper into those works that somehow do incorporate perception in their ontologymanaged processes. By examining their contributions to their respective fields and other relevant information, we aim to provide an overview of how ontologies can significantly elevate perceptual capabilities in robotic systems. First, KnowRob 2.0 [6] stands out as one of the most advanced knowledge processing systems available for robots, delivering a comprehensive knowledge base and a system for handling complex manipulation tasks. This innovative framework bridges the gap between high-level instructions, such as “how to pick up a cup to pour out its remains”, and the planning, monitoring, and execution necessary to fulfill such tasks. This process is facilitated by KnowRob’s expansive ontology, which contains information about robots, their individual components, sensing and action capabilities, as well as tasks and actions. Additionally, the ontology encapsulates environmental aspects, including objects, context, and time-dependent relations. In expanding the potential of KnowRob’s capabilities, RoboEarth [10] emerges as a valuable open-source platform. This platform allows any robot with network connectivity to learn and adapt to complex tasks rapidly, taking advantage of KnowRob’s ability to carry out logical inference. However, RoboEarth expands its use of ontology to encode concepts and relationships in maps for navigation purposes. Another semantic navigation system built upon KnowRob, as presented in [11], captures relationships between rooms, objects, object interactions, and the utility of objects. Both systems leverage ontology to annotate a Simultaneous Localization and Mapping (SLAM) map. Thus, KnowRob along with other derived systems, utilize ontologies for effective abstraction of sensing information, demonstrating the importance of ontologybased perception in robotics systems. Robot control for Skilled Execution of Tasks (ROSETTA)[17] is an ontology proposed by a homonymous named European project. This project focuses on robot devices, and skills in-
pàg. 20 volved in manufacturing tasks, and proposes a Knowledge Integration Framework (KIF) that provides reasoning utilities over different robotic ontologies and proposes an execution structure using state machines. Other projects, like controlling the assembly process of electronic devices [18], or an industrial assembly process including a pallet transport system [19], are derived from ROSETTA. One of the key features of these applications is their focus on perception, since they incorporate an object recognition module linking perception data with geometric features represented in the Knowledge Base. This blending of sensory data with geometric features facilitates a detailed understanding of the environment, vital for the complex assembly tasks that these systems undertake. The Smart and Networked Underwater Robots in Cooperation Meshes (SWARMs) [9] ontology is designed to enable the shared understanding among robots in maritime or underwater missions. The system of SWARMs is based on a core ontology that links several domain-specific ontologies to cover areas such as entities, objects, infrastructures, robotic vehicles, environment recognition and sensing. As for perception, it includes classes on sensors and key environmental concepts to comprehend the environment through properties such as water salinity, conductivity, or temperature. A notable feature of the application layer is the inclusion of PR-OWL, a probabilistic ontology, for managing uncertainty. The added ability to reason over uncertainty, is key for sensor information interpretation. The Perception and Manipulation Knowledge (PMK) [7] and the Robot Task Planning Ontology (RTPO) [12] are two ontologies that facilitate complex task planning for autonomous robots. Both systems ensure that robots are equipped with a comprehensive understanding of their environment, leading to more efficient task execution. PMK is a processing framework explicitly developed to improve Task and Motion Planning (TAMP) capabilities within the manipulation domain. It extends the knowledge base representation by adding sensor-related knowledge, thus bridging the gap between low-level perception data and high-level knowledge. In terms of perception, PMK employs RFID sensors and 2D cameras for object localization, storing distinct features such as object poses, colors, and IDs. Uniquely, PMK provides the interesting ability of selecting the appropriate sensor according to the specific perceived situation. On the other hand, RTPO focuses on creating an efficient knowledge representation in robot task planning, incorporating both continuous and discrete information as well as temporal and spatial data. RTPO includes three sub-ontologies: robot, environment, and task. The robot ontology covers aspects like hardware, software, and location information, while the environment ontology deals with elements like the location and recognition of humans and objects, environment maps, and data from other robots. The task ontology is used to understand how to break down high-level tasks into atomic actions and how to replan when environmental changes occur. In terms of perception, it has specific subclasses in the robot ontology dedicated to sensors and to determining which environmental aspects can be measured or perceived by the robot. During experiments, robots successfully identified and perceived obstacles, showing the applicability in real-world problems.
pàg. 21 3 Theoretical Background This project combines multiple areas such as object detection, pose estimation, and the application of ontologies within robotic systems. Each of these fields is backed by an extensive amount of literature and related works. In the following sections, we will dive in the theoretical foundations and key concepts for each relevant area in the project. Further explanation of how each of the selected solutions and how they are implemented are detailed in the Methodology chapter. 3.1 Object Detection and Pose Estimation The object detection and pose estimation section of a perception module, like the one proposed, should act as a fundamental link between the environment raw data that lacks context and meaning to some sort of structured representation of the world. The output of this module is typically a list of detected objects with certain attributes such as their type, position, and orientation. This section plays a key role in managing raw data, extracting relevant information, and integrating it with other data sources, such as user knowledge or additional sensor data. The ultimate goal is to generate outputs that can be effectively utilized by other parts of the system, including decision-making and reasoning capabilities. Object detection and pose estimation approaches commonly fall into two categories: those based on fiducial markers and learning-based methods. Fiducial markers, being simple, efficient, and reliable, facilitate the implementation of object detection and pose estimation. Their lightweight computational demands enable real-time operation on devices with limited computational power. However, they are inherently limited to known, tagged objects and their requirement of physically marking objects can be undesirable in certain contexts. ArUco2and APrilTag3are among the most popular fiducial marker libraries. In contrast, learning-based methods offer more flexibility in terms of object detection and pose estimation, enabling the identification of a wide range of objects without requiring user knowledge as on the marker-based approach. However, these methods demand significant computational resources for training and inference and usually rely heavily on large, annotated training datasets. If these datasets lack diversity or do not adequately represent the task at hand, the models may struggle with generalization. Moreover, the potential latency due to the model’s complexity may make them less suitable for real-time applications. In this project, we aim to focus on estimating the 6-DoF object pose from singe RGB images. This approach allows us to take advantage of the widespread accessibility and versatility of RGB camera sensors (no depth information required), while still obtaining crucial spatial information about objects in the environment. Furthermore, most 6-DoF pose estimation methods rely on an initial step that extracts the object region from RGB images as an object detection stage. Popular object detection methods in this area often employ Convolutional Neural Networks (CNNs) or their variants. Popular algorithms include Mask R-CNN4[20] or YOLO 5. 2https://www.uco.es/investiga/grupos/ava/portfolio/aruco/ 3https://april.eecs.umich.edu/software/apriltag 4https://github.com/matterport/Mask_RCNN 5https://github.com/ultralytics/ultralytics
pàg. 22 For the pose estimation stage, methods such as EfficientPose6[21], CosyPose7[22], Augmented Autoencoders8[4], PoseCNN 9[23] or Deep Object Pose Estimation10 (DOPE)[24] are possible choices. Each of these methods, despite their high computational demands, frequently outperforms traditional methods in terms of accuracy and their capability to handle complex scenarios, making them a fitting choice for our goal of 6-DoF pose estimation from a single RGB image. In this project, the focus will be on the application of two different approaches for object detection and pose estimation. Their key features will be discussed in the following sections. The final selected approaches are: •ArUco marker-based object detection and pose estimation. •Mask R-CNN and Augmented-autoencoder-based object detection and pose estimation. 3.1.1 ArUco marker-based object detection and pose estimation ArUco (ARUgmented reality COde) tags are square markers consisting of a wide black border and a binary matrix in the center. This matrix encodes an identifier, allowing each tag to be recognized uniquely. The relative ease of detection and pose estimation, even under varying lighting conditions and with low-resolution cameras, has made ArUco markers popular in the field of computer vision and robotics. Figure 2: Different ArUco markers example. The detection process of an ArUco tag, as detailed in [3], involves several steps. The process starts with the capture of an image, which is then converted to grayscale. Image binarization and contour detection techniques are applied to find potential tags. Subsequently, the inner region of each potential tag is decoded into a binary code to verify its authenticity and convert it into a numerical ID. The 3D pose of the confirmed tag can then be estimated using the known 6https://github.com/ybkscht/EfficientPose 7https://github.com/Simple-Robotics/cosypose 8https://github.com/DLR-RM/AugmentedAutoencoder 9https://github.com/yuxng/PoseCNN 10https://github.com/NVlabs/Deep_Object_Pose
pàg. 23 size of the tag and the camera’s intrinsic parameters. The tag’s pose relative to the camera is determined by comparing the projected corners of the tag in the image (obtained from the detection process) with the actual 3D corners of the tag (known from its size) to compute a transformation matrix that describes the pose. ArUco tags find wide applications in robotic perception. They assist in camera calibration, where the known size and pose estimation capabilities of the markers help calculate the camera’s intrinsic parameters and distortion coefficients. When deployed in an environment or on objects, ArUco tags enable a robot to track the position and orientation of these entities. For object detection and pose estimation, a unique ArUco ID can be assigned to a specific object. This allows the system to detect and recognize the objects according to the ID. The system can inherently determine the position and orientation of the tag, and hence the object, relative to the camera. Note that this process requires human intervention to associate the ArUco markers with the objects they represent. For instance, a human operator could stick on ArUco markers to various objects and document in a database which marker corresponds to which object. This database can then be utilized by the system to recognize and differentiate objects based on the detected ArUco markers, and also estimate their pose. Furthermore, in case the object’s pose is desired to be expressed relative to a specific part of the object instead of the ArUco marker, such as the object center of mass or optimal grasping point, an additional transformation would be necessary. 3.1.2 Mask R-CNN and Augmented-autoencoder-based object detection and pose estimation In this approach, the 2D object detection is as a sub-problem of the 6D object pose estimation that must be solved first. The goal is to return the 2D representation of all objects in an RGB image while concurrently determining their classes. The Mask R-CNN, developed by the Facebook AI Research (FAIR) team, is the chosen approach for this task. It is a state-of-the-art two-stage object detection and instance segmentation model that returns both the bounding box coordinates and the segmentation masks for each object in an image. This dual functionality is powerful in the context of a perception module, as mask data might be relevant to better understand the projection of the objects in a scene. As described in Mask R-CNN [20], this model, similar to its predecessor Faster R-CNN, uses a Region Proposal Network (RPN) to generate regions of interest (ROIs) (Figure 3a). Each of these proposals is then processed by a network that outputs a class label and a bounding box for the object (Figure 3b). Alongside this, a parallel branch of the model generates a binary mask for each ROI by applying a convolutional network, which outlines the object within the bounding box (Figure 3c). The final result of mixing detections and the binary mask is shown in Figure 3d.
pàg. 30 the Basic Formal Ontology (BFO) [29], the Descriptive Ontology for Linguistic and Cognitive Engineering (DOLCE) [30], and Suggested Upper Merged Ontology (SUMO) [31]. •Domain ontologies focus on a specific field, providing a formal and reusable representation of concepts, objects, activities, and theories within that area. The concepts in domain ontologies are usually specializations of concepts already defined in an upper-level ontology. Some examples are the Open Biological and Biomedical Ontology (OBO)[32] or the Core Ontology for Robotics and Automation (CORA) [33] are well known domain ontologies. Recently, the IEEE1872.2 Autonomous Robotics Ontology (AuR) [34] has been developed as an extension to the CORA to represent additional domain-specific concepts used in autonomous robotics. •Application ontologies are even more specific, containing the definitions required to model the knowledge for a very particular application. These can describe specific robots, environments, or tasks. For instance, ontologies like RPARTS and POS, defined in the IEEE standard 1872-2015 [34], that extend CORA to capture only specific aspects of robotics such as robot parts or position management. 3.2.3 Languages for ontologies The development, representation, and management of ontologies involve the usage of distinct formal languages, known as ontology languages. These languages provide the necessary structure for defining and interpreting the classes (or concepts), the instances (or objects), and the relationships of an ontology. Two prominent languages employed in the creation and manipulation of ontologies are OWL and PROLOG: PROLOG (PROgramming in LOgic): Originating from the realm of logic programming, PROLOG offers a formalism based on fragments of first-order logic (FOL). FOL is a system that employs a range of predicates, variables, logical connectives, and quantifiers to express sophisticated relationships and assertions. Despite the rich expressiveness of FOL, it can introduce to computational complexity, which might be an issue for applications requiring real-time reasoning. Unlike OWL, PROLOG adopts a closed-world assumption where only explicitly defined predicates are considered true. For instance, consider a robot operating in an unknown environment where sensors have limitations in range and may encounter occlusions. Under this assumption, if the robot doesn’t detect any obstacles, it would assume that there are none regardless of sensor range or possible occlusions. PROLOG can be employed to reason about the knowledge represented in OWL ontologies or to encode a PROLOG-specific ontology. To facilitate these tasks, several APIs are available, including GNU-PROLOG11 and SWI-PROLOG12. Notably, the rosprolog package13 offers an interface between SWI-PROLOG and ROS, supporting the integration of logical reasoning within robotics applications. OWL (Web Ontology Language): Standing as one of the most prevalent ontology languages, OWL is built on the solid foundation of Description Logic (DL). DL is a subset of FOL, designed specifically to achieve a balance between expressiveness and computational tractability. It allows the modeling of complex knowledge structures and supports automated reasoning 11http://www.gprolog.org/ 12https://www.swi-prolog.org/ 13https://github.com/knowrob/rosprolog
pàg. 31 and logical inference. Adhering to the standards of the World Wide Web Consortium (W3C), OWL is compatible with globally accepted web protocols and technologies, enhancing the versatility of ontologies, especially those that are designed for web access. This ensures seamless interoperability with a variety of data formats like Extensible Markup Language (XML) or Resource Description Framework (RDF). Unlike PROLOG, OWL operates on an open-world assumption, where a statement’s truth is independent of our knowledge about it. For example, taking the same example as before of a robot operating in an unknown environment, even if the robot doesn’t detect any obstacles in a certain region, it won’t assume there are none; instead, the robot’s knowledge base only contains information about the parts of the world it has observed and remains open to updates based on new information. Ontologies in OWL can be manually created or developed using user-friendly editors like Protégé14. APIs like the Jena Ontology API15, OWLAPI16, or Owlready217 facilitate the integration of OWL ontologies into robotic software systems. Despite the robust modeling capabilities of PROLOG and OWL, ontology usage and knowledge extraction in complex systems like robotics often require additional tools. The challenge lies in extracting, inferring, and manipulating the knowledge encoded within an ontology. This is where query languages such as SPARQL and rule languages such as SWRL come into the picture. In the following subsections, we will delve deeper into the role of SPARQL and SWRL in the context of ontology-based robotic systems. 3.2.3.1 SPARQL (SPARQL Protocol and RDF Query Language) SPARQL allows data querying and manipulation within databases stored in the RDF format. RDF data is articulate through triples, which are composed of subject, predicate, and object. Such triples construct a graph where the subject and object are nodes, connected by edges represented by the predicate. SPARQL strength lies in its capacity to navigate these RDF triples to perform searches in large and complex sets of data. This structure finds its analog in ontologies, where entities (nodes) are connected through relationships (edges). In this way, SPARQL’s querying mechanism is particularly useful in the context of OWL ontologies, which are often serialized in RDF, making it highly effective in ontology querying and management. For instance, in a robotic system ontology, a SPARQL query could retrieve all objects in a scene that possess certain properties, easily find the closest object with a specific characteristic from a robot’s current location, etc. SPARQL has four query forms SELECT,CONSTRUCT,ASK and DESCRIBE. However, for the current project, only will be explored. Considering this, the basic SELECT query primarily consists of two parts: •SELECT clause: This section of the query identifies the required information by enumerating the variables that the query should return. •WHERE clause: This section describes the data pattern that must be matched to be in- 14https://protege.stanford.edu/ 15https://jena.apache.org/documentation/ontology 16https://github.com/owlcs/owlapi/wiki 17https://github.com/pwin/owlready2
pàg. 32 cluded in the results. Other key patterns can be incorporated here, such as FILTER, OPTIONAL,MINUS, etc. These patterns provide more control over the query and the returned data. For example, the FILTER clause allows users to refine the returned results based on specific conditions. The OPTIONAL clause can be used to make parts of the query optional, and the MINUS clause can be used to exclude certain patterns from the results. 1SELECT ? variable1 ? variable2 ... ? variableN 2WHERE { 3? subject ? predicate ? object . 4} Figure 8: General structure of a SPARQL “SELECT” query. In the figure above, ?variable1,?variable2, etc., are placeholders for the information of interest, and ‘?subject ?predicate ?object .” establishes a fundamental pattern that the data needs to match. Note that SPARQL requires a question mark “?” before variable names and that each triple pattern must end with “ . ”. To better illustrate how SPARQL queries work, let’s review a few examples within the context of the current project. Suppose we have an ontology that represents some perceived information classified as objects, object poses, regions in the workspace, and spatial relationships between objects. With this, let’s frame some example queries to better understand potential information retrieval. Also consider that to make the presented queries work, the predicates should be consistent with the ones in the used ontology. The examples below are inspired by the W3C Recommendation SPARQL query language documentation [35]. 1SELECT ?object 2WHERE { 3?object a: Object . 4} Figure 9: SPARQL query example 1: Query all objects in the workspace. The previous query will return all instances that are of the type :Object. Note that the keyword acan be used as a predicate to indicate that the subject is an instance of a class.
pàg. 33 1SELECT ? positionX ? positionY ? positionZ ? rotationX ? rotationY ? rotationZ ? rotationW 2WHERE { 3: SpecificObject : hasPose ? pose . 4? pose : positionX ? positionX . 5? pose : positionY ? positionY . 6? pose : positionZ ? positionZ . 7?pose :orientationX ?orientationX . 8?pose :orientationY ?orientationY . 9?pose :orientationZ ?orientationZ . 10 ?pose :orientationW ?orientationW . 11 } 12 Figure 10: SPARQL query example 2: Query the pose components of a specific object instance. In the second example, the query searches for specific positional and orientation details of a pose associated with a particular object, denoted by :SpecificObject. The query operates by searching for triples where :SpecificObject has a pose (:hasPose), represented by ?pose, and then proceeds to collect the respective values of the position (X, Y, Z) and orientation (X, Y, Z, W) attributes of this pose. 1SELECT ?object 2WHERE { 3? object : isInRegion : RegionName ; 4: hasColor ? color . 5FILTER(? color = " red ") 6} Figure 11: SPARQL query example 3: Query red-colored objects in a specific region. The third sample query seeks all objects located in the region denoted by :RegionName and filters the results to include only those objects that have the color “red”. Note that the use of semicolon “ ; ” can be used as a shorthand to avoid repeating the ?object subject in the next triple pattern, and that the FILTER clause is used to include only the objects in the results whose color is red. 1SELECT ?relationship 2WHERE { 3: Object1 ? relationship : Object2 . 4? relationship rdfs : subPropertyOf : hasSpatialRelationship . 5} Figure 12: SPARQL query example 4: Query spatial relationships between two specific objects. In this last example, the query retrieves any type of spatial relationship that exists between two specific objects, :Object1 and :Object2. The relationship is returned as long as it is a subproperty of :hasSpatialRelationship. More in detail, the query first searches for any kind
pàg. 34 of relationship (?relationship) that links :Object1 to :Object2, and then filters out relationships that are not subproperties of :hasSpatialRelationship. The result is the specific type of spatial relationship that could be defined like :onTopOf,:isNextTo, etc. 3.2.3.2 SWRL (Semantic Web Rule Language) Semantic Web Rule Language (SWRL) is a rule-based language that enables users to make rules about RDF and OWL ontologies. This ability essentially adds an extra layer of expressiveness to ontologies, which are unable to express rule-based knowledge on their own. In this context, SWRL allows users to write if-else type of rules expressed in terms of OWL concepts to provide more powerful deductive reasoning capabilities. In the current project context, SWRL rules could be used to express things like: “If an object has a specific shape, size, and color, then it is a certain type of object”. For instance, “If an object is spherical, small, and orange, then it is a basketball”. Another example could be that “If an object is located beyond a specific distance and size, it could be classified as an obstacle”. These rules can even capture temporal reasoning, such as “If an object was in a certain location some minutes ago, and now it is not in that location, then something must have moved it.” SWRL can be particularly valuable in a robotic perception system, because they can encapsulate implicit knowledge about the world and can be automatically applied by the inference engine every time the knowledge base is updated. This automation can significantly enhance the robot’s real-time reasoning and decision-making capabilities. The verification of SWRL rules is managed by a rule reasoner. Popular reasoners include Pellet18, HermiT19, or FaCT++20. This integration ensures seamless reasoning operations within the ontological framework. SWRL rules can reference named classes, properties, individuals, and data values from an ontology and also have built-ins for providing basic arithmetic calculations, string manipulations, and other commonly needed functions. A typical rule is represented by the structure: Antecedent →Consequent. The antecedent contains the necessary conditions for the rule, while the consequent consists of the assertions to be made when these conditions are met. To better show the utility of SWRL rules, the process behind construing a rule and few examples will be shown in the following paragraphs. The examples presented are inspired from its W3C documentation [36]. Note that the representation is separated into commas for a code-friendly format, however in its formal representation each comma should equal a ∧symbol. In addition, these are just examples to understand how to formulate the rules and might not match the real use-case scenario. The formulation of a Semantic Web Rule Language (SWRL) can be broken down in the following steps: 1. Identify the Antecedent: Define the conditions for the rule to be activated, typically encapsulating relationships between ontology entities. For instance,“An object is pickable by a robot if its size is small”. 18https://github.com/stardog-union/pellet 19http://www.hermit-reasoner.com/ 20http://owl.cs.manchester.ac.uk/tools/fact/
pàg. 35 2. Identify the Consequent: Specify what the system should infer if the antecedent conditions are met. Continuing the example, the assertion is: “The object is pickable." 3. Translate to SWRL Syntax: Articulate the rule using ontology terms. This is presented in Figure 13. 4. Utilize SWRL Built-ins (if necessary): SWRL provides common functions, such as arithmetic calculations and comparison operations. In the previous example, the lessThan function is used for comparing the size of the object with a predefined threshold. Other categories of built-in functions include: comparison, mathematical, string, date, time and duration, URIs and lists built-ins [36]. 1Detected (? o), hasSize (?o ,? s), lessThan (?s, threshold ) -> PickableObject (?o) Figure 13: SWRL rule example 1: Differentiate pickable objects based on their size. In a more natural language, the previous rule could be interpreted as: If ?o is a Detected object and ?o has a size ?s that is less than the defined threshold, then ?o is a PickableObject. To further illustrate the utility of SWRL rules, some additional examples are provided below: 1Object (? o1 ), Object (? o2 ), 2hasPosition (?o1 ,?x1 ,?y1 ,? z1), hasPosition (?o2 ,?x2 ,?y2 ,? z2), 3greaterThan (? x1 , subtract (? x2 , range )) , lessThan (? x1 , add (?x2 , range )) , 4greaterThan (? y1 , swrlb : subtract (? y2 , range )) , lessThan (? y1 , swrlb : add (? y2 , range )) , 5swrlb : greaterThan (? z1 ,? z2 ) -> isOnTopOf (? o1 ,? o2 ) Figure 14: SWRL rule example 2: Identifying a spatial relationship between objects based on their coordinates. The previous rule could be interpreted as: If two objects ?o1 and ?o2 are detected, and the x and y coordinates of ?o1 are within a defined range of the x and y coordinates of ?o2, respectively, and the z coordinate of ?o1 is greater than that of ?o2, then ?o1 isOnTopOf ?o2. 1Detected (? o) , hasTimestamp (?o ,? t1 ), 2greaterThan (?t1 , subtract (? currentTime , duration )) -> recentlyDetected (? o) Figure 15: SWRL rule example 3: Inferring recently detected objects based on timestamps. This rule can be read as: If an object ?o is detected and the timestamp ?t1 of the detection is greater than the current time minus a specified duration, then the object ?o is recentlyDetected.
pàg. 37 4 Methodology This chapter presents the procedural roadmap to implement the practical aspects of the solution proposed. The implementation can be separated on three significant axes: the object detection and pose estimation implementation, the development of the perception module’s architecture, and the management of ontologies. A perfect delineation among these themes is challenging due to their interconnected nature. Initially, we provide an overview of the lab environment, the hub for the real implementations. Following that, the different solutions, choices and essential implementation aspects are explained for each of the separated themes. These sections also detail the software and hardware choices that have influenced the project, and potential challenges and limitations foreseen. 4.1 Workspace, Hardware and Software. The Institute of Industrial and Control Engineering (IOC) robotics lab serves as the focal point for the implementation of our perception module. This lab specializes in robotic manipulative tasks and has several mobile robots, including the TIAGo mobile manipulator and the dual-arm YuMi robot. The intention is to develop the perception module utilizing the camera infrastructure installed above two separate table-stations designed for manipulation. The lab’s perception system comprises three cameras: two Microsoft Kinect v2 cameras and one Intel RealSense SR300 camera, all of which are RGB-D cameras. The spatial distribution of the perception structure that holds the cameras are shown in Figure 16. In Addition, relevant regions and the world reference coordinates frame used as reference is depicted in Figure 17. Figure 16: The IOC robotics lab manipulation perception structure that holds the cameras for perception.
pàg. 38 Figure 17: The IOC robotics lab manipulation relevant regions and “world” coordinates. In terms of additional hardware, it is worth noting that all deep learning operations are performed on a GeForce RTX 3080 Ti GPU for hardware acceleration. This GPU provides the necessary computational power to train and infer from complex models, assisting the overall development process. Regarding the software infrastructure, the Robot Operating System (ROS) serves as the backbone of our implementation. ROS is a flexible framework for writing robot software and provides tools, libraries, and conventions to simplify the task of creating complex robot tasks across a wide variety of robotic platforms. Our choice to use ROS is motivated by its modular structure, vast resources, language flexibility, and extensive hardware support, ensuring that the work is robust, extensible, and easily maintainable. For instance, ROS’s modular structure allows developing independently the object detection, pose estimation, and ontology management parts of the project, while allowing them to interact with each other through defined interfaces. Furthermore, its rich set of resources allows the utilization of existing work, such as ArUco-related packages or camera drivers, eliminating the need to build everything from scratch. Finally, the flexibility of ROS to support multiple programming languages proves beneficial for various tasks. For example, Python can be employed for developing learning-related tasks, while more computationally intensive tasks may be better suited to C++. A final note regarding complementary software within ROS, RViz21 3D visualization tool and Gazebo22 3D robotics simulator will be also used. The latter allows replicating the lab environment with its sensors and objects, facilitating the testing and development process. 21http://wiki.ros.org/rviz 22https://gazebosim.org/home
pàg. 39 4.2 Setting up object detection and pose detection pipelines Since we are working with distinct object detection and pose estimation pipelines, marker-based and learning-based, there are specific considerations to be addressed for each. For marker-based detection, it is needed to choose which objects to be tagged with markers. This procedure will involve physically attaching the markers to the objects, and if desired creating a database that links each unique marker ID with its corresponding object. Furthermore, it is interesting to enable establishing a transformation between the location of the ArUco marker on the object and another point of interest, such as an optimal grasping point or the object’s center, to offer further utility. Figure 18: Sample ArUco objects and its database proposed for the project. It is worth mentioning that significant work was previously done in the lab regarding the detection of ArUco markers of up to three different sizes. However, this prior approach only accounted for three marker sizes, and its management system was a hard-coded solution that lacked flexibility. For instance, it wasn’t easy to expand the number of detectable marker sizes, adjust the size of an existing marker, or modify the ID range corresponding to each size. For this reason, a new approach intends to increase the system’s flexibility to handle any arbitrary number of marker sizes by specifying their dimensions and associated ID ranges in a configuration file.
pàg. 46 and its various subclasses and properties. For this reason, given the scope and complexity of our project, such features make Protégé an ideal choice to work, and specially visualize, with ontologies. Figure 22: Visual aspect of the Protégé graphical interface.
pàg. 47 4.5 Other Challenges and Limitations Considering the aforementioned in the previous sections, the building of an advanced perception system might arise unexpected challenges and limitations. These, may come for either a technical, hardware, or software aspects of the solution. Acknowledging these limitations aims to be prepared for possible complication and also ensure that the proposed solution is flexible enough to meet the final goal. Regarding the workspace and its hardware, the lab’s existing fixed camera infrastructure, limited to three specific models of RGB-D cameras, could add limitations in terms of image quality and resolution, crucial for accuracy in object detection and pose estimation purposes. Variable lighting conditions or unexpected occlusions could further affect system performance. Moreover, hardware failures or limitations in the GPU usage could create performance bottlenecks in various parts of the system. The physical placement of markers on objects for marker-based detection could present issues for certain objects depending on their surfaces, shape, etc. For the learning-based detection, discrepancies between lab objects and the YCB dataset is a limiting factor to validate the system robustness in real environments. In addition, effectively synchronizing data and communications across various ROS nodes can be also challenging and affect real-time operations. Managing large volumes of sensor data could introduce performance bottlenecks and data integrity concerns if not managed properly. Both updating and maintenance of the ontology based on real-time observations can lead to delays depending on the quantity of data to manage. Similarly, querying the ontology might also lead to delays due to the computational complexity associated to reasoning tasks. Deciding when and how to use classes or properties to structure knowledge in the ontology might also present a challenge that affects the system efficiency. Finally, relying on an existing ontology like AuR could limit customization options and risk inconsistencies or conflicts within the established framework when introducing new terms or functionalities.
pàg. 49 5 The Smart Perception Ontology In this chapter, the structure and composition of the ontology is presented. Furthermore, the different definitions and roles of all the classes and properties are explained. The objective of these sections is to provide a clear understanding of how the ontology’s is planned to encapsulate all the raw sensor data from the environment knowledge into machine-processable knowledge about the proposed domain. 5.1 Ontology Overview Developing an ontology is a meticulous process, often requiring a careful examination of the underlying concepts and their relationships in the chosen domain. To speed up this process, reusing an already existing domain ontology might be really useful. For this project, it has been chosen to build upon the existing Autonomous Robotics Ontology (AuR) [34]. AuR, a widely recognized ontology in the autonomous robotics domain, serves as an excellent foundation due to its extensive coverage of standardized terminology, vocabulary, and relationships relevant to this field. The ontology encapsulates critical components that constitute the autonomous robotics landscape, such as sensors, estimations, plans, actuators, control, processing elements, and communication elements, thereby providing a comprehensive base to kick-start our development process. However, this project is aimed towards the development of an application ontology in the perception domain, where certain aspects such as pose management and object qualities are required. For this reason, the AuR will be used as a base in which to incorporate additional aspects of interest in the perception domain. This way, we aim to create an ontology that serves our specific needs while also facilitating potential future expansion in a standardized manner. The proposed ontology is created under the name of “smart perception”, and all its classes, properties and definitions are shown in Figure 23. In the diagram, dark blue spheres represent classes from the foundational AuR ontology, while light blue spheres are our custom-defined classes. Object properties are shown as lines between spheres, and data properties as arrows connecting classes to yellow boxes (indicating its datatype). For a deeper understanding of these classes and properties, the following sections provide further details.
pàg. 50 Figure 23: Full diagram of the developed ontology with its visualized in Protégé using VOWL plugin.
pàg. 51 5.2 Ontology Classes and Properties In the context of our ontology, we have defined various classes to organize and categorize the entities that exist in our domain. These classes represent distinct conceptual categories that are useful when modelling our environment. These are categorized like: •PhysicalObject: Represents all tangible entities in the environment. These are differentiable into: –DetectedObject: Any entities that are detectable by the perception module. The class is further classified in: ∗ArucoObject: Detected objects identified through the ArUco-based perception pipeline. ∗EncoderObject: Detected objects from the Auto Encoder-based perception pipeline. –Device: Represent devices involved in the perception process. ∗Sensor: Subcategory of devices that include sensing devices. ·Camera: The visual-based sensor that the module supports. •SpaceRegion: Describes spatial properties or regions. It’s further divided into: –Pose: Captures the position and orientation of entities in the environment with respect to the global coordinates. –CameraPose: Captures the position and orientation of entities in the environment with respect to camera coordinates. –SymbolicRegion: Represents symbolically defined areas within the environment. •PhysicialAttribute: Defines the physical characteristics of the objects. It has as subclass: –Color: Represents the color attribute of an object. Object properties provide the framework to define relations between pairs of individuals in an ontology. The strength of these properties lies in their ability to encode spatial, perceptual, and other kinds of interactions between various entities within the environment, such as objects, devices, and regions. For instance, object properties allow the model to understand not only that an object exists, but also its position relative to other objects, the region it is in, or if it’s occluding or being occluded by other objects. Understanding these relations is crucial for robust environmental representation and higher-level tasks such as navigation and manipulation. To facilitate the understanding, object properties can be categorized into perception-related properties, spatial relationship properties and properties related to symbolic regions. Since some of these properties might be subjective or domain dependent, the information of how exactly each of them is defined in the current domain is included. Furthermore, in the case of inverse properties, the definition of one is directly the inverse definition of the other. These are cataloged into:
pàg. 52 Perception related properties: The perception-related properties primarily involve the interaction between sensors and the objects they perceive. This set of properties forms the basis of the perception system in the environment: •perceives and isPerceivedBy:These inverse properties establish the perception relationship between a sensor and an object. They indicate whether a sensor has detected a certain object, or if an object is under the perception of a certain sensor. •hasPose and isPoseOf: These inverse properties describe the pose of a physical object in the 3D space. •hasCameraPose and isCameraPoseOf: These inverse properties describe the pose of an object from the perspective of a camera coordinate frame. •isOccludedBy and isOccluding: These inverse properties capture the visibility relationships between objects. They indicate if an object’s line of sight to the sensor is blocked by another object. •hasColor and isColorOf: Relationships related properties: The spatial relationship properties provide valuable insights into the relative positioning and distances between objects: •isOnTopOf and isBelowOf: These properties provide vertical positioning information, indicating whether an object is situated above or below another. An object is considered in top of another one if its z axis is higher and the horizontal plane Euclidean distance is below 0.05 m. •isInFrontOf,isBehindOf: These inverse properties define relative horizontal positioning between objects along the world reference X axis. An object is in front of another one if the object X coordinate is further in the negative X axis. •isLeftOf,isRightOf These inverse properties define relative horizontal positioning between objects along the world reference Y axis. An object is to the left of another one if the object Y coordinate is further in the positive Y axis. •isHigherThan and isLowerThan: These inverse properties define relative horizontal positioning between objects along the world reference Z axis. An object is higher than another one if the object Z coordinate is further in the positive Z axis. •isCloseTo isFarFrom:These properties provide a measure of proximity between objects based on a Euclidean distance metric. An object considered close to another one if its distance is lower than 0.3 m, whereas an object is considered far from another one if its distance is bigger than 2 m. Symbolic regions related properties: The symbolic region-related properties allow for the classification and interaction of objects with symbolically defined areas within the environment: •isAboveSymbolicRegion and isBelowSymbolicRegion: These properties indicate whether an object is vertically above or below a symbolic region by comparing its Z coordinate values.
pàg. 53 •isAtSymbolicRegion and isSymbolicRegionOf: These properties determine if an object is located within the 3D bounds of a particular symbolic region, or if the symbolic region encompasses the object. Data Properties Data properties in our ontology allow us to assign specific data values or attributes to the individuals of a class. Unlike object properties that describe relations between two individuals, data properties connect individuals to data values. In addition, how these objects properties look in Protégé is shown on ??. Here is how data properties are classified and defined in our current domain: Aruco Data Properties: These properties are specifically associated with the ArucoObject class. •arucoID: Represents the unique identifier for each Aruco object detected. •arucoObjectClass: Defines the class or type of the Aruco object. •arucoObjectID: Represents the specific ID assigned to an Aruco object instance. Camera Data Properties: These properties are specific to the Camera class. •cameraID: Specifies the unique identifier for each camera device. •cameraResolutionHeight and cameraResolutionWidth: Define the resolution of the camera. •cameraType: Indicates the type of the camera sensor. Encoder Data Properties: These properties pertain to the EncoderObject class. •detectionConfidence: Indicates the confidence level of the object’s detection by the encoder. •encoderObjectClass: Specifies the class or type of the encoder object. •encoderObjectID: Represents the specific ID assigned to an encoder object instance. •encoderObjectIsOccluded: Specifies whether the encoder object is occluded or not. Pose Data Properties: These properties define the spatial and temporal information related to the pose of an entity. •positionX,positionY, and positionZ: These specify the coordinates of the pose in 3D space. •orientationW,orientationX,orientationY, and orientationZ: These define the quaternion values representing the orientation of the pose. •timeStamp: Specifies the exact time when the pose was captured, further divided into nsecs and secs. Region Data Properties: These properties are associated with the SymbolicRegion class, defining its spatial boundaries.
pàg. 54 •regionID: Represents the unique identifier for each symbolic region. •regionRangeXmax,regionRangeXmin,regionRangeYmax,regionRangeYmin,regionRangeZmax, and regionRangeZmin: These properties define the maximum and minimum limits of the symbolic region along the X, Y, and Z axes. Finally, how these properties look on Protégé editor is shown on Figure 24 Figure 24: Visualization of classes object and data properties for the smart_perception in Protégé.
pàg. 55 6 The Perception Module this chapter aims to provide a comprehensive understanding of the potential Perception Module’s role and performance within a larger cognitive robotics framework. This module is integral to our study as it lays the groundwork for object detection, pose estimation, and most importantly, the integration of knowledge-based reasoning within the perception process. A detailed examination of the configuration and launching of camera sensors, the design of publisher nodes for both ArUco and Autoencoder methodologies, and the operation of the Full Perception Manager and the Ontology Manager is provided. Following this, the results derived from a test scenario using the perception module are presented. This will cover the process of setting up the scenarios, the launching of object detection and pose estimation nodes, the ROS functionalities provided, and the integration and interaction with the ontology. IMPORTANT NOTE: To facilitate the understanding of the explanations given in the following subsections, it is recommended to access the project’s GitHub repository at https://github.com/Albertdalmen/smart_perception_module. This repository contains the whole implementation and includes the code fragments and classes referenced in the explanations within the /scripts directory. 6.1 Module Architecture The Perception Module of the architecture contains several blocks, each handling different key aspects of the system, as already been introduced when discussing the project’s methodology. In this section, each block in the perception module architecture as well as the practical aspects of the implementation will be discussed. In Figure 25 the big picture of the architecture is shown and in the upcoming sections each block is further discussed.
pàg. 62 6.1.7 Ontology Manager Node The KnowledgeManagerServer class is the critical bridge between the ROS modules and the ontology-based knowledge management system that enables the incorporation of perceived data into it. The core of how it works, similar to FullPerceptionServiceServer class, is by subscribing to the /full_perception topic to continuously retrieve the most up-to-date perception information from the system to then assert it on the ontology. At its core, the primary function of this node is to take in perception data from the system, process it, and assert the information into the ontology. This process involves creating necessary individuals and associating them with appropriate data and object properties. Importantly, the utilities to interact with the ontology are defined within a ROS-agnostic class, the OntologyManager, to convert the data into a structured form, reason, incorporate SWRL rules and query the ontology. In addition, the module is set up to assert symbolic region information on initialization, which can enrich the knowledge base by importing non-perceptible data from a user-defined file. The class OntologyManager class also implements a clever system that safeguards the original ontology’s integrity by generating a temporary copy during initialization and operating on it. This ensures that all assertions occur within this copy ontology without changing the original one. When shutting down the node, the temporary ontology is erased. However, the system provides an option to record the active ontology’s state in a separate file. This way a timestamped copy is created and can be accessed for future reference, data analysis, or troubleshooting, even when the perception module is inactive. Another notable feature of the OntologyManager class is its ability to function like an API, enabling to use its functionalities via the terminal. The main services provided are: •/update_ontology: This service enables the real-time update of the ontology with the latest perception data upon request. Nevertheless, the user can set the system to update continuously. In such case, the service is not offered. •/sparql_string_query: This service facilitates querying the ontology using SPARQL queries. Finally, One of the key features of the module is the ability to establish SWRL rules, significantly extending the reach of the system’s inferencing abilities. These rules, provide the system with a more comprehensive and flexible reasoning option. The rules implemented can be categorized as: Spatial relationship rules When dealing with detected objects within a spatial context, a primary goal is to derive meaningful relationships that describe their relative positions to each other. Currently, there are up to ten relationships that can be inferred, which are: isHigherThan,isLowerThan,isLeftOf, isRightOf,isInFrontOf,isBehindOf,isCloseTo,isFarFrom,isOnTopOf, and isBelowOf.It is worth noting that thanks to the proper definition of these relationships as inverses of each other, we only need to define six primary rules. Once a rule is defined and a relationship inferred for a pair of objects, the inverse relationship for the same pair is automatically derived. However, recall that some definitions of these spatial properties can sometimes be subjective and may only apply to the current domain. Let’s explore each of these rules in more detail:
pàg. 63 isInFrontOf-isBehindOf (fig. Figure 27), isHigherThan-isLowerThan (fig. Figure 28), isLeftOfisRightOf (fig. Figure 29), paired rules share a similar structure and share the same inference strategy by focusing on the relative position of two object along a specific dimension of space. For instance, the rule isInFrontOf examines whether the X coordinate (relative the global reference) of object A is lesser than that of object B, implying object A is in front of object B. On the other hand, the rule isBehindOf is its inverse and is automatically inferred once isInFrontOf is determined. This logic of relative spatial comparison extends to the pairs isHigherThan-isLowerThan and isLeftOf-isRightOf, focusing on the Z and Y dimensions, respectively. 1DetectedObject(?o1), DetectedObject(?o2), 2hasPose (?o1 , ?p1) , hasPose (?o2 , ? p2), 3positionX (?p1 , ?x1), positionY (?p2 , ?x2), 4lessThan (?x1 , ?x2) -> isInFrontOf (?o1 , ?o2) Figure 27: SWRL Rule for isInFrontOf-isBehindOf inference. 1DetectedObject(?o1), DetectedObject(?o2), 2hasPose (?o1 , ?p1) , hasPose (?o2 , ? p2), 3positionZ (?p1 , ?z1), positionZ (?p2 , ?z2), 4greaterThan (?z1 , ?z2) -> isHigherThan (?o1 , ?o2) Figure 28: SWRL Rule for isHigherThan-isLowerThan inference. 1DetectedObject(?o1), DetectedObject(?o2), 2hasPose (?o1 , ?p1) , hasPose (?o2 , ? p2), 3positionY (?p1 , ?y1), positionY (?p2 , ?y2), 4greaterThan (?y1 , ?y2) -> isLeftOf (?o1 , ?o2) Figure 29: SWRL Rule for isLeftOf-isRightOf inference. The rules isCloseTo (fig. Figure 30) and isFarFrom (fig. Figure 31) encapsulate spatial relationships between objects by utilizing the principle of Euclidean distance between two detected objects’ position in the space. However, unlike the previous set of rules, these do not function as direct inverses of one another. These rules are not inversions because "close" and "far" are context-dependent terms and are determined by user-defined thresholds.
pàg. 64 1DetectedObject(?o1), DetectedObject(?o2), 2hasPose (?o1 , ?p1) , hasPose (?o2 , ? p2), 3positionX (?p1 , ?x1), positionY (?p1 , ?y1), positionZ (?p1 , ?z1), 4positionX (?p2 , ?x2), positionY (?p2 , ?y2), positionZ (?p2 , ?z2), 5subtract (? dx , ?x1 , ? x2) , pow (? dx_sqr , ?dx , 2) , 6subtract (? dy , ?y1 , ? y2) , pow (? dy_sqr , ?dy , 2) , 7subtract (? dz , ?z1 , ? z2) , pow (? dz_sqr , ?dz , 2) , 8add (? dist_sqr , ?dx_sqr , ? dy_sqr , ? dz_sqr ), 9divide (? sqroot , 1, 2) , pow (? dist , ? dist_sqr , ? sqroot ) , 10 lessThan (? dist , 0.010) -> isCloseTo (? o1 , ?o2 ) Figure 30: SWRL Rule for isCloseTo inference. 1DetectedObject(?o1), DetectedObject(?o2), 2hasPose (?o1 , ?p1) , hasPose (?o2 , ? p2), 3positionX (?p1 , ?x1), positionY (?p1 , ?y1), positionZ (?p1 , ?z1), 4positionX (?p2 , ?x2), positionY (?p2 , ?y2), positionZ (?p2 , ?z2), 5subtract (? dx , ?x1 , ? x2) , pow (? dx_sqr , ?dx , 2) , 6subtract (? dy , ?y1 , ? y2) , pow (? dy_sqr , ?dy , 2) , 7subtract (? dz , ?z1 , ? z2) , pow (? dz_sqr , ?dz , 2) , 8add (? dist_sqr , ?dx_sqr , ? dy_sqr , ? dz_sqr ), 9divide (? sqroot , 1, 2) , pow (? dist , ? dist_sqr , ? sqroot ) , 10 greaterThan (? dist , 2) -> isFarFrom (? o1 , ? o2 ) Figure 31: SWRL Rule for isFarFrom inference. Finally, the pair isOnTopOf-isBelowOf (fig. Figure 32) is differentiable from isHigherThanisLowerThan rules, because in addition to the “z” coordinate comparison, also consider the proximity of objects on the horizontal plane. This difference enables a more precise relational context since the rule ensures that an object is not only higher, but also somewhat aligned with another object. As with previous pairs, the isOnTopOf and isBelowOf relationships are inverses of each other. Hence, the definition of one rule is sufficient to infer both relationships. 1DetectedObject(?o1), DetectedObject(?o2), 2hasPose (?o1 , ?p1) , hasPose (?o2 , ? p2), 3positionX (?p1 , ?x1), positionY (?p1 , ?y1), positionZ (?p1 , ?z1), 4positionX (?p2 , ?x2), positionY (?p2 , ?y2), positionZ (?p2 , ?z2), 5subtract (? dx , ?x1 , ? x2) , pow (? dx_sqr , ?dx , 2) , 6subtract (? dy , ?y1 , ? y2) , pow (? dy_sqr , ?dy , 2) , 7add (? dist_sqr_xy , ? dx_sqr , ? dy_sqr ) , 8divide (? sqroot , 1, 2) , pow (? dist_xy , ? dist_sqr_xy , ? sqroot ), 9greaterThan (?z1 , ?z2), lessThan (? dist_xy , 0.1) -> isOnTopOf (?o1 , ?o2) Figure 32: SWRL Rule for isOnTopOf inference.
pàg. 65 Region Properties Region properties refer to the categorization of detected objects based on their spatial position in relation to predefined symbolic regions in the environment. These symbolic regions are defined with a range in the x, y, and z axes, forming 3D areas in the space. In this case, four specific relationships are proposed: isInSymbolicRegion,isSymbolicRegionOf,isAboveSymbolicRegion, and isBelowSymbolicRegion. The isInSymbolicRegion (fig. Figure 33) relationship checks if an object’s x, y, and z coordinates fall within the minimum and maximum ranges defined for the symbolic region. As expected, the property isInSymbolicRegion is inversely inferred as isSymbolicRegionOf. 1DetectedObject (? o), hasPose (?o, ?p), 2positionX (?p, ?x) , positionY (?p, ?y) , positionZ (?p , ?z), 3SymbolicRegion (?r), regionRangeXmin (?r, ?xmin ), regionRangeXmax (?r, ?xmax ), 4regionRangeYmin (?r, ?ymin ), regionRangeYmax (?r, ?ymax ), 5regionRangeZmin (?r, ?zmin ), regionRangeZmax (?r, ?zmax ), 6lessThan (? xmin , ?x), lessThan (?x , ? xmax ), 7lessThan (? ymin , ?y), lessThan (?y , ? ymax ), 8lessThan (? zmin , ?z), lessThan (?z , ? zmax ) -> isInSymbolicRegion (?o, ?r) Figure 33: SWRL Rule for isInSymbolicRegion inference. In contrast, the isAboveSymbolicRegion (fig. Figure 34) and isBelowSymbolicRegion (fig. Figure 35) properties compare the object’s z coordinate to the symbolic region’s maximum and minimum z values, respectively. 1DetectedObject (?o), hasPose (?o, ?p), positionZ (?p, ?z) , 2SymbolicRegion (?r), regionRangeZmax (?r, ?zmax ), 3greaterThan (?z, ?zmax ) -> isAboveSymbolicRegion (?o, ?r) Figure 34: SWRL Rule for isAboveSymbolicRegion inference. 1DetectedObject (?o), hasPose (?o, ?p), positionZ (?p, ?z) , 2SymbolicRegion (?r), regionRangeZmin (?r, ?zmin ), 3greaterThan (? zmin , ?z) -> isBelowSymbolicRegion (? o, ? r) Figure 35: SWRL Rule for isBelowSymbolicRegion inference.
pàg. 66 6.2 Results In this section, results obtained from the operation of the perception module are presented in a structured format, following the progression of the module from initialization to the execution of reasoned queries on the system’s knowledge base. Visual images are provided to enhance the understanding of the functioning of each previously explained section. Note that for simplicity and avoid redundant results, it is chosen to demonstrate the perception system abilities in a real scenario. 6.2.1 Setting up the Test Scenario In the real-world environment, the “Estrella” beer can and ArUco objects act as test subjects. Some setup considerations are that only the camera on the “table2” region will have an active encoder-based detection system, while the ArUco detection system will be active on all the cameras. The proposed object distribution is illustrated in Figure 36, and Figure 37 demonstrates the interconnections between different system frames. Figure 36: Real-world testing scenario in the IOC-lab with Estrella can and ArUco objects.
pàg. 67 Figure 37: Frame relation structure in the multi-camera system visualized using rqt_tf_tree ROS package. 6.2.2 Launching Object Detection and Pose Detection Systems, and Data Management Upon successful activation of the perception module, object and pose detection systems. Then, it’s time for the data management system to handle the acquired sensor data. The resulting processed data is accessible via the /full_perception ROS topic, providing real-time streaming of perception module outputs. The figures below depict the results of the object detection and pose estimation algorithms, in addition to an example of segments from the /full_perception topic visualized on the terminal. Figure 38: Results from ArUco marker detection.
pàg. 68 Figure 39: Results from the encoder-based detection pipeline. Figure 40: Example display of the/full_perception ROS topic on the terminal.
pàg. 69 6.2.3 ROS Functionalities The perception module, through the utilization of the ROS framework, offers various functionalities as ROS services. These services provide a means for different modules or components within the robotic system to interact with the perception module. The illustrations below provide examples of these functionalities in action when calling ROS services. Furthermore, a key feature of this module is its ability to broadcast transforms, facilitating the visualization of data in RViz, as depicted in Figure 41. Figure 41: Visual representation of object detections in the proposed scenario using RViz.
pàg. 70 Figure 42: Demonstration of interaction with the perception functionalities doing multiple service calls in a row. 6.2.4 Unifying Perception and Ontology This section explores the process of fusing the information acquired through a perception module with an ontology. In this context, the ontology encompasses details about objects, their characteristics, and the spatial relationships they have in their environment. These details are collected by the perception module. The ensuing figures highlight the creation of a knowledge base in Protégé. They demonstrate how the ontology uses the data sourced from the perception module to structure a comprehensive model of the environment, thereby creating a knowledge base.
pàg. 71 Figure 43: A display of instances asserted on the ontology as viewed on the Protégé interface. 6.2.5 Smart Reasoning The perception module uses spatial relationship rules and region rules to classify and structure sensory data, which in turn empowers the system to make intelligent decisions about the environment. This capability to reason is a core component of ontology integration, as it permits the system to deduce information that extends beyond the raw perceptual data. The figure below show a sample result of such deductive reasoning processes when querying for data on the knowledge base.
pàg. 79 9 Social and Gender Equality Assessment Promoting social and gender equality is of vital importance in any project, and this initiative is no exception. This section aims to evaluate the potential influence of our project on social and gender equality. Understanding these elements is crucial not just from a human rights perspective, but because diverse and inclusive projects have been shown to deliver better outcomes. For instance, homogeneous groups with diverse backgrounds and perspectives can approach problems from multiple angles. In the On the positive side of the presented project is that it can contribute significantly to the field of robotics, which has broad societal implications. By developing a cognitive robotic system with enhanced perception capabilities, we can potentially help in various sectors from health care and elderly assistance to industrial automation and disaster relief. This could improve the quality of services and enhance safety, while freeing up humans to focus on tasks that require human judgement and creativity. Additionally, a more intelligent robotic system could potentially increase productivity, which could have positive economic and social impacts. However, there are also potential drawbacks to consider, the transition from human-led tasks to automated processes could displace labor in some sectors, leading to economic problems. Furthermore, there exists a risk of bias in AI systems that not adequately represented or understands concepts from a wide-cultural perspective. Some potential steps to address this challenge is to ensure that the training data used for developing a robotics system like the one presented, is diverse and representative of different context where the system might operate. Regarding the potential displacement of human labor, sectors that involve dangerous, repetitive, or physically challenging activities should be first addressed. The implementation of these simple measures can ensure a better promotion of social and gender equality as a whole.
pàg. 81 10 Future Work Over the course of this project, we have successfully created a cognitive robotic perception module from scratch, integrating and enhancing various detection pipelines and diving into knowledge-based robotics reasoning. Despite encountering several challenges and limitations during the development, the project has led to a robust, scalable, and improvable framework that effectively integrates diverse goals into a cohesive system. The key successes of this project lay not only in overcoming the obstacles that emerged, but also in setting a promising direction for future explorations. The integration of knowledge-based reasoning within our perception module marks an important milestone in understanding how intelligent robotic systems may be implemented and improved in the future. However, several possible paths are open for improvement and innovation. The most immediate goal should be to broaden the ontology’s application domain, allowing the system to operate effectively in more diverse and complex scenarios. Furthermore, it would be interesting to improve the detection methods’ performance. The current deep-learning method implemented is highly reliant on having accurate 3D models of objects, which is a clear limitation for scenarios where objects of the same type have different physical characteristics, like, for instance, food manipulation. Investigating alternative, more adaptable approaches could strengthen the system’s object recognition and pose detection capabilities. In this same direction, expanding the range of objects used, or testing how it responds in dynamic environments, is a key focus to test if the developed base frame has room for improving in future iterations. Unfortunately time constraints, due to data processing and training of models, and computational constraints, have limited the development of the system to work with a small set of objects which might not be representative. However, to incorporate more objects in the system, the limits on GPU memory when loading deep learning models create a bottleneck that should be addressed by optimizing the existing algorithms or adding more computational power. In addition to overcoming these limitations, we also envision various interesting enhancements for the system. For example, incorporating a 3D bounding box management and visualization using the 3D object models information, or using it to establish more precise spatial relationship between objects would be a great improvement. Furthermore, integrating additional sensor types with different perceptive data, like temperature cameras, LIDARs or RFID tags, can also help in having a better representation of the environment and be used to perform more complex and meaningful reasoning processes. Adding some sort of temporal management and reasoning might also be of interest for these sorts of systems. A simple, yet interesting expansion considers adding services related to the smart section of the project, since the current ecosystem only sports a single SPARQL query service. Regarding the whole environment architecture, it is now known that ROS2 is on an expansion phase, and it leverages a lot of the limitations found in ROS 1. For this reason, moving the implementation to ROS2, could automatically improve the overall system Finally, we aim to create a more comprehensive and wider robotic framework by integrating other modules such as planning and or execution modules. This could allow planning and executing based on what is reasoned, or what is more, do a reasoned planning and execution tasks. It is also envisioned that it would be interesting to make the module smarter and adaptable by enabling the possibility to actively reason which part of the perception module should be activated, in terms of which detection methods or sensors, according to the information of the system rather than relying on a fixed/user defined configuration.
pàg. 82 By tackling these areas of development, we believe we can significantly enhance the system’s robustness, versatility, and real-world applicability. This continual process of refining and improving is the way forward, guiding us towards the realization of a comprehensive, intelligent, and adaptable complete robotic system.
pàg. 83 Conclusions This project has been a rewarding journey that brought together multiple disciplines, from artificial intelligence, to practical implementation of robotic systems passing through knowledgebased reasoning using ontologies. As we delved into each of these areas, the complexities and intricacies of developing a cognitive robotic perception module became more apparent, as integrating every thing together in a single module was a real challenge. However, the results proudly achieve the realization of the stated objectives. Notably, our previous experience with ROS (Robot Operating System) proved to be beneficial in developing the overall structure of the perception module. Even thought, the project vast domain required to rethink the module structure as the project advanced several times in order to reach the final result. However, the utilization of ontologies, which involved acquiring domainspecific knowledge and applying it to the perception system, has been the most challenging part. This required extensive research and exploration of tools such as owlready2, SPARQL queries, and SWRL rules, with very limited documentation available on integrating these tools together as we did. However, through perseverance and resourcefulness, we were able to overcome every minor challenge faced and provide a perception module that offers a deeper understanding of the environment by incorporating spatial relationships, symbolic regions, and perceptual interactions. It surpasses the limitations of traditional perception systems and opens up new possibilities for context-aware robotic systems. The cognitive robotic perception module we have developed represents an exciting proof of the potential that arises from combining traditional robotics with knowledge-based reasoning. It surpasses the limitations of simple object detection and pose estimation, providing a deeper understanding of the environment. The practical applications of this module are vast, as it has the potential for expansion in various fields. Throughout the project, we faced numerous challenges and limitations, such as the inherent constraints of the tools we utilized. However, these challenges taught us valuable lessons on adaptability, the importance of rigorous testing, and the necessity of seeking alternative solutions to overcome obstacles. Looking ahead, the developed perception module provides a solid foundation for future research and development. It can serve as a starting point for further enhancements, optimizations, and the integration of additional functionalities. The modular design and extensibility of the module enable its adaptation to different robotic applications and scenarios.
pàg. 85 Acknowledgments I would like to express my sincere gratitude to Jan Rosell, Leopold Palomo, and Isiah Zaplana for their invaluable support and guidance during the thesis development. Their assistance and encouragement have greatly contributed to the advancement of my skills and knowledge in robotics. I am truly grateful for their contributions to my development as a robotic enthusiast, not only in this work, but as a lifelong passion that will continue to shape my career.
pàg. 87 Bibliography [1] I. Kotseruba, O. J. A. Gonzalez, and J. K. Tsotsos, “A review of 40 years of cognitive architecture research: Focus on perception, attention, learning and applications,” CoRR, vol. abs/1610.08602, 2016. [Online]. Available: http://arxiv.org/abs/1610.08602 [2] D. Vernon, Artificial Cognitive Systems: A Primer. The MIT Press, 2014. [Online]. Available: http://www.jstor.org/stable/j.ctt17kk720 [3] S. Garrido-Jurado, R. Muñoz-Salinas, F. Madrid-Cuevas, and M. Marín-Jiménez, “Automatic generation and detection of highly reliable fiducial markers under occlusion,” Pattern Recognition, vol. 47, no. 6, p. 2280–2292, 2014. [Online]. Available: https: //www.sciencedirect.com/science/article/pii/S0031320314000235 [4] M. Sundermeyer, Z.-C. Marton, M. Durner, M. Brucker, and R. Triebel, “Implicit 3d orientation learning for 6d object detection from rgb images,” in The European Conference on Computer Vision (ECCV), September 2018. [5] M. Diab, M. Pomarlan, D. Beßler, J. Rosell, M. Beetz, J. Bateman, and S. Borgo, “Failrecont – an ontology-based framework for failure interpretation and recovery in planning and execution,” 10 2021. [6] M. Beetz, D. Beßler, A. Haidu, M. Pomarlan, A. K. Bozcuoğlu, and G. Bartels, “Know rob 2.0 — a 2nd generation knowledge processing framework for cognition-enabled robotic agents,” in 2018 IEEE International Conference on Robotics and Automation (ICRA), 2018, pp. 512–519. [7] M. Diab, A. Akbari, M. Ud Din, and J. Rosell, “PMK—A Knowledge Processing Framework for Autonomous Robotics Perception and Manipulation,” Sensors, vol. 19, no. 5, 2019. [Online]. Available: https://www.mdpi.com/1424-8220/19/5/1166 [8] C. Hernández Corbato, J. Bermejo, and R. Sanz, “A self-adaptation framework based on functional knowledge for augmented autonomy in robots,” Integrated Computer-Aided Engineering, vol. 25, pp. 1–16, 01 2018. [9] X. Li, S. Bilbao, T. Martín-Wanton, J. Bastos, and J. Rodriguez, “SWARMs Ontology: A Common Information Model for the Cooperation of Underwater Robots,” Sensors, vol. 17, no. 3, 2017. [Online]. Available: https://www.mdpi.com/1424-8220/17/3/569 [10] M. Waibel, M. Beetz, J. Civera, R. D’Andrea, J. Elfring, D. Gálvez-López, K. Häussermann, R. Janssen, J. Montiel, A. Perzylo, B. Schießle, M. Tenorth, O. Zweigle, and R. V. De Molengraft, “Roboearth,” IEEE Robotics & Automation Magazine, vol. 18, no. 2, pp. 69–82, 2011. [11] J. Crespo, R. Barber, O. M. Mozos, D. BeBler, and M. Beetz, “Reasoning systems for semantic navigation in mobile robots,” in 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2018, pp. 5654–5659. [12] X. Sun, Y. Zhang, and J. Chen, “RTPO: A Domain Knowledge Base for Robot Task Planning,” Electronics, vol. 8, no. 10, 2019. [Online]. Available: https://www.mdpi.com/ 2079-9292/8/10/1105
pàg. 94 •<unique_id> : must allow differentiating sensors in case the previous fields match. Use alphabetically ordered lowercase letters: "a","b","c", ... •<frame_type>: Sensor frame type. For instance, cameras have different coordinate systems depending on the image displayed. OBJECT FRAMES Format: <object_type>_<numerical_count> Examples: box_1, box_2_frame, human_1, ... •<object_type>: A descriptive term for the object being detected. It corresponds to the class label returned by the detection algorithm. Ex: box, bottle, human, ... •<numerical_count> : A numerical value that allows differentiating two detected objects with the same name. ARUCO FRAMES Aruco-only format: aruco_<marker_id> Auro-object format: <object_name>_<marker_id> Examples: aruco_300, aruco_301, wooden_block_300, ... •<marker_id> : The unique ID assigned to the ArUco marker. •<object_type> : The associated ArUco name in the user-defined database. TOPICS NAMING SENSOR TOPICS NAMING Format: /<sensor_type>_<sensor_name>_<location_id>_<unique_id>/ ... /<data_type> Examples: /camera_kinect_table1_a/image_color, /camera_kinect_table1_a/image_depth, ... •For <sensor_type>,<sensor_name>,<location_id>,<unique_id>, see sensor frame naming section since these fields should match. This format ensures that the first namespace field gives consistent information about the sensor. •... : some topics require other fields. For instance, Kinect cameras use /hd/,/qhd/ or /sd/ for publishing images with different resolutions. •<data_type>: Agreed names on how to name the topic regarding the topic type and the information is being published on it. See the table below. <data_type> table Extended by the community as needed, specially when working with new types of sensors or custom sensor topics.
pàg. 95 /<data_type> Topic Type Information /image_bw sensor_msgs/Image black and white image from a camera /image_color sensor_msgs/Image rgb color image from a color camera /image_depth sensor_msgs/Image depth image from a depth camera /point_cloud sensor_msgs/PointCloud2 point cloud visualization from a depth camera /camera_info sensor_msgs/CameraInfo camera specifications information from a camera /depth_camera_info sensor_msgs/CameraInfo camera specifications information from a depth camera ... ... ... Table 2: Data Type Table. OTHER NAMING ADVICE When working with static transform broadcasters from a launch file, name the node with the format: "tf_from_<parent_frame>_to_<child_frame>", using the proper frame naming conventions to set the <parent_frame> and <child_frame> but without adding the ending "_frame" when present. Examples: name="tf_from_lab_reference_to_world",name="tf_from_lab_reference_to_world"