ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The hand is just another joint that can be controlled by publishing a message to the topic "/joint_angles" to which nao_controller node is subscribed. The message type you need is nao_msgs/JointAnglesWithSpeed

In this message, you have to put the names of the joint you need in the list "joint_names". For your case that would be "RHand" or "LHand" as described on Naoqi's documentation

In "joint_angles" I guess it should be either 0 or 1 for open or close hand. "speed" is up to you and "relative" can be set to 0

The final message for opening the right hand with maximal speed would look like this:

hand_pos = JointAnglesWithSpeed()
hand_pos.joint_names.append('RHand')
hand_pos.joint_angles.append(1.0)
hand_pos.speed = 1.0
hand_pos.relative = 0

Then just publish it to /joint_angles. You should also not forget importing JointAnglesWithSpeed from nao_msgs.msg