Home

Awesome

<a href="https://integration-service.docs.eprosima.com/"><img src="https://github.com/eProsima/Integration-Service/blob/main/docs/images/logo.png?raw=true" hspace="8" vspace="2" height="100" ></a>

ROS 2 System Handle

ROS 2 SH CI Status   Have an issue?

Introduction

What is a System Handle?

A System Handle is a plugin that allows a certain middleware or communication protocol to speak the same language used by the eProsima Integration Service, that is, Extensible and Dynamic Topic Types for DDS (xTypes); specifically, Integration Service bases its intercommunication abilities on eProsima's open source implementation for the xTypes protocol, that is, eProsima xTypes.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/user_manual/systemhandle/sh.html"><img src="docs/images/system-handle-architecture.png"></a> </p>

The ROS 2 SystemHandle

<a href="https://docs.ros.org/en/foxy/"><img src="docs/images/ros2_logo.png" align="left" hspace="8" vspace="0" width="90"></a>

This repository contains the source code of Integration Service System Handles for the ROS 2 middleware protocol, widely used in the robotics field. Two implementations can be distinguished: static one based on ROS 2 rclcpp and dynamic one based on Fast DDS (by the moment it is only available for the Publisher-Subscriber paradigm).

This System Handles can be used for two main purposes:

  1. Connection between a ROS 2 application and an application running over a different middleware implementation. This is the classic use-case approach for Integration Service.

  2. Connecting two ROS 2 applications running under different Domain IDs.

The main advantages of the Dynamic ROS 2 System Handle over the Static ROS 2 System Handle are the following ones:

  1. It allows using types defined by IDL without previously generating and installing the ROS 2 Type Support for that type, which gives it a greater versatility with respect to the Static ROS 2 System Handle.

  2. It is not necessary to decide which ROS 2 builtin types you are going to use during the compilation phase, as it allows you to use any of them.

Dependencies

This section provides a list of the dependencies needed in order to compile ROS 2 System Handles.

Static ROS 2 System Handle

Dynamic ROS 2 System Handle

Configuration

Integration Service is configured by means of a YAML configuration file, which specifies the middlewares, topics and/or services involved in the intercommunication process, as well as their topic/service types and the data exchange flow. This configuration file is loaded during runtime, so there is no need to recompile any package before switching to a whole new intercommunication architecture.

To get a more precise idea on how these YAML files have to be filled and which fields they require in order to succesfully configure and launch an Integration Service project, please refer to the dedicated configuration section of the official documentation.

Regarding the ROS 2 System Handles, there are several specific parameters which can be configured for the ROS 2 middleware. All of these parameters are optional, and fall as suboptions of the main five sections described in the Configuration chapter of the Integration Service repository:

Examples

There are several Integration Service examples using the Static ROS 2 System Handle available in the project's main source code repository.

Some of these examples, where the Static ROS 2 System Handle plays a different role in each of them, are introduced here.

<a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/ros1-ros2.html"><img align="left" width="15" height="38" src="https://via.placeholder.com/15/40c15d/000000?text=+" alt="Green icon"></a>

ROS 2 - ROS 1 bridge (publisher - subscriber)

In this example, Integration Service uses both this Static ROS 2 System Handle and the ROS 1 System Handle to transmit data coming from a ROS 2 publisher into the ROS 1 data space, so that it can be consumed by a ROS 1 subscriber on the same topic, and viceversa.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/ros1-ros2.html"><img src="docs/images/ros2_ros1_pubsub_example.png" width="500"></a> </p>

The configuration file used by Integration Service for this example can be found here.

For a detailed step by step guide on how to build and test this example, please refer to the dedicated section in the official documentation.

<a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/dds-ros2.html"><img align="left" width="15" height="38" src="https://via.placeholder.com/15/40c15d/000000?text=+" alt="Green icon"></a>

ROS 2 - DDS bridge (publisher - subscriber)

In this example, Integration Service uses both this Static ROS 2 System Handle and the Fast DDS System Handle to transmit data coming from a ROS 2 publisher into the DDS data space, so that it can be consumed by a Fast DDS subscriber on the same topic, and viceversa.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/dds-ros2.html"><img src="docs/images/ros2_dds_pubsub_example.png" width="500"></a> </p>

