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, 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