yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
RDK S600 Developer Kit📖
1.RDK S600 board introduction
  • 1.1 RDK S600 board introduction
  • 1.2 System Flashing
  • 1.3 Hardware Interface Description
  • 1.4 Accessory Installation
  • 1.5 Camera Expansion Board
  • 1.6 MCU Interface Expansion Board
  • 1.7 Precautions for Using the 15.6-inch Screen
  • 1.8 System Boot Modes
2.RDK S600 basic course
  • 2.1 Network Configuration
  • 2.2 Remote Login
  • 2.3 System Update
  • 2.4 Boot Auto-Start Configuration
  • 2.5 RDK Exclusive Command Usage
  • 2.6 Linux Command Usage
  • 2.7 Examples of GPIO Read and Write Operations
  • 2.8 Using the USB Camera
  • 2.9 Solid-state mounting
  • 2.10 SSD expansionnew
3.TogetheROS.Bot Vision Applications
  • 1. About TogetheROS. Bot
  • 2. System Installation
  • 3. Object Detection(YOLO)
  • 4. Image Classification(mobilenetv2)
  • 5. Image Segmentation(mobilenet_unet)
  • 6. Perception Algorithm(BEV)
  • 7. Human Detection and Tracking (Ultralytics YOLO Pose)
4. Offline AI Large Model Development
Offline large model (Text Interaction)
  • 1. AI large model environment deployment
  • 2. Install large model dialogue platform
  • 3. Meta AI Llama 3.2 model
  • 4. Alibaba Cloud Qwen3 model
  • 5. Microsoft Phi-4 mini model
  • 6. DeepSeek - DeepSeek-R1 model
  • 7. Alibaba Cloud Qwen2.5vl Visual Multimodal Large Model
  • 8. Google Gemma3 Visual Multimodal Large Model
  • 9. Lava Visual Multimodal Large Model
  • 10. MiniCPM-V Visual Multimodal Large Model
  • 11. Multimodal visual understand application
  • 12. Multimodal text image application
  • 13. Multimodal visual localization application
  • 14. Multimodal table scanning application
  • 15. Multimodal Autonomous Agent Applications
Offline large model (Voice Interaction)
  • 0. Voice Interaction Hardware Connection (Must Read)
  • 1. Offline speech-to-text (ASR)
  • 2. Offline Text-to-Speech (TTS)
  • 3. AI large model voice interaction
  • 4. Multimodal visual understanding voice interaction
  • 5. Multimodal Text-to-Image application
  • 6. Multimodal video analytics application
  • 7. Multimodal visual localization application
  • 8. Multimodal table scanning application
  • 9. Multimodal autonomous agent application
  • 10. AI Large Model Offline Voice Assistant
5. Online AI Large Model Development
Online large model (Text Interaction)
  • 1.OpenRouter large model API aggregation platform
  • 2.Multimodal visual understand application
  • 3.Multimodal visual localization application
  • 4.Multimodal table scanning application
  • 5.Multimodal autonomous proxy application
Online large model (Voice Interaction)
  • 0.Voice interaction hardware connection (ReadMe)
  • 1.Online speech to text (ASR)
  • 2.Online text to speech (TTS)
  • 3.AI large model voice interaction
  • 4.Multimodal visual understand speech interaction
  • 5.Multimodal visual localization application
  • 6.Multimodal table scanning application
  • 7.Multimodal autonomous proxy application
  • 8.AI large model online voice assistant
6.YOLO26 tutorials
  • 01.YOLO26 environment
  • 02.CLI use
  • 03.Object detection
  • 04.Instance segmentation
  • 05.Pose estimation
  • 06.Image classification
  • 07.Oriented object detection
  • 08.Model conversion
  • 09.Dataset annotation
  • 10.Model training - conversion
  • 11.Model prediction
7.OpenClaw Advanced Development
  • 1. OpenClaw Deployment
  • 2. OpenClaw and WhatsApp Plugin Application
  • 3. OpenClaw TUI Interaction
  • 4. OpenClaw WebChat Interaction
  • 5. OpenClaw Gate Gateway Operation Manual
  • 6. OpenClaw Plugin Function Introduction
  • 7. OpenClaw Tools Introduction
  • 8. OpenClaw ClawHub Introduction (skill Installation)
  • 9.OpenClaw Application - File Management
  • 10.OpenClaw Application - Browser Control
  • 11.OpenClaw Application - Camera
  • 12.OpenClaw Application - Script Execution
  • 13.OpenClaw Application - AI Programming (Peripheral & GPIO Control)
  • 14. OpenClaw Application - Dedicated AI Assistant
  • 15. OpenClaw Configure Web Search Capability
8.ROS2 basic course
  • 1.Introduction to ROS2
  • 2.ROS2 install Jazzy
  • 3.ROS2 development environment
  • 4.ROS2 workspace
  • 5.ROS2 function package
  • 6.ROS2 node
  • 7.ROS2 topic communication
  • 8.ROS2 service communication
  • 9.ROS2 action communication
  • 10.ROS2 custom interface message
  • 11.ROS2 parameter service case
  • 12.ROS2 meta-function package
  • 13.ROS2 distributed communication
  • 14.ROS2 DDS
  • 15.ROS2 time related API
  • 16.ROS2 common command tools
  • 17.ROS2 rviz2 use
  • 18.ROS2 rqt toolbox
  • 19.ROS2 Launch startup file configuration
  • 20.ROS2 recording and playback tool
  • 21.ROS2 URDF model
  • 22.ROS2 Gazebo simulation platform
  • 23.ROS2 TF2 coordinate transformation
