def __init__(self, context, icon_paths=[]): self._graveyard = [] ok_icon = ['bg-green.svg', 'ic-diagnostics.svg'] warn_icon = ['bg-yellow.svg', 'ic-diagnostics.svg', 'ol-warn-badge.svg'] err_icon = ['bg-red.svg', 'ic-diagnostics.svg', 'ol-err-badge.svg'] stale_icon = ['bg-grey.svg', 'ic-diagnostics.svg', 'ol-stale-badge.svg'] icons = [ok_icon, warn_icon, err_icon, stale_icon] super(MonitorDashWidget, self).__init__('MonitorWidget', icons, icon_paths=icon_paths) self.setFixedSize(self._icons[0].actualSize(QSize(50, 30))) self._monitor = None self._close_mutex = QMutex() self._show_mutex = QMutex() self._last_update = rospy.Time.now() self.context = context self.clicked.connect(self._show_monitor) self._monitor_shown = False self.setToolTip('Diagnostics') self._diagnostics_toplevel_state_sub = rospy.Subscriber('diagnostics_toplevel_state', DiagnosticStatus, self.toplevel_state_callback) self._top_level_state = -1 self._stall_timer = QTimer() self._stall_timer.timeout.connect(self._stalled) self._stalled() self._plugin_settings = None self._instance_settings = None