5. Internal Protocols

This page briefly describes the protocols developed on top of DDS that enable AML-IP node communications as well as the deployment of the different scenarios presented in the user manual of this documentation.

5.1. DDS Topics

All the AML-IP Topics in the DDS AML-IP network have a previous name mangling. So an AML-IP topic named , some_topic would actually be named amlip::some_topic in the underneath DDS network.

5.2. MultiService over DDS

A new communication protocol based on DDS has been designed in order to fulfill the necessity of distributing a task in a network. The idea is a Service protocol based on Client-Server communication where multiple servers could be available at the same time in the same network. This protocol creates an auto-regulated orchestration method where a task could be distributed to one and only one server that is publicly available, and each server receives no more than one task at a time.

5.3. RPC over DDS

The Remote Procedure Call based on DDS has been implemented to meet the need to distribute requests and replies across a network.

Unlike how it is implemented in ROS 2 (with Fast DDS as middleware), topic mangling is used for the communication between the servers and clients.

The following diagram illustrates the flow of the implementation:


5.4. DDS Entities properties

Every AML-IP entity within the AML-IP network is associated with predefined properties that encompass the entity’s identification and metadata.

  • The fastdds.application.metadata property is a JSON object that provides detailed information about the entity:

    • Internal: Specifies the name of the node.

    • Entity: expound the DDS entity.

    • Topic: define the topic name.

  • The fastdds.application.id property uniquely identifies the DDS application to which the entity belongs, in this case AML_IP.

For a practical illustration, consider a Writer in a TestNode publishing on the /test topic. The corresponding C++ code snippet for configuring the DataWriter QoS properties is as follows:

nlohmann::json property_value;

property_value["Internal"] = "TestNode";
property_value["Entity"] = "Writer";
property_value["Topic"] = "/test";

eprosima::fastdds::dds::DataWriterQos qos_request_availability_writer_ = default_request_availability_writer_qos_();

        property_value.dump(), true);

        "AML_IP", true);

To retrieve the QoS, the following code can be used:

const std::string* application_id =
        datareader_locked->get_qos().properties(), "fastdds.application.id");