2 from __future__
import absolute_import
19 except ImportError
as exc:
23 sys.modules[
"pyros_setup"] = pyros_setup.delayed_import_auto(base_path=os.path.join(os.path.dirname(__file__),
'..',
'..',
'..',
'..',
'..'))
29 roscore_process =
None 32 if not rosgraph.masterapi.is_online():
33 master, roscore_process = pyros_setup.get_master()
34 assert master.is_online()
37 launch = roslaunch.scriptapi.ROSLaunch()
40 os.environ[
"ROS_NAMESPACE"] =
"/rocon" 41 rospy.init_node(
'gateway', )
42 rospy.set_param(
"~hub_uri",
"http://localhost:6380")
43 rospy.set_param(
"~disable_zeroconf",
"true")
45 gw_node = rocon_gateway.GatewayNode()
53 timedelta = now - start
60 rospy.signal_shutdown(
'timer expired')
65 cProfile.run(
'gw_node.spin()')
67 rospy.signal_shutdown(
'test complete')
69 if roscore_process
is not None:
70 roscore_process.terminate()