Skip to content

End-Effector Tools

State Retrieval

End-effector state data can be retrieved from the following two sources:

  • The hand_left / hand_right fields of /robot_slave/states;
  • The ArmSlaveData messages of /mcap/slave_arm_left / /mcap/slave_arm_right.

The left and right end-effectors are selected by the outer-level device=0 and device=1, respectively. The dof field indicates the number of degrees of freedom (or control channels) of the target end-effector, and is NOT the left/right arm index. Client programs MUST rely on the dof, pos_low, and pos_up values reported in real time by the target device, per the following rules:

  • When dof>0, parse the position and its upper/lower limits according to the corresponding array length;
  • When dof=0, do NOT generate end-effector actions; prompt the user to check the tool configuration and connection.

Core Fields

  • rps_pos: Raw integer positions for each degree of freedom of the end-effector.
  • gripper_pos: Represents the normalized opening/closing ratio only for applicable vendor end-effector types, and MUST NOT be mixed with the raw range of rps_pos. For multi-DOF end-effectors, you MUST NOT extract only the first array element either.

Single-DOF Control Payload Structure

The payload structure for a single-DOF end-effector in the ROS 2 Wrapper is as follows:

{
  "device": 1,
  "payload": {
    "command": "hand_follow_pos",
    "hand_pos": ["P"]
  }
}
  • device
    • device=1 indicates the right side;
    • device=0 indicates the left side.
  • P
    • P MUST be an integer generated after reading the current value and the upper/lower limits.
    • The first action MUST start with a small step from the current position; jumping directly to the range endpoint is strictly PROHIBITED.