Skip to content

ROS2 Message Definitions

PND humanoid robots support native ROS 2 communication via CycloneDDS for direct msg interaction between your PC and the robot—no SDK forwarding required.

  • Subscribe to lowstate (pnd_adam.msg.dds_.LowState_) for robot state
  • Subscribe to handstate (pnd_adam.msg.dds_.HandState_) for finger state
  • Publish to lowcmd (pnd_adam.msg.dds_.LowCmd_) for body joint motors (excluding hands)
  • Publish to handcmd (pnd_adam.msg.dds_.HandCmd_) for finger motors

Message structures match the DDS layer. See ROS2 Low-Level Motion Example for examples.


Obtain and Install

git clone https://github.com/pndbotics/pnd_ros2.git
cd pnd_ros2

🔗 Repository: pnd_ros2

System Requirements

System ROS 2
Ubuntu 22.04 Humble (recommended)

Dependencies

sudo apt install ros-humble-rmw-cyclonedds-cpp
sudo apt install ros-humble-rosidl-generator-dds-idl
sudo apt install libyaml-cpp-dev
sudo apt install python3-colcon-common-extensions

Build

PND robots use cyclonedds 0.10.2. Comment out auto source /opt/ros/humble/setup.bash in ~/.bashrc before building.

cd ~/pnd_ros2/cyclonedds_ws/src
git clone https://github.com/ros2/rmw_cyclonedds -b humble
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
cd ..
colcon build
source /opt/ros/humble/setup.bash
source ~/pnd_ros2/cyclonedds_ws/install/setup.bash
Directory Description
cyclonedds_ws/ ROS 2 message workspace
example/ Per-model sample programs

See ROS2 Low-Level Motion Example and Quick Development (Simulation).


Interface Description

Topics use IDL-defined structures:

Structure Description
_BatteryData_.py Battery status
_HandCmd_.py Hand desired positions
_HandState_.py Hand feedback
_IMUState_.py IMU data
_LowCmd_.py Body control command
_LowState_.py Body state summary
_MotorCmd_.py Single motor command
_MotorState_.py Single motor state

Message Field Definitions

Publish: lowcmd

Field Type Dim Meaning
mode_pr uint8 1 Mode control
motor_cmd MotorCmd_ * Variable[1]
reserve uint32 1 Reserved

[1] Adam Pro 31 / Adam SP 29 / Adam Lite 23 actuators

Subscribe: lowstate

Field Type Dim Meaning
mode_pr uint8 1 Current mode
tick uint32 1 Timestamp
imu_state IMUState_ 9 IMU
motor_state MotorState_ * Variable[1]
wireless_remote short 40 Controller[2]
battery_data BatteryData_ 1 Battery
reserve uint32 1 Reserved

[2] Indices 0–19: "lx", "ly", "rx", "ry", "lt", "rt", "xx", "yy", "a", "b", "x", "y", "lb", "rb", "back", "start", "home", "lo", "ro"

Auxiliary Structures

BatteryData_, IMUState_, MotorCmd_, MotorState_ — same fields as Chinese version.

Dexterous Hand Interface

Publish: handcmdposition uint32 [12]

Subscribe: handstateposition uint32 [12]