def execute(self, userdata): global deposito_flag global seq global areas_produtos global pedidos global area_numero global nome_deposito seq += 1 if deposito_flag == True: rospy.logwarn("o produto carregado e " + str(userdata.produto)) rospy.logwarn("deposito 1 " + str(Areas.STORE_DEPOSITO1[3])) rospy.logwarn("deposito 2 " + str(Areas.STORE_DEPOSITO2[3])) rospy.logwarn("deposito 3 " + str(Areas.STORE_DEPOSITO3[3])) if (userdata.produto == Areas.STORE_DEPOSITO1[3]): rospy.logwarn("deposito1") nome_deposito = "Deposito1" ligarNavigation(Areas.STORE_DEPOSITO1, seq, "Deposito1") if (userdata.produto == Areas.STORE_DEPOSITO2[3]): rospy.logwarn("deposito2") nome_deposito = "Deposito2" ligarNavigation(Areas.STORE_DEPOSITO2, seq, "Deposito2") if (userdata.produto == Areas.STORE_DEPOSITO3[3]): rospy.logwarn("deposito3") nome_deposito = "Deposito3" ligarNavigation(Areas.STORE_DEPOSITO3, seq, "Deposito3") userdata.produto = verifica_areas(userdata.produto) deposito_flag = False return 'indo_deposito' userdata.produto = verifica_areas(userdata.produto) if self.count == 0: self.count += 1 ligarNavigation(Areas.PEDIDOS, seq, "Pedidos") return 'coleta_pedido' if len(areas_produtos) == 0 or len(pedidos) == 0: ligarNavigation(Areas.CASA, seq, "Casa") entregarProduto("Casa") return 'voltar_casa' rospy.logwarn("area_numero = " + str(area_numero)) rospy.logwarn(areas_produtos[area_numero]) ligarNavigation(areas_produtos[area_numero], seq, "Area" + str(area_numero)) return 'coleta_produto'
def execute(self, userdata): global deposito_flag global seq global areas_produtos global pedidos global area_numero global nome_deposito seq += 1 if deposito_flag == True: rospy.logwarn("o produto carregado e "+str(userdata.produto)) rospy.logwarn("deposito 1 "+str(Areas.STORE_DEPOSITO1[3])) rospy.logwarn("deposito 2 "+str(Areas.STORE_DEPOSITO2[3])) rospy.logwarn("deposito 3 "+str(Areas.STORE_DEPOSITO3[3])) if(userdata.produto == Areas.STORE_DEPOSITO1[3]): rospy.logwarn("deposito1") nome_deposito = "Deposito1" ligarNavigation(Areas.STORE_DEPOSITO1, seq, "Deposito1") if(userdata.produto == Areas.STORE_DEPOSITO2[3]): rospy.logwarn("deposito2") nome_deposito = "Deposito2" ligarNavigation(Areas.STORE_DEPOSITO2, seq, "Deposito2") if(userdata.produto == Areas.STORE_DEPOSITO3[3]): rospy.logwarn("deposito3") nome_deposito = "Deposito3" ligarNavigation(Areas.STORE_DEPOSITO3, seq, "Deposito3") userdata.produto = verifica_areas(userdata.produto) deposito_flag = False return 'indo_deposito' userdata.produto = verifica_areas(userdata.produto) if self.count == 0: self.count += 1 ligarNavigation(Areas.PEDIDOS, seq, "Pedidos") return 'coleta_pedido' if len(areas_produtos) == 0 or len(pedidos) == 0: ligarNavigation(Areas.CASA, seq, "Casa") entregarProduto("Casa") return 'voltar_casa' rospy.logwarn("area_numero = "+str(area_numero)) rospy.logwarn(areas_produtos[area_numero]) ligarNavigation(areas_produtos[area_numero], seq, "Area"+str(area_numero)) return 'coleta_produto'
def voltar(req): ligarNavigation(Areas.CASA, seq, "Casa") entregarProduto("Casa") sys.exit()
def execute(self, userdata): global nome_deposito rospy.logwarn("entregar produto em : " + nome_deposito) entregarProduto(nome_deposito) return 'entregue'
def execute(self, userdata): global nome_deposito rospy.logwarn("entregar produto em : "+nome_deposito) entregarProduto(nome_deposito) return 'entregue'