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:
-
Open the file
paras.yamlon NUC. (Connection password: pndxyz) -
Modify the field
user_domain_id: 1in the file to select the communication mode.DDS communication:
user_domain_id: 1
ROS2 communication:
user_domain_id: 2
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 |