Skip to content

Communication Architecture

Based on TCP or UDP protocol (selected according to development needs), suitable for communication between the robot body and a host computer (external board or system).

This ProtocolApplication Layer (Layer 7)
TCP/IP or UDP/IPTransport Layer (Layer 4)
Network Layer (Layer 3)
EthernetData Link Layer (Layer 2)
Physical Layer (Layer 1)
Note: Layers 5 and 6 are not used

When using this protocol, the robot body acts as the TCP/UDP server, and the external board or system acts as the TCP/UDP client.

  • UDP Server Address: 10.21.31.103:30000
  • TCP Server Address: 10.21.31.103:30001

This protocol primarily uses a request/response mechanism. The host computer can proactively initiate data or status query requests to the robot body, and the robot body responds to some requests.

The APDU (Application Protocol Data Unit) of this protocol adopts a “Protocol Header + ASDU (Application Service Data Unit)” structure, where each APDU can carry one ASDU.

No.ContentLengthValue/Description
1-4Sync Characters4 bytes0xeb 0x91 0xeb 0x90
5-6Length2 bytesASDU byte length (little-endian), max 65535
7-8Message ID2 bytesRequest/Response frame matching identifier (little-endian)
9ASDU Format1 byte0x00=XML, 0x01=JSON
10-16Reserved7 bytesFill with 0x00

The ASDU uses JSON or XML format. JSON format is recommended (faster processing performance and more comprehensive data structure), containing the following fields:

FieldMeaning
TypeMessage type
CommandMessage command code
TimeMessage send time (YYYY-MM-DD HH:MM:SS)
ItemsParameter items

Provides ROS2-compatible topic and service interfaces through the DrDDS middleware, suitable for complex algorithm development and multi-node collaboration.

Note: Before using ROS2 tools to receive topics, check frequencies, etc., you need to source the environment variables with source /opt/robot/scripts/setup_ros2.sh.