ROS2 Interface Development Documentation•Chapter 0: Overview and Development Preparation

Chapter 0: Overview and Development Preparation

Updated: October 16, 2026

1 ROS2 Interface Positioning

The robot's "external standard interface" enables any ROS2 developer to quickly access robot capabilities.

Target users: ROS2 ecosystem developers, rapid prototyping/integration engineers, and external system integrators.

Typical scenarios: Quick teleoperation, SLAM/navigation integration, and upper-layer application development.

2 Document Scope and ROS Version

This document applies to the ROS2 secondary development of EngineAI PM01 series and T800 series humanoid robots, based on ROS2 Humble Version.

This document integrates the original ROS2 Protocol Specification and merges it with the content of various example documents, organized by interface characteristics into chapters. Developers can follow the chapter order to get started gradually, or jump to reference as needed.

3 Development Environment Setup

EngineAI ROS2 Interface provides a set of ROS2 messages. Benefiting from the ROS2 ecosystem, users only need a standard ROS2 development environment plus some configuration to call the robot services provided by EngineAI. ROS2 repository address: engineai_ros2_workspace.

Developers can set up the development environment in the following two ways.

EngineAI has a built-in Web IDE on the robot's application compute unit. Users do not need to configure any environment; they only need to access the Web service to start running examples and developing.

Connect to the robot's built-in Wi-Fi (password e12345678), access the onboard Web IDE (address is usually http://192.168.0.162, see the robot's body label or product manual for details) to start using it.

3.2 Method 2: Set Up a PC Development Environment

System Environment Requirements:

ItemRequirement
Operating SystemUbuntu 22.04
ROS VersionROS2 Humble
CompilerGCC >= 11
Build ToolCMake >= 3.22
Python>= 3.10

Install Software Dependencies:

Bash
sudo apt update
sudo apt install rsync sshpass openssh-client libglfw3-dev libxinerama-dev libxcursor-dev
sudo apt install ros-dev-tools ros-humble-rmw-cyclonedds-cpp ros-humble-ros-base

ROS2 Communication Configuration:

The following environment variables must be configured correctly; otherwise communication with the robot will not work:

Bash
# ROS_DOMAIN_ID must match
export ROS_DOMAIN_ID=69
# Set up multi-machine communication
export ROS_LOCALHOST_ONLY=0
# Use rmw_cyclonedds_cpp
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

You can write the configuration to ~/.bashrc with one command using the following script:

Bash
echo -e '\nexport ROS_DOMAIN_ID=69\nexport ROS_LOCALHOST_ONLY=0\nexport RMW_IMPLEMENTATION=rmw_cyclonedds_cpp' >> ~/.bashrc && source ~/.bashrc

3.3 Accessing the Robot

Clone the repository: Once the environment is ready, you can directly clone the ROS2 repository and enter the workspace:

Bash
git clone https://github.com/engineai-robotics/engineai_ros2_workspace.git
cd engineai_ros2_workspace

Hardware Connection: Connect to the robot via the network port on the back of the robot, then you can communicate with the robot through ROS2 multi-machine.

Gamepad remote control tip: The PM01 robot body has two USB slots. The gamepad's USB receiver must be plugged into the lower port to work properly for remote control; plugging into the upper port has no effect.

SSH Login Information: The robot has two built-in compute units, which users can access via SSH login:

Compute UnitIP AddressUsernamePassword
Application Compute Unit192.168.0.162ubuntuubuntu
Motion Control Compute Unit192.168.0.163user1

Pre-development Checklist:

  • ROS2 Humble environment is available, ros2 topic list can properly list system topics
  • engineai_ros2_workspace has been built, interface_protocol and interface_example packages can be found
  • The robot hardware interface node has been started (can be verified via ros2 topic echo /hardware/joint_state )

3.4 Build and Deployment

Install Third-party Dependencies: Before building nodes or the simulation environment, run the provided third-party dependency installation script first, otherwise some message packages/examples may lack dependencies.

Bash
# Run in the engineai_ros2_workspace root directory
./src/third_party/install.sh

Build workspace(from ROS2 repository):

Bash
# Build all nodes and examples on the host
./scripts/build_nodes.sh example

# Build the simulation environment
./scripts/build_nodes.sh sim

# Build on the robot side (install third-party deps → build → configure environment)
./src/third_party/install.sh
./scripts/build_nodes.sh
source install/setup.bash

