parameters: (self, grasps)
docstring: Publish grasps as poses, using a PoseArray message
docstring_summary: Publish grasps as poses, using a PoseArray message
docstring_tokens: Publish grasps as poses using a PoseArray message
function: def _publish_grasps(self, grasps):
          """
          Publish grasps as poses, using a PoseArray message
          """
  
          if self._grasps_pub.get_num_connections() > 0:
              msg = PoseArray()
              msg.header.frame_id = self._robot.get_planning_frame()
              msg.header.stamp = rospy.Time.now()
  
              for grasp in grasps:
                  p = grasp.grasp_pose.pose
  
                  msg.poses.append(Pose(p.position, p.orientation))
  
              self._grasps_pub.publish(msg)
function_tokens: def _publish_grasps ( self , grasps ) : if self . _grasps_pub . get_num_connections ( ) > 0 : msg = PoseArray ( ) msg . header . frame_id = self . _robot . get_planning_frame ( ) msg . header . stamp = rospy . Time . now ( ) for grasp in grasps : p = grasp . grasp_pose . pose msg . poses . append ( Pose ( p . position , p . orientation ) ) self . _grasps_pub . publish ( msg )