14 import std_srvs.srv
as std_srvs
18 from .
import redis_server
19 from .
import ros_parameters
21 from .
import zeroconf
34 rospy.loginfo(
"Hub : shutting down.")
47 while not utils.check_master():
48 rospy.logerr(
"Unable to communicate with master!")
49 rospy.rostime.wallsleep(1.0)
50 if rospy.is_shutdown():
51 sys.exit(utils.red_string(
"Unable to communicate with master!"))
52 rospy.init_node(
'hub')
53 param = ros_parameters.load()
56 utils.check_if_executable_available(
'redis-server')
58 utils.check_if_executable_available(
'avahi-daemon')
64 zeroconf.advertise_port_to_avahi(param[
'port'], param[
'name'])
67 watcher_thread.start()