Sync Code to the Robot Orin Mainboard:

Bash
./scripts/sync_src.sh orin

After syncing, log into the Orin mainboard via SSH, enter the workspace directory and build it; the usage is the same as on the host.

4 Message File Locations

All custom ROS2 message definitions are located in interface_protocol package. The directory structure is as follows:

PLAIN
src/interface_protocol/msg/(total 19 types, core 9 types as follows)
├── BodyVelCmd.msg
├── JointCommand.msg
├── JointMotionPlanRequest.msg
├── JointMotionPlanState.msg
├── JointOverrideCommand.msg
├── JointState.msg
├── LedControl.msg
├── MotionState.msg
└── MotionStateRequest.msg

Source links for the core message definitions (click a filename to view it on GitHub): BodyVelCmd.msg · JointCommand.msg · JointMotionPlanRequest.msg · JointMotionPlanState.msg · JointOverrideCommand.msg · JointState.msg · LedControl.msg · MotionState.msg · MotionStateRequest.msg

The remaining sensor / debug messages (Alert, GamepadKeys, Heartbeat, ImuInfo, MotorCommand, MotorDebug, MotorState, ParallelParserType, PowerInfo, Tts) complete definitions can be found at GitHub Message Directory. During development, you can import the required message types via from interface_protocol.msg import XxxMsg in your code.

5 General Conventions

The following conventions apply to all interfaces and are not repeated in individual chapters:

ConventionDescription
Unit SystemAngles uniformly use radians (rad), velocity uses m/s, angular velocity uses rad/s. Angle to radians:rad = deg × π / 180
Joint IndexJoints are numbered sequentially starting from 0; the number of joints can be viewed via /hardware/joint_state
Array LengthThe length of all joint-related arrays must equal the robot's total number of joints (num_total_joints)
QoS PolicyDifferent interfaces use different QoS: joint command types are recommended to use Best Effort to reduce latency; state transition types must match the Reliable configuration, otherwise message reception fails
Control FrequencyEach interface has a recommended frequency; too low a frequency may cause discontinuous motion or unstable control
Motion Mode PrerequisiteMost interfaces need to be switched to a specified motion state first to take effect; see Chapter 1

6 Interface Overview

The table below summarizes all ROS2 interfaces' topic, message type, and direction for quick reference:

Interface ModuleTopicMessage TypeDirection
Joint Command/hardware/joint_commandJointCommand.msgClient → Joint Controller
Joint State
/hardware/joint_stateJointState.msgJoint Controller → Client
Motion State/motion/motion_stateMotionState.msgMotion Management Service → Client
Motion State Transition/motion/set_motion_stateMotionStateRequest.msgClient → Motion Management Service
LED Control/hardware/led_controlLedControl.msgClient → Lighting Control Service
Joint Motion Planning-Request/motion/joint_motion_plan/requestJointMotionPlanRequest.msgClient → Planner
Joint Motion Planning-State/motion/joint_motion_plan/stateJointMotionPlanState.msgPlanner → Client
Joint Override Control/motion/joint_override_commandJointOverrideCommand.msgClient → Planner
Body Velocity Control/motion/body_vel_cmdBodyVelCmd.msgClient → Walking Service
Gamepad Keys/hardware/gamepad_keysGamepadKeys.msgSensor → Client
IMU Data/hardware/imu_infoImuInfo.msgSensor → Client
Power/battery data/hardware/power_infoPowerInfo.msgSensor → Client
Motor Debug Data/hardware/motor_debugMotorDebug.msgSensor → Client

7 QoS Configuration Reference

Different interfaces' QoS configuration requirements differ; a mismatched configuration will cause message reception to fail. The table below summarizes QoS requirements of each interface, with information from GitHub example scripts' QoSProfile definitions:

TopicPublish/SubscribeReliabilityDurability
/motion/set_motion_statePublishRELIABLEVOLATILE
/motion/motion_stateSubscribeBEST_EFFORTVOLATILE
/hardware/joint_commandPublishBEST_EFFORTVOLATILE
/hardware/joint_stateSubscribeBEST_EFFORTVOLATILE

The publisher for motion state transition must use RELIABLE, while subscribing to motion state uses BEST_EFFORT. If QoS does not match, messages will not be received.

8 Model Specification Comparison

