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

opening and closing NAO's hand

asked 2014-07-28 22:27:18 -0500

uzair gravatar image

updated 2015-10-30 08:25:44 -0500

I am trying to open and close NAO's gripper. I searched the documentations but I could not find what command or what topic to publish on to access the robots grippers.

I want to make NAO hold a paper plate in his hand.

Can somebody please tell me how I can open and close NAO's hand through ROS?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-28 23:47:42 -0500

Mehdi. gravatar image

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-07-28 22:27:18 -0500

Seen: 1,038 times

Last updated: Oct 30 '15