37 from python_qt_binding.QtCore
import qDebug, Qt, Signal
38 from python_qt_binding.QtWidgets
import QMessageBox
48 _master_found_signal = Signal(int)
51 super(RosPyPluginProvider, self).
__init__(
53 self.setObjectName(
'RosPyPluginProvider')
58 def load(self, plugin_id, plugin_context):
61 return super(RosPyPluginProvider, self).
load(plugin_id, plugin_context)
66 rospy.get_master().getSystemState()
75 self.tr(
'Waiting for ROS master'),
77 "Could not find ROS master. Either start a 'roscore' or abort loading the plugin."),
83 no_master = button != QMessageBox.Ok
87 raise PluginLoadError(
'RosPyPluginProvider._init_node() could not find ROS master')
95 rospy.get_master().getSystemState()
104 name =
'rqt_gui_py_node_%d' % os.getpid()
105 qDebug(
'RosPyPluginProvider._init_node() initialize ROS node "%s"' % name)
106 rospy.init_node(name, disable_signals=
True)