The table below compares the key specification differences among the three models, with information from the Feishu wiki pages "About PM01", "About T800 (Development Edition)", "About T800 (Pro Edition)":

SpecificationPM01T800 Development EditionT800 Pro
Total DOF242543 (including dexterous hands)
Single-leg DOF666
Waist DOF111
Single-arm DOF557 (including wrist)
Dexterous HandNoneNoneYes (per hand 7 DOF)
Head DOF1 (yaw)2 (pitch + yaw)2 (pitch + yaw)
Motion Planning Joint Index[12~23][12~24][12,13,14,15,16,17,27,28,29,30,31,41,42]
Application Compute UnitJetson Orin NX (16G)Jetson Orin NXJetson Orin NX
Motion Control Compute UnitNezha N97Nezha N97Nezha N97

9 Joint Index Reference Table

Joint indices start from 0 with the naming format J[number]_[part]_[action]_[side]. The indices used in control interfaces (e.g., joint_indices, YAML configs) are the J numbers in the joint names, i.e., the ROS joint indices. The "No." column in the tables below is the original document/hardware numbering, which may differ from the J number. Always use the J number from the joint name. The following is the PM01 complete joint index table, from the Feishu wiki "About PM01" page. The following are, in order, the PM01, T800 Development Edition, and T800 Pro complete joint index tables.

9.1 PM01 Joint Index (24 DOF)

No.Joint NamePartMotor ModelMotion Lower Limit (rad)Motion Upper Limit (rad)
0J00_HIP_PITCH_LLeft Hip PitchQ90H-3.1412.443
1J01_HIP_ROLL_LLeft Hip RollQ90H-0.4362.094
2J02_HIP_YAW_LLeft Hip YawQ25H-L-1.574.014
3J03_KNEE_PITCH_LLeft Knee PitchQ90H-0.26182.3562
4J04_ANKLE_PITCH_LLeft Ankle PitchQ25H-0.68070.7243
5J05_ANKLE_ROLL_LLeft Ankle RollQ25H-0.26180.2618
6J06_HIP_PITCH_RRight Hip PitchQ90H-3.1412.443
7J07_HIP_ROLL_RRight Hip RollQ90H-2.0940.436
8J08_HIP_YAW_RRight Hip YawQ25H-L-4.0141.57
9J09_KNEE_PITCH_RRight Knee PitchQ90H-0.26182.3562
10J10_ANKLE_PITCH_RRight Ankle PitchQ25H-0.68070.7243
11J11_ANKLE_ROLL_RRight Ankle RollQ25H-0.26180.2618
12J12_WAIST_YAWWaist YawQ25H-L-4.0141.57
13J13_SHOULDER_PITCH_LLeft Shoulder PitchQ25H-2.96712.7925
14J14_SHOULDER_ROLL_LLeft Shoulder RollQ25H-0.61082.3562
15J15_SHOULDER_YAW_LLeft Shoulder YawQ25H-2.6182.618
16J16_ELBOW_PITCH_LLeft Elbow PitchQ25H-2.19480.7374
17J17_ELBOW_YAW_LLeft Elbow YawQ25H-2.6182.618
18J18_SHOULDER_PITCH_RRight Shoulder PitchQ25H-2.96712.7925
19J19_SHOULDER_ROLL_RRight Shoulder RollQ25H-2.35620.6108
20J20_SHOULDER_YAW_RRight Shoulder YawQ25H-2.6182.618
21J21_ELBOW_PITCH_RRight Elbow PitchQ25H-2.19480.7374
22J22_ELBOW_YAW_RRight Elbow YawQ25H-2.6182.618
23J23_HEAD_YAWHead YawQ25H-0.61090.6109

9.2 T800 Development Edition (25 DOF) Joint Index

