How to open and close the OpenMAN IPULATOR gripper with the moveit_commander command.
Hello. I am writing the code for opening and closing the gripper of OpenManipulator using python using moveit_commander, but it does not work. Can anyone help me?
The openmanipulator controller is coming to lunch below. $ roslaunch open_manipulator_controller open_manipulator_controller.launch use_moveit:=true
In addition, the gripper opening and closing command, I am using "moveit_commander". $ from moveit_commander import MoveGroupCommander, RobotCommander
Hey,
I think I have the same issue. Did you solved your problem?
I defined a group for gripper with joint End_effector_joint and links gripper_link and gripper_link_sub.
I use this piece of python code to control my gripper:
def control_grapper(self, joint_value): rospy.wait_for_service('/oma_pikachu/gripper_controller', timeout=5.) set_joint_position = rospy.ServiceProxy('/open_manipulator/gripper_controller', SetJointPosition) msg = open_manipulator_msgs.msg.JointPosition() msg.joint_name.append("gripper") msg.position.append(joint_value) resp1 = set_joint_position("arm", msg, 5) time.sleep(1.5)
For some reason, it stay stuck at wait_for_service. What should be the argument of wait_for_service? I tried to inpu the controller for my gripper but it did not worked.Thanks and best regard,
AL