else: pass elif isinstance(lmcpObject, RemoveEntities): print(" - Update removed uav state") self.drones.removedUavUpdate(lmcpObject.get_EntityList()[0]) print(" - Done") ################# ## Main ################# if __name__ == '__main__': myHost = 'localhost' myPort = 5555 amaseClient = AmaseTCPClient(myHost, myPort) #amaseClient.addReceiveCallback(PrintLMCPObject()) amaseClient.addReceiveCallback(SampleHazardDetector(amaseClient)) try: # make a threaded client, listen until a keyboard interrupt (ctrl-c) #start client thread amaseClient.start() while True: #wait for keyboard interrupt pass except KeyboardInterrupt as ki: print("Stopping amase tcp client") except Exception as ex: print(ex)
hazardZoneEstimateReport.set_PerceivedZoneType(HazardType.Fire) hazardZoneEstimateReport.set_EstimatedZoneDirection(0) hazardZoneEstimateReport.set_EstimatedZoneSpeed(0) #Sending the Vehicle Action Command message to AMASE to be interpreted self.__client.sendLMCPObject(hazardZoneEstimateReport) ################# ## Main ################# if __name__ == '__main__': myHost = 'localhost' myPort = 5555 amaseClient = AmaseTCPClient(myHost, myPort) #amaseClient.addReceiveCallback(PrintLMCPObject()) amaseClient.addReceiveCallback(Controller(amaseClient)) try: # make a threaded client, listen until a keyboard interrupt (ctrl-c) #start client thread amaseClient.start() while True: pass except KeyboardInterrupt as ki: print("Stopping amase tcp client") except Exception as ex: print(ex) amaseClient.stop()
hazardZoneEstimateReport.set_PerceivedZoneType(HazardType.Fire) hazardZoneEstimateReport.set_EstimatedZoneDirection(0) hazardZoneEstimateReport.set_EstimatedZoneSpeed(0) #Sending the Vehicle Action Command message to AMASE to be interpreted self.__client.sendLMCPObject(hazardZoneEstimateReport) ################# ## Main ################# if __name__ == '__main__': myHost = 'localhost' myPort = 5555 amaseClient = AmaseTCPClient(myHost, myPort) #amaseClient.addReceiveCallback(PrintLMCPObject()) amaseClient.addReceiveCallback(Main(amaseClient)) try: # make a threaded client, listen until a keyboard interrupt (ctrl-c) #start client thread amaseClient.start() while True: #wait for keyboard interrupt pass except KeyboardInterrupt as ki: print("Stopping amase tcp client") except Exception as ex: print(ex)
hazardZoneEstimateReport.set_PerceivedZoneType(HazardType.Fire) hazardZoneEstimateReport.set_EstimatedZoneDirection(0) hazardZoneEstimateReport.set_EstimatedZoneSpeed(0) # Sending the Vehicle Action Command message to AMASE to be interpreted self.__client.sendLMCPObject(hazardZoneEstimateReport) ################# ## Main ################# if __name__ == '__main__': myHost = 'localhost' myPort = 5555 amaseClient = AmaseTCPClient(myHost, myPort) # amaseClient.addReceiveCallback(PrintLMCPObject()) detector = SampleHazardDetector(amaseClient) # detector.convex_hull() amaseClient.addReceiveCallback(detector) try: # make a threaded client, listen until a keyboard interrupt (ctrl-c) # start client thread amaseClient.start() while True: # wait for keyboard interrupt pass except KeyboardInterrupt as ki: print("Stopping amase tcp client")