Example #1
0
 def apply3DFit(self):
     if om.findObjectByName('drill') is None: 
         self.log('No 3D fit of drill. Click Spawn Drill button to provide a fit.')
     
     msg = lcmdrc.pfgrasp_command_t()
     msg.command = lcmdrc.pfgrasp_command_t.RUN_ONE_ITER_W_3D_PRIOR
     affordanceReach = om.findObjectByName('grasp frame')
     affordanceReach.actor.GetUserTransform().GetPosition(msg.pos)
     lcmUtils.publish('PFGRASP_CMD', msg)
Example #2
0
    def start(self, autoMode):

        # start pfgrasp c++ program  
        startPfgraspHere = False 
            
        # initialize pfgrasp particles
        msg = lcmdrc.pfgrasp_command_t()
        msg.command = lcmdrc.pfgrasp_command_t.START
        lcmUtils.publish('PFGRASP_CMD', msg)
        
        self.autoMode = autoMode
        
        if self.autoMode:
            self.runoneiter()
Example #3
0
 def runoneiter(self):
     msg = lcmdrc.pfgrasp_command_t()
     msg.command = lcmdrc.pfgrasp_command_t.RUN_ONE_ITER
     lcmUtils.publish('PFGRASP_CMD', msg)