parameters: (finger_positions, prefix)
docstring: Send a gripper goal to the action server.
docstring_summary: Send a gripper goal to the action server.
docstring_tokens: Send a gripper goal to the action server .
function: def gripper_client(finger_positions, prefix):
      """Send a gripper goal to the action server."""
      action_address = '/' + prefix + 'driver/fingers_action/finger_positions'
  
      client = actionlib.SimpleActionClient(action_address,
                                            kinova_msgs.msg.SetFingersPositionAction)
      client.wait_for_server()
  
      goal = kinova_msgs.msg.SetFingersPositionGoal()
      goal.fingers.finger1 = float(finger_positions[0])
      goal.fingers.finger2 = float(finger_positions[1])
      goal.fingers.finger3 = float(finger_positions[2])
      client.send_goal(goal)
      if client.wait_for_result(rospy.Duration(50.0)):
          return client.get_result()
      else:
          client.cancel_all_goals()
          rospy.logwarn('        the gripper action timed-out')
          return None
function_tokens: def gripper_client ( finger_positions , prefix ) : action_address = '/' + prefix + 'driver/fingers_action/finger_positions' client = actionlib . SimpleActionClient ( action_address , kinova_msgs . msg . SetFingersPositionAction ) client . wait_for_server ( ) goal = kinova_msgs . msg . SetFingersPositionGoal ( ) goal . fingers . finger1 = float ( finger_positions [ 0 ] ) goal . fingers . finger2 = float ( finger_positions [ 1 ] ) goal . fingers . finger3 = float ( finger_positions [ 2 ] ) client . send_goal ( goal ) if client . wait_for_result ( rospy . Duration ( 50.0 ) ) : return client . get_result ( ) else : client . cancel_all_goals ( ) rospy . logwarn ( '        the gripper action timed-out' ) return None