The configuration file used by Integration Service for this example can be found here.

For a detailed step by step guide on how to build and test this example, please refer to the dedicated section in the official documentation.

<a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/ros2-websocket.html"><img align="left" width="15" height="38" src="https://via.placeholder.com/15/40c15d/000000?text=+" alt="Green icon"></a>

ROS 2 - WebSocket bridge (publisher - subscriber)

In this example, Integration Service uses both this Static ROS 2 System Handle and the WebSocket System Handle to transmit data coming from a ROS 2 publisher to a WebSocket Client, and viceversa.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/ros2-websocket.html"><img src="docs/images/ros2_websocket_pubsub_example.png" width="420"></a> </p>

The configuration file used by Integration Service for this example can be found here.

For a detailed step by step guide on how to build and test this example, please refer to the dedicated section in the official documentation.

<a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/fiware-ros2.html"><img align="left" width="15" height="38" src="https://via.placeholder.com/15/40c15d/000000?text=+" alt="Green icon"></a>

ROS 2 - FIWARE bridge (publisher - subscriber)

In this example, Integration Service uses both this Static ROS 2 System Handle and the FIWARE System Handle to transmit data coming from a ROS 2 publisher and update them in a FIWARE Context Broker MongoDB database, and viceversa.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/fiware-ros2.html"><img src="docs/images/ros2_fiware_pubsub_example.png" width="420"></a> </p>

The configuration file used by Integration Service for this example can be found here.

For a detailed step by step guide on how to build and test this example, please refer to the dedicated section in the official documentation.

<a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/services/ros2-server.html"><img align="left" width="15" height="38" src="https://via.placeholder.com/15/40c15d/000000?text=+" alt="Green icon"></a>

ROS 2 service server

In this example, the Static ROS 2 System Handle tackles the task of bridging a ROS 2 server with one or more client applications, playing the role of a service server capable of processing incoming requests from several middlewares (DDS, ROS1, WebSocket) and producing an appropriate answer for them.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/services/ros2-server.html"><img src="docs/images/ros2_services_example.png" width="550"></a> </p>

The configuration file used by Integration Service for this example can be found here.

For a detailed step by step guide on how to build and test this example, please refer to the dedicated section in the official documentation.

<a href="https://integration-service.docs.eprosima.com/en/latest/examples/same_protocol/ros2_change_domain.html"><img align="left" width="15" height="38" src="https://via.placeholder.com/15/40c15d/000000?text=+" alt="Green icon"></a>

ROS 2 Domain ID change

In this example, Integration Service uses this ROS 2 System Handle to forward the messages sent from a ROS 2 publisher hosted on a participant with domain ID 5 to a subscriber created under domain ID 10.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/examples/same_protocol/ros2_change_domain.html"><img src="docs/images/ros2_domain_id_change.png" width="580"></a> </p>

The configuration file for this example can be found here.

For a detailed step by step guide on how to build and test this example, please refer to the dedicated section in the official documentation.

<a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/dds-ros2-qos.html"><img align="left" width="15" height="38" src="https://via.placeholder.com/15/40c15d/000000?text=+" alt="Green icon"></a>

ROS 2 Quality of Service

In this example, Integration Service uses this ROS 2 System Handle to forward messages from a ROS 2 publisher with a specific QoS to the compatible DDS subscribers.

<p align="center"> <a href="https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/dds-ros2-qos.html"><img src="docs/images/ros2_qos_example.png" width="580"></a> </p>

The configuration file for this example can be found here.

For a detailed step by step guide on how to build and test this example, please refer to the dedicated section in the official documentation.

Compilation flags

Besides the global compilation flags available for the whole Integration Service product suite, there are some specific flags which apply only to the ROS 2 System Handles; they are listed below:

The following flags are only applicable for the Static ROS 2 System Handle:

Documentation

The official documentation for the ROS 2 System Handles is included within the official Integration Service documentation, hosted by Read the Docs, and comprises the following sections:

License

This repository is open-sourced under the Apache-2.0 license. See the LICENSE file for more details.

Getting help

If you need support you can reach us by mail at support@eProsima.com or by phone at +34 91 804 34 48.