Download
  • System_File
  • Code
  • 3D_Model_File
  • Tools_Software
Download ZIP

Welcome to RDK S600 Developer Kit repository

14.ROS2 DDS

14. ROS2 DDS

Note: The accompanying reference video uses the ROS Humble version, for reference only

1. DDS Overview

DDS stands for Data Distribution Service. It was released and maintained by the Object Management Group (OMG) in 2004. It is a standard for data distribution/subscription specifically designed for real-time systems. It was first used by the U.S. Navy to solve compatibility issues with numerous software upgrades in complex ship network environments. It has now become a mandatory standard.

DDS emphasizes data-centricity and can provide rich Quality of Service (QoS) policies to ensure real-time, efficient, and flexible data distribution. It can meet various distributed real-time communication application requirements.

References:

  • Fast DDS official documentation: 3.3.0

  • ROS2 official documentation DDS advanced features: Click to jump

2. Communication Models

The topic, service, and action communication we studied in previous courses all have their underlying communication implementation completed by DDS. It is like the neural network in the ROS robot system.

The core of DDS is communication. There are many communication models and software frameworks that can achieve communication. Here we list four commonly used models.

image-20220528020740057

  • The first one, Point-to-Point Model: Many clients connect to one server. Each communication requires establishing a connection between both parties. When communication nodes increase, the number of connections also increases. Moreover, each client needs to know the server's specific address and the services it provides. If the server address changes, all clients are affected.

  • The second one, Broker Model: Optimized from the point-to-point model. The Broker centrally processes everyone's requests and further finds the role that can actually respond to the service. This way, clients don't need to care about the server's specific address. However, the problem is obvious: the Broker is the core, and its processing speed affects the efficiency of all nodes. When the system scale grows to a certain level, the Broker becomes a performance bottleneck for the entire system. More troublesome is that if the Broker encounters an exception, it may cause the entire system to malfunction. The previous ROS1 system used an architecture similar to this.

  • The third one, Broadcast Model: All nodes can broadcast messages on the channel, and all nodes can receive messages. This model solves the server address problem, and communication parties don't need to establish a separate connection. However, there are too many messages on the broadcast channel, and all nodes must care about every message, though many are actually irrelevant to them.

  • The fourth one is the Data-Centric DDS Model. This model is similar to the broadcast model where all nodes can publish and subscribe to messages on the DataBus. However, its advancement lies in that the communication contains many parallel paths. Each node can only care about messages it is interested in and ignore messages it is not interested in. It's like a rotating hotpot where all kinds of delicious food are delivered on the DataBus. We only need to take what we want to eat. The rest is not our concern.

As you can see, among these communication models, DDS's advantages are more obvious.

 

3. DDS in ROS2

DDS's position in the ROS2 system is crucial. All upper-level construction is built on DDS. In this ROS2 architecture diagram, the blue and red parts are DDS.

image-20220528020937717

Among the four main components of ROS, due to the addition of DDS, the comprehensive capability of the distributed communication system has been greatly improved. This way, during robot development, we don't need to worry about communication issues and can spend more time on application development in other areas.

 

4. Quality of Service (QoS) Policies

The basic structure in DDS is Domain, which binds various applications together for communication. Recall when we configured RDK and computer communication before, we configured the DOMAIN ID. That's the grouping definition for the global data space. Only nodes in the same DOMAIN group can communicate with each other. This avoids resource consumption by useless data.

Another important feature in DDS is Quality of Service (QoS).

QoS is a network transmission strategy. Applications specify the required network transmission quality behavior, and the QoS service tries to meet the customer's communication quality requirements as much as possible. It can be understood as a contract between data providers and receivers.

Policies are as follows:

  • DEADLINE policy: Indicates that communication data must complete one communication within each deadline;

  • HISTORY policy: Indicates a cache size for historical data;

  • RELIABILITY policy: Indicates the data communication mode. Configuring as BEST_EFFORT means best-effort transmission mode. When network conditions are not good, data flow must be ensured, which may result in data loss. Configuring as RELIABLE means reliable mode, which tries to ensure data integrity during communication. We can choose the appropriate communication mode based on the application scenario;

  • DURABILITY policy: Can be configured to ensure that late-joining nodes also receive some historical data. This allows new nodes to quickly adapt to the system.

 

5. Test Examples

5.1 Example 1 - Configure DDS via Command Line

  • Open the first terminal and use the following command to publish a topic:

ros2 topic pub /chatter std_msgs/msg/Int32 "data: 66" --qos-reliability best_effort

image-20250827115245194

  • Open another terminal and use a different QoS to print the topic. If the QoS policy used differs from that of the publisher, a warning will appear and topic data cannot be received normally:

xxxxxxxxxx
ros2 topic echo /chatter --qos-reliability reliable

image-20250827115358309

  • You can receive topic data by using the same QoS policy as the topic publisher:

xxxxxxxxxx
ros2 topic echo /chatter --qos-reliability best_effort

image-20250827120250112

 

5.2 Example 2 - Write Topic Node with QoS Configuration

  • Use the following command to create a new package:

xxxxxxxxxx
ros2 pkg create learning_dds --build-type ament_python --dependencies rclpy std_msgs
  • Create a new dds_controller_pub.py file as the publisher for topic communication. Fill in the following content:

​x
import rclpy
from rclpy.node import Node
from std_msgs.msg import String
# Import QoS-related classes
from rclpy.qos import QoSProfile, QoSReliabilityPolicy, QoSHistoryPolicy

class ControllerPublisher(Node):
    def __init__(self, name):
        super().__init__(name)
        # 1. Configure QoS: Reliable transmission, keep last 1 piece of historical data
        self.qos_profile = QoSProfile(
            reliability=QoSReliabilityPolicy.RELIABLE,  # Reliable transmission (retransmit lost data)
            history=QoSHistoryPolicy.KEEP_LAST,         # Keep last N pieces of data
            depth=1                                     # Keep 1 piece of historical data
        )
        # 2. Create publisher: topic name/robot_cmd, message type String, QoS policy
        self.publisher = self.create_publisher(
            String,
            "/robot_cmd",
            self.qos_profile
        )
        # 3. Create timer: Send command once per second
        self.timer = self.create_timer(1.0, self.timer_callback)
        self.cmd_list = ["forward", "backward", "stop"]  # Command list
        self.cmd_index = 0  # Command index, switch in cycle


    def timer_callback(self):
        # Cycle through commands (forward → backward → stop → forward...)
        current_cmd = self.cmd_list[self.cmd_index % 3]
        # Create message and fill data
        msg = String()
        msg.data = current_cmd
        # Publish message
        self.publisher.publish(msg)
        # Print log (show published command)
        self.get_logger().info(f"Publishing control command: {msg.data}")
        # Update command index
        self.cmd_index += 1


def main(args=None):
    # Initialize ROS2
    rclpy.init(args=args)
    # Create publisher node
    node = ControllerPublisher("robot_controller_pub")
    # Loop running node
    rclpy.spin(node)
    # Destroy node and shutdown ROS2
    node.destroy_node()
    rclpy.shutdown()


if __name__ == "__main__":
    main()

 

  • Subscriber code implementation. Create a new dds_robot_sub.py file and fill in the following subscriber implementation code:

xxxxxxxxxx
import rclpy
from rclpy.node import Node
from std_msgs.msg import String
from rclpy.qos import QoSProfile, QoSReliabilityPolicy, QoSHistoryPolicy

class RobotSubscriber(Node):
    def __init__(self, name):
        super().__init__(name)
        # 1. Configure QoS compatible with publisher
        self.qos_profile = QoSProfile(
            reliability=QoSReliabilityPolicy.BEST_EFFORT,
            history=QoSHistoryPolicy.KEEP_LAST,
            depth=1
        )
        # 2. Create subscriber: topic name/robot_cmd, callback function, QoS policy
        self.subscription = self.create_subscription(
            String,
            "/robot_cmd",
            self.cmd_callback,  # Callback function to execute when data is received
            self.qos_profile
        )

    def cmd_callback(self, msg):
        # Callback function: Process received command
        self.get_logger().info(f"Received control command: {msg.data} → Execute corresponding action")


def main(args=None):
    rclpy.init(args=args)
    node = RobotSubscriber("robot_subscriber")
    rclpy.spin(node)
    node.destroy_node()
    rclpy.shutdown()


if __name__ == "__main__":
    main()
  • Configure build file (setup.py):

xxxxxxxxxx
entry_points={
    'console_scripts': [
        # Publisher node: command name = package name.filename:main function
        'dds_controller_pub = learning_dds.dds_controller_pub:main',
        # Subscriber node
        'dds_robot_sub = learning_dds.dds_robot_sub:main',
    ],
},

image-20250905153513257

 

  • Open a terminal in the workspace directory and build the package:

xxxxxxxxxx
colcon build --packages-select learning_dds

image-20250905153611086

 

  • Set environment variables. Environment variables need to be set after each rebuild:

xxxxxxxxxx
source install/setup.bash
  • Run publisher and subscriber nodes:

xxxxxxxxxx
ros2 run learning_dds dds_controller_pub
xxxxxxxxxx
ros2 run learning_dds dds_robot_sub

image-20250905153734043

 

Robot Development Advanced:

  • Generally, topic communication publisher and subscriber need to maintain the same QoS communication policy to avoid some hidden communication layer issues;

  • QoS communication policy settings should be chosen based on actual application scenarios;

  • If the application scenario involves special requirements at the communication layer such as drone communication, encrypted communication, or real-time communication, find the Fast-DDS official manual in the tutorial introduction for more detailed DDS functionality explanations.

image-20250905155146210

ROS2 distributed communication
ROS2 time related API

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文