def remove_agent_handler(req):
    global position_subscribers
    global agent_names
    global agent_positions
    LOCK.acquire()
    position_subscribers[req.name].unregister()
    agent_names.remove(req.name)
    del agent_positions[req.name]
    LOCK.release()
    return dns.RemoveAgentResponse()
def remove_agent_handler(req):
    global bearing_measurement_subscribers
    global agent_names
    global agent_bearing_measurement
    LOCK.acquire()
    bearing_measurement_subscribers[req.name].unregister()
    agent_names.remove(req.name)
    del agent_bearing_measurement[req.name]
    LOCK.release()
    return dns.RemoveAgentResponse()
Example #3
0
def remove_handler(req):
    LOCK.acquire()
    agent_names.remove(req.name)
    del add_agent_proxies[req.name]
    for name in agent_names:
        remove_agent_proxies[name].call(req.name)
    plotter_proxy_remove.call(req.name)
    del remove_agent_proxies[req.name]
    remove_planner_proxies[req.name].call(req.name)
    remove_sensor_proxies[req.name].call(req.name)
    remove_estimate_proxies[req.name].call(req.name)
    remove_vehicle_proxies[req.name].call(req.name)
    del remove_planner_proxies[req.name]
    del remove_sensor_proxies[req.name]
    del remove_vehicle_proxies[req.name]
    del remove_estimate_proxies[req.name]
    LOCK.release()
    return dns.RemoveAgentResponse()
Example #4
0
def remove_agent_artist_handler(req):
    global agent_names
    global agent_positions
    global agent_estimates
    global agent_artists
    global estimate_artists
    global subscribers_position
    global subscribers_estimate
    LOCK.acquire()
    agent_artists[req.name].set_visible(False)
    estimate_artists[req.name].set_visible(False)
    agent_names.remove(req.name)
    del agent_positions[req.name]
    del agent_estimates[req.name]
    del agent_artists[req.name]
    del estimate_artists[req.name]
    subscribers_position[req.name].unregister()
    subscribers_estimate[req.name].unregister()
    LOCK.release()
    return dns.RemoveAgentResponse()
def remove_planner_handler(req):
    global stop_publish
    LOCK.acquire()
    stop_publish = True
    LOCK.release()
    return dns.RemoveAgentResponse()