def call_plan_point_cluster_grasp(self, cluster, arm_name, reference_frame_id, side=False): req = GraspPlanningRequest() req.target.reference_frame_id = reference_frame_id req.target.region.cloud = cluster req.arm_name = arm_name #not that cluster planner cares right now which arm try: res = self._cluster_grasp_srv(req) except rospy.ServiceException, e: rospy.logerr("error when calling plan_point_cluster_grasp: %s" % e) return 0
def call_plan_point_cluster_grasp(self, cluster, arm_name, reference_frame_id): """ call plan_point_cluster_grasp to get candidate grasps for a cluster """ req = GraspPlanningRequest() req.target.reference_frame_id = reference_frame_id req.target.region.cloud = cluster req.arm_name = arm_name #not that cluster planner cares try: res = self._cluster_grasp_srv(req) except rospy.ServiceException as err: rospy.logerr("error in calling plan_point_cluster_grasp: %s"%err) return 0 if res.error_code.value != 0: return [] return res.grasps
def call_plan_point_cluster_grasp(cluster): req = GraspPlanningRequest() req.target.reference_frame_id = "/base_link" req.target.cluster = cluster req.arm_name = "right_arm" req.collision_support_surface_name = "table" service_name = "plan_point_cluster_grasp" rospy.loginfo("waiting for plan_point_cluster_grasp service") rospy.wait_for_service(service_name) rospy.loginfo("service found") serv = rospy.ServiceProxy(service_name, GraspPlanning) try: res = serv(req) except rospy.ServiceException, e: rospy.logerr("error when calling plan_point_cluster_grasp: %s" % e) return 0
def call_plan_segmented_clutter_grasps(point_cloud, box_pose, box_dims, arm_name): """call plan_point_cluster_grasp to get candidate grasps for a cluster""" req = GraspPlanningRequest() req.arm_name = arm_name req.target.reference_frame_id = box_pose.header.frame_id req.target.region.cloud = point_cloud req.target.region.roi_box_pose = box_pose req.target.region.roi_box_dims = box_dims service_name = "plan_segmented_clutter_grasps" rospy.loginfo("waiting for %s" % service_name) rospy.wait_for_service(service_name) rospy.loginfo("service found") serv = rospy.ServiceProxy(service_name, GraspPlanning) try: res = serv(req) except rospy.ServiceException, e: rospy.logerr("error when calling plan_segmented_clutter_grasps: %s" % e) return 0