class GenerateGrasps(smach.State):
    def __init__(self):
        smach.State.__init__(
            self, outcomes=["no_grasps", "grasps_found"], input_keys=["object_points"], output_keys=["grasps"]
        )
        self.gh = GraspHandler()

    def execute(self, userdata):
        grasps = self.gh.get_grasps(userdata.object_points)
        if grasps is None:
            return "no_grasps"

        userdata.grasps = grasps
        return "grasps_found"
class GenerateGrasps(smach.State):
    def __init__(self):
        smach.State.__init__(self,
                             outcomes = ['no_grasps', 'grasps_found'], 
                             input_keys = ['object_points'],
                             output_keys = ['grasps'])
        self.gh = GraspHandler()
    
    def execute(self, userdata):
        grasps = self.gh.get_grasps(userdata.object_points)
        if grasps:
            userdata.grasps = grasps
            return 'grasps_found'
        else:
            return 'no_grasps'
Exemplo n.º 3
0
class GenerateGrasps(smach.State):
    def __init__(self):
        smach.State.__init__(self,
                             outcomes=['no_grasps', 'grasps_found'],
                             input_keys=['object_points'],
                             output_keys=['grasps'])
        self.gh = GraspHandler()

    def execute(self, userdata):
        grasps = self.gh.get_grasps(userdata.object_points)
        if grasps:
            userdata.grasps = grasps
            return 'grasps_found'
        else:
            return 'no_grasps'
 def __init__(self):
     smach.State.__init__(
         self, outcomes=["no_grasps", "grasps_found"], input_keys=["object_points"], output_keys=["grasps"]
     )
     self.gh = GraspHandler()
 def __init__(self):
     smach.State.__init__(self,
                          outcomes = ['no_grasps', 'grasps_found'], 
                          input_keys = ['object_points'],
                          output_keys = ['grasps'])
     self.gh = GraspHandler()
Exemplo n.º 6
0
 def __init__(self):
     smach.State.__init__(self,
                          outcomes=['no_grasps', 'grasps_found'],
                          input_keys=['object_points'],
                          output_keys=['grasps'])
     self.gh = GraspHandler()