def place(self, x, y): if self.moveTo(x, y, 0.015) == True: print "Place Once" ioOutput = SetOutputIO() ioOutput.mask = 1 ioOutput.status = SetOutputIO.IO_OFF self.ioPub.publish(ioOutput) rospy.sleep(0.15) else: print "Can not place"
def place(self, x, y): if self.moveTo(x, y, 0.10) == True: print "Place Once" ioOutput = SetOutputIO() ioOutput.type = SetOutputIO.TYPE_RELAY ioOutput.mask = 3 ioOutput.status = 0 self.ioPub.publish(ioOutput) rospy.sleep(2) else: print "Can not place"
def place(self, x, y, z): if self.moveTo(x, y, place_prepare_height) == True: print "Place Once" self.moveTo(x, y, z) ioOutput = SetOutputIO() ioOutput.type = SetOutputIO.TYPE_RELAY ioOutput.mask = 3 ioOutput.status = 0 self.ioPub.publish(ioOutput) rospy.sleep(1) self.moveTo(x, y, place_prepare_height) else: print "Can not place"
def pick(self, x, y): if self.moveTo(x, y, 0.004) == True: print "Pick Once" self.moveSingleJoint(3, 0.0) ioOutput = SetOutputIO() ioOutput.mask = 1 ioOutput.status = SetOutputIO.IO_ON self.ioPub.publish(ioOutput) rospy.sleep(0.05) self.moveSingleJoint(3, 0.01) return True else: print "Can not pick" return False
def pick(self, x, y, z): if self.moveTo(x, y, pick_prepare_height) == True: print "Pick Once" self.moveTo(x, y, z) ioOutput = SetOutputIO() ioOutput.type = SetOutputIO.TYPE_RELAY ioOutput.mask = 3 ioOutput.status = 3 self.ioPub.publish(ioOutput) rospy.sleep(1) self.moveTo(x, y, pick_prepare_height) return True else: print "Can not pick" return False
def pick(self, x, y): if self.moveTo(x, y, 0.10) == True: print "Pick Once" self.moveTo(x, y, 0.05) ioOutput = SetOutputIO() ioOutput.type = SetOutputIO.TYPE_RELAY ioOutput.mask = 3 ioOutput.status = 3 self.ioPub.publish(ioOutput) rospy.sleep(2) self.moveTo(x, y, 0.10) return True else: print "Can not pick" return False