No.PartLink NameJoint NameMotion Range (rad)
1Left Hip PitchLINK_HIP_PITCH_LJ00_HIP_PITCH_L-2.88 ~ 2.181
2Left Hip RollLINK_HIP_ROLL_LJ01_HIP_ROLL_L-0.2618 ~ 1.7444
3Left Hip YawLINK_HIP_YAW_LJ02_HIP_YAW_L-1.4137 ~ 3.8921
4Left Knee PitchLINK_KNEE_PITCH_LJ03_KNEE_PITCH_L-0.261667 ~ 2.355
5Left Ankle PitchLINK_ANKLE_PITCH_LJ04_ANKLE_PITCH_L-0.68068 ~ 0.68068
6Left Ankle RollLINK_ANKLE_ROLL_LJ05_ANKLE_ROLL_L-0.3491 ~ 0.1745
7Right Hip PitchLINK_HIP_PITCH_RJ06_HIP_PITCH_R-2.879 ~ 2.181
8Right Hip RollLINK_HIP_ROLL_RJ07_HIP_ROLL_R-1.7444 ~ 0.2618
9Right Hip YawLINK_HIP_YAW_RJ08_HIP_YAW_R-3.8921 ~ 1.4137
10Right Knee PitchLINK_KNEE_PITCH_RJ09_KNEE_PITCH_R-0.261667 ~ 2.355
11Right Ankle PitchLINK_ANKLE_PITCH_RJ10_ANKLE_PITCH_R-0.68068 ~ 0.68068
12Right Ankle RollLINK_ANKLE_ROLL_RJ11_ANKLE_ROLL_R-0.1745 ~ 0.3491
13Waist YawLINK_TORSO_YAWJ12_TORSO_YAW-2.81 ~ 2.81
14Left Shoulder PitchLINK_SHOULDER_PITCH_LJ13_SHOULDER_PITCH_L-3.229 ~ 2.443
15Left Shoulder RollLINK_SHOULDER_ROLL_LJ14_SHOULDER_ROLL_L-0.436 ~ 2.487
16Left Shoulder YawLINK_SHOULDER_YAW_LJ15_SHOULDER_YAW_L-2.618 ~ 2.618
17Left Elbow PitchLINK_ELBOW_PITCH_LJ16_ELBOW_PITCH_L-2.295 ~ 0.288
18Left Elbow YawLINK_ELBOW_YAW_LJ17_ELBOW_YAW_L-2.618 ~ 2.618
19Right Shoulder PitchLINK_SHOULDER_PITCH_RJ18_SHOULDER_PITCH_R-3.229 ~ 2.443
20Right Shoulder RollLINK_SHOULDER_ROLL_RJ19_SHOULDER_ROLL_R-2.487 ~ 0.436
21Right Shoulder YawLINK_SHOULDER_YAW_RJ20_SHOULDER_YAW_R-2.618 ~ 2.618
22Right Elbow PitchLINK_ELBOW_PITCH_RJ21_ELBOW_PITCH_R-2.295 ~ 0.288
23Right Elbow YawLINK_ELBOW_YAW_RJ22_ELBOW_YAW_R-2.618 ~ 2.618
24Head PitchLINK_HEAD_PITCHJ23_HEAD_PITCH-0.523 ~ 0.523
25Head YawLINK_HEAD_YAWJ24_HEAD_YAW-1.222 ~ 1.222

9.3 T800 Pro (43 DOF, including dexterous hands) Joint Index

