Skip to content

Download & Build pnd_ros2

git clone https://github.com/pndbotics/pnd_ros2.git
cd pnd_ros2
colcon build
source install/setup.bash

Select Communication Mode

DDS is used by default. To switch to ROS2, follow these steps:

  1. Open the file paras.yaml on NUC. (Connection password: pndxyz)

    ssh pnd-humanoid@192.168.41.xx
    xdg-open ~/Documents/adam_u_deploy/pnd_adam_dds/resources/config/paras.yaml
    

  2. Modify the field user_domain_id: 1 in the file to select the communication mode.

    DDS communication: user_domain_id: 1

    Switch communication mode

    ROS2 communication: user_domain_id: 2

    Switch communication mode 1

ROS2 Message Definitions

Published Message: lowcmd (Desired Body Positions)

Field Type Dimension Description
motor_cmd MotorCmd_ 19 Desired positions of 19 actuators
reserve unsigned long 1 Reserved field

Subscribed Message: lowstate (Actual Body States)

Field Type Dimension Description
motor_state MotorState_ 19 Actual positions of 19 actuators
reserve unsigned long 1 Reserved field

Published Message: handcmd (Desired Finger Positions)

Field Type Dimension Description
position unsigned long 12 Desired hand positions
reserve unsigned long 1 Reserved field

Subscribed Message: handstate (Actual Finger States)

Field Type Dimension Description
position unsigned long 12 Actual hand positions
reserve unsigned long 1 Reserved field

Single Joint Data Type: MotorCmd_

Field Type Description
mode octet Mode (0)
q float Position
dq float Velocity
tau float Torque
kp float Stiffness
kd float Damping
reserve unsigned long Reserved field

Single Joint Data Type: MotorState_

Field Type Description
mode octet Mode (0)
q float Position
dq float Velocity
tau_est float Estimated torque
motorstate unsigned long Current state
reserve unsigned long Reserved field