Skip to main content
Version: V2.0.4.x

8.7 Dual Arm Joints

8.7.1 Status Acquisition Interfaces

1. Get Dual Arm Joint Information

  • Description: Get status information of dual arm joints, including current position, speed, current, and temperature of the joints. Applicable to all series of Walker Tienkung.

  • Control Method: topic

  • Topic Name: /arm/status

  • Data Definition Location: bodyctrl_msgs::msg::MotorStatusMsg.msg

  • Data Format:

    std_msgs/Header header
    MotorStatus[] status

    MotorStatus definition:
    uint16 name # MotorName
    float32 pos # rad
    float32 speed # rad
    float32 current # A
    float32 temperature
    uint32 error

    Error field value definitions:

    error = 33072,Device offline
    error = 33073,Joint position out of limit
    error = 1,Joint motor overheating
    error = 2,Overcurrent
    error = 3,Undervoltage
    error = 4,Joint mos overheating
    error = 5,Stalling
    error = 6,Overvoltage
    error = 7,Phase loss
    error = 8,Encoder error

8.7.2 Control Interfaces

1. Position Mode

  • Description: Position control interface for joints, requiring desired position, desired speed, and maximum current. Applicable to all series of Walker Tienkung.

  • Control Method: topic

  • Topic Name: /arm/cmd_pos

  • Data Definition Location: bodyctrl_msgs::msg::CmdSetMotorPosition.msg

  • Data Format:

    std_msgs/Header header
    SetMotorPosition[] cmds

    # SetMotorPosition.msg
    uint16 name # MotorName
    float32 pos # rad
    float32 spd # rad/s
    float32 cur # Current
  • Example Commands:

    ros2 topic pub /arm/cmd_pos bodyctrl_msgs/msg/CmdSetMotorPosition "{cmds: [{name: 12, pos: 0.3, spd: 0.2, cur: 8.0 }]}"
    ros2 topic pub /arm/cmd_pos bodyctrl_msgs/msg/CmdSetMotorPosition "{cmds: [{name: 22, pos: -0.3, spd: 0.2, cur: 8.0 }]}"

2. Force-Position Hybrid Mode

  • Description: Force-position hybrid control interface for joints, requiring desired position, desired speed, feedforward torque, kp, and kd coefficients. Applicable to all series of Walker Tienkung.

  • Control Method: topic

  • Topic Name: /arm/cmd_ctrl

  • Data Definition Location: bodyctrl_msgs::msg::CmdMotorCtrl.msg

  • Data Format:

    std_msgs/Header header
    MotorCtrl[] cmds

    # MotorCtrl.msg
    uint16 name
    float32 kp
    float32 kd
    float32 pos
    float32 spd
    float32 tor
  • Example Commands:

    ros2 topic pub /arm/cmd_ctrl bodyctrl_msgs/msg/CmdMotorCtrl "{cmds: [{name: 13, kp: 30.0, kd: 10.0, pos: 0.2, spd: 0.0, tor: 0.0}]}"
    ros2 topic pub /arm/cmd_ctrl bodyctrl_msgs/msg/CmdMotorCtrl "{cmds: [{name: 23, kp: 30.0, kd: 10.0, pos: 0.2, spd: 0.0, tor: 0.0}]}"

3. Speed Mode

  • Description: Speed control interface for joints, requiring desired speed and maximum current. Applicable to all series of Walker Tienkung. Note that once this message is published, the motor will continue to rotate at this speed until a message with spd=0.0 is received on this topic, so use with caution.

  • Control Method: topic

  • Topic Name: /arm/cmd_vel

  • Data Definition Location: bodyctrl_msgs::msg::CmdSetMotorSpeed.msg

  • Data Format:

    std_msgs/Header header
    SetMotorSpeed[] cmds

    #SetMotorSpeed.msg
    uint16 name # MotorName
    float32 spd # rad/s
    float32 cur # A

4. Arm Joint Homing

  • Description: Homing interface for dual arm joints. When this interface is called, it will set the current position of the specified motor on the arm as the zero position. When pressing D on the remote control to home, the motor will move to the current position. Generally, it needs to be used with a homing tool. Please use with caution when there is no homing tool. Applicable to all series of Walker Tienkung.
  • Control Method: topic
  • Topic Name: /arm/cmd_set_zero
  • Data Definition Location: std_msgs::msg::String
  • Data Format:
    Send the joint id in string form to achieve homing
    Dual arm joint ids:
    Left arm: 11---17,
    Right arm: 21---27;