No.PartLink NameJoint NameMotion Range (rad)
1Left Hip PitchLINK_HIP_PITCH_LJ00_HIP_PITCH_L-2.88 ~ 2.181
2Left Hip RollLINK_HIP_ROLL_LJ01_HIP_ROLL_L-0.2618 ~ 1.7444
3Left Hip YawLINK_HIP_YAW_LJ02_HIP_YAW_L-1.4137 ~ 3.8921
4Left Knee PitchLINK_KNEE_PITCH_LJ03_KNEE_PITCH_L-0.261667 ~ 2.355
5Left Ankle PitchLINK_ANKLE_PITCH_LJ04_ANKLE_PITCH_L-0.68068 ~ 0.68068
6Left Ankle RollLINK_ANKLE_ROLL_LJ05_ANKLE_ROLL_L-0.3491 ~ 0.1745
7Right Hip PitchLINK_HIP_PITCH_RJ06_HIP_PITCH_R-2.879 ~ 2.181
8Right Hip RollLINK_HIP_ROLL_RJ07_HIP_ROLL_R-1.7444 ~ 0.2618
9Right Hip YawLINK_HIP_YAW_RJ08_HIP_YAW_R-3.8921 ~ 1.4137
10Right Knee PitchLINK_KNEE_PITCH_RJ09_KNEE_PITCH_R-0.261667 ~ 2.355
11Right Ankle PitchLINK_ANKLE_PITCH_RJ10_ANKLE_PITCH_R-0.68068 ~ 0.68068
12Right Ankle RollLINK_ANKLE_ROLL_RJ11_ANKLE_ROLL_R-0.1745 ~ 0.3491
23Waist YawLINK_TORSO_YAWJ12_TORSO_YAW-2.81 ~ 2.81
26Left Shoulder PitchLINK_SHOULDER_PITCH_LJ13_SHOULDER_PITCH_L-3.229 ~ 2.443
27Left Shoulder RollLINK_SHOULDER_ROLL_LJ14_SHOULDER_ROLL_L-0.436 ~ 2.487
28Left Shoulder YawLINK_SHOULDER_YAW_LJ15_SHOULDER_YAW_L-2.618 ~ 2.618
29Left Elbow PitchLINK_ELBOW_PITCH_LJ16_ELBOW_PITCH_L-2.295 ~ 0.288
30Left Elbow YawLINK_ELBOW_YAW_LJ17_ELBOW_YAW_L-2.618 ~ 2.618
31Left Wrist PitchLINK_WRIST_PITCH_LJ18_WRIST_PITCH_L-0.436 ~ 0.436
32Left Wrist RollLINK_WRIST_ROLL_LJ19_WRIST_ROLL_L-1.047 ~ 0.611
34Left Hand Thumb Base JointLINK_THUMB_BASE_LJ20_THUMB_BASE_L-2.007 ~ 0
35Left Hand Thumb Middle SegmentLINK_THUMB_MID_LJ21_THUMB_MID_L0 ~ 1.5708
36Left Hand Thumb TipLINK_THUMB_TIP_LJ22_THUMB_TIP_L0 ~ 1.5708
37Left Hand Index Base JointLINK_INDEX_BASE_LJ23_INDEX_BASE_L-1.6929 ~ 0
38Left Hand Index TipLINK_INDEX_TIP_LJ24_INDEX_TIP_L-1.85 ~ 0
39Left Hand Middle Base JointLINK_MIDDLE_BASE_LJ25_MIDDLE_BASE_L-1.6929 ~ 0
40Left Hand Middle TipLINK_MIDDLE_TIP_LJ26_MIDDLE_TIP_L-1.85 ~ 0
41Right Shoulder PitchLINK_SHOULDER_PITCH_RJ27_SHOULDER_PITCH_R-3.229 ~ 2.443
42Right Shoulder RollLINK_SHOULDER_ROLL_RJ28_SHOULDER_ROLL_R-2.487 ~ 0.436
43Right Shoulder YawLINK_SHOULDER_YAW_RJ29_SHOULDER_YAW_R-2.618 ~ 2.618
44Right Elbow PitchLINK_ELBOW_PITCH_RJ30_ELBOW_PITCH_R-2.295 ~ 0.288
45Right Elbow YawLINK_ELBOW_YAW_RJ31_ELBOW_YAW_R-2.618 ~ 2.618
46Right Wrist PitchLINK_WRIST_PITCH_RJ32_WRIST_PITCH_R-0.436 ~ 0.436
47Right Wrist RollLINK_WRIST_ROLL_RJ33_WRIST_ROLL_R-0.611 ~ 1.047
49Right Hand Thumb Base JointLINK_THUMB_BASE_RJ34_THUMB_BASE_R0 ~ 2.007
50Right Hand Thumb Middle SegmentLINK_THUMB_MID_RJ35_THUMB_MID_R0 ~ 1.5708
51Right Hand Thumb TipLINK_THUMB_TIP_RJ36_THUMB_TIP_R0 ~ 1.5708
52Right Hand Index Base JointLINK_INDEX_BASE_RJ37_INDEX_BASE_R0 ~ 1.6929
53Right Hand Index TipLINK_INDEX_TIP_RJ38_INDEX_TIP_R0 ~ 1.85
54Right Hand Middle Base JointLINK_MIDDLE_BASE_RJ39_MIDDLE_BASE_R0 ~ 1.6929
55Right Hand Middle TipLINK_MIDDLE_TIP_RJ40_MIDDLE_TIP_R0 ~ 1.85
56Head PitchLINK_HEAD_PITCHJ41_HEAD_PITCH-0.523 ~ 0.523
58Head YawLINK_HEAD_YAWJ42_HEAD_YAW-1.222 ~ 1.222