Пример #1
0
    def get_segmentation(self, data):
    
        goal = SegmentGoal()
        goal.image = data.image
        goal.depth = data.depth

        # this callback will set the member variable mask
        self.segment_client.send_goal(goal, done_cb=self.segmentDoneCB, 
                                      feedback_cb=self.segmentFeedbackCB)
        self.segment_client.wait_for_result()
        
        return self.mask
    def get_segmentation(self, data):

        goal = SegmentGoal()
        goal.image = data.image
        goal.depth = data.depth
        rospy.loginfo("got segmentation server")

        # this callback will set the member variable mask
        self.mask = None
        self.segment_client.send_goal(goal, done_cb=self.segmentDoneCB)
        self.segment_client.wait_for_result()

        return self.mask
    def get_segmentation(self, data):

        goal = SegmentGoal()
        goal.image = data.image
        goal.depth = data.depth
        rospy.loginfo("got segmentation server")

        # this callback will set the member variable mask
        self.mask = None
        self.segment_client.send_goal(goal, done_cb=self.segmentDoneCB)
        self.segment_client.wait_for_result()
        
        return self.mask
    def get_segmentation(self, kinect_data):
        """ And this handles calling the segmentation actionlib """

        print "waiting for segmentation server"
        self.segment_client.wait_for_server()    
        print "... got segmentation server"

        goal = SegmentGoal()
        goal.image = kinect_data.image
        goal.depth = kinect_data.depth

        print "Attempting to get segmentation"
        self.segment_client.send_goal(goal)
        self.segment_client.wait_for_result()
        state = self.segment_client.get_state()
        result = self.segment_client.get_result()

        return (state, result)
    def get_segmentation(self, kinect_data):
        """ And this handles calling the segmentation actionlib """

        print "waiting for segmentation server"
        self.segment_client.wait_for_server()
        print "... got segmentation server"

        goal = SegmentGoal()
        goal.image = kinect_data.image
        goal.depth = kinect_data.depth

        print "Attempting to get segmentation"
        self.segment_client.send_goal(goal)
        self.segment_client.wait_for_result()
        state = self.segment_client.get_state()
        result = self.segment_client.get_result()

        return (state, result)