Package node_manager_fkie :: Module master_view_proxy :: Class MasterViewProxy
[frames] | no frames]

Class MasterViewProxy

source code

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt5.QtCore.QObject --+    
                            |    
           object --+       |    
                    |       |    
    sip.simplewrapper --+   |    
                        |   |    
 PyQt5.QtGui.QPaintDevice --+    
                            |    
      PyQt5.QtWidgets.QWidget --+
                                |
                               MasterViewProxy

This class stores the informations about a ROS master and shows it on request.

Nested Classes

Inherited from PyQt5.QtWidgets.QWidget: RenderFlag, RenderFlags

Inherited from PyQt5.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods
 
updateHostRequest(...) source code
 
__init__(self, masteruri, parent=None)
Creates a new master.
source code
 
stop(self) source code
 
in_process(self) source code
 
force_next_update(self) source code
 
update_system_parameter(self) source code
 
markNodesAsDuplicateOf(self, running_nodes)
Marks all nodes, which are not running and in a given list as a duplicates nodes.
source code
[str]
getRunningNodesIfSync(self)
Returns the list with all running nodes, which are registered by this ROS master.
source code
dict(str:str)
getRunningNodesIfLocal(self, remove_system_nodes=False)
Returns the list with all running nodes, which are running (has process) on this host.
source code
 
updateRunningNodesInModel(self, master_info)
Creates the dictionary with ExtendedNodeInfo objects and updates the nodes view.
source code
[]
getNode(self, node_name)
Returns: The list the nodes with given name.
source code
 
updateButtons(self, selected_nodes=None)
Updates the enable state of the buttons depending of the selection and running state of the selected node.
source code
boolean
hasLaunchfile(self, path)
Returns: True if the given launch file is open
source code
 
reload_global_parameter_at_next_start(self, launchfile) source code
 
question_reload_changed_file(self, changed, affected) source code
 
question_transfer_changed_file(self, changed, affected) source code
 
update_robot_icon(self, force=False)
Update the current robot icon.
source code
 
appendConfigToModel(self, launchfile, rosconfig)
Update the node view
source code
 
removeConfigFromModel(self, launchfile)
Update the node view after removed configuration.
source code
 
updateDefaultConfigs(self, master_info)
Updates the default configuration view based on the current master information.
source code
 
on_default_cfg_nodes_retrieved(self, service_uri, config_name, nodes)
Handles the new list with nodes from default configuration service.
source code
 
on_default_cfg_descr_retrieved(self, service_uri, config_name, items)
Handles the description list from default configuration service.
source code
 
on_default_cfg_err(self, service_uri, service, msg)
Handles the error messages from default configuration service.
source code
 
has_launch_server(self)
Returns `True` if the there are roslaunch server, which have no `master` as node or or have other nodes as `rosout-#` inside.
source code
 
on_launch_server_retrieved(self, serveruri, pid, nodes)
Handles the info about roslaunch server.
source code
 
on_launch_server_err(self, serveruri, msg)
Handles the error messages from launch server hanlder.
source code
 
on_remove_all_launch_server(self)
Kill all running launch server.
source code
 
on_node_activated(self, index)
Depending of the state of the node, it will be run or the screen output will be open.
source code
 
on_node_clicked(self, index) source code
 
on_topic_activated(self, index) source code
 
on_topic_clicked(self, index) source code
 
on_service_activated(self, index) source code
 
on_service_clicked(self, index) source code
 
on_host_inserted(self, item) source code
 
on_node_collapsed(self, index) source code
 
on_node_expanded(self, index) source code
 
on_tab_current_changed(self, index) source code
 
on_node_selection_changed(self, selected, deselected, force_emit=False, node_name='')
updates the Buttons, create a description and emit description_signal to show the description of host, group or node.
source code
 
get_node_description(self, node_name, node=None) source code
 
on_topic_selection_changed(self, selected, deselected, force_emit=False, topic_name='')
updates the Buttons, create a description and emit description_signal to show the description of selected topic
source code
 
get_topic_description(self, topic_name, topic=None) source code
 
on_service_selection_changed(self, selected, deselected, force_emit=False, service_name='')
updates the Buttons, create a description and emit description_signal to show the description of selected service
source code
 
on_parameter_selection_changed(self, selected, deselected) source code
 
hostsFromIndexes(self, indexes, recursive=True) source code
 
groupsFromIndexes(self, indexes, recursive=True) source code
 
nodesFromIndexes(self, indexes, recursive=True) source code
 
topicsFromIndexes(self, indexes) source code
 
servicesFromIndexes(self, indexes) source code
 
parameterFromIndexes(self, indexes) source code
 
on_start_clicked(self)
Starts the selected nodes.
source code
 
on_start_alt_clicked(self)
Starts the selected nodes with additional options.
source code
 
start_node(self, node, force, config, force_host=None, logging=None) source code
 
start_nodes(self, nodes, force=False, force_host=None, use_adv_cfg=False, check_nodelets=True)
Internal method to start a list with nodes
source code
 
start_nodes_by_name(self, nodes, cfg, force=False, check_nodelets=True)
Start nodes given in a list by their names.
source code
 
start_nodes_after_load_cfg(self, cfg_name, nodes, force=False)
Start nodes after the given configuration is loaded and applied to the model.
source code
 
start_nodes_after_load_cfg_clear(self)
Clears the list with nodes which should be startet after a launch file is loaded.
source code
 
on_force_start_nodes(self, reset_global_param=False)
Starts the selected nodes (also if it already running).
source code
 
on_start_nodes_at_host(self)
Starts the selected nodes on an another host.
source code
 
on_stop_clicked(self)
Stops the selected and running nodes.
source code
 
stop_node(self, node, force=False) source code
 
stop_nodes(self, nodes, force=False)
Internal method to stop a list with nodes
source code
 
stop_nodes_by_name(self, nodes, force=False, ignore=[])
Stop nodes given in a list by their names.
source code
 
kill_node(self, node, force=False) source code
 
killall_roscore(self) source code
 
on_kill_nodes(self) source code
 
unregister_node(self, node, force=False) source code
 
on_unregister_nodes(self) source code
 
on_stop_context_toggled(self, state) source code
 
getHostFromNode(self, node)
If the node is running the host the node URI will be returned.
source code
 
on_io_clicked(self)
Shows IO of the selected nodes.
source code
 
on_kill_screens(self)
Kills selected screens, if some available.
source code
 
on_show_all_screens(self)
Shows all available screens.
source code
 
on_log_clicked(self)
Shows log files of the selected nodes.
source code
 
on_log_path_copy(self) source code
 
on_log_delete_clicked(self)
Deletes log files of the selected nodes.
source code
 
on_dynamic_config_clicked(self)
Opens the dynamic configuration dialogs for selected nodes.
source code
 
on_edit_config_clicked(self) source code
 
on_edit_rosparam_clicked(self) source code
 
on_save_clicked(self) source code
 
on_close_clicked(self)
Opens a dialog to select configurations to close or stop all nodes (with roscore) or shutdown the host.
source code
 
poweroff(self) source code
 
on_topic_echo_clicked(self, topics=[])
Shows the output of the topic in a terminal.
source code
 
on_topic_hz_clicked(self)
Shows the hz of the topic in a terminal.
source code
 
on_topic_hz_ssh_clicked(self)
Shows the hz of the topic using ssh.
source code
 
on_topic_pub_clicked(self) source code
 
start_publisher(self, topic_name, republish=False)
Starts a publisher to given topic.
source code
 
on_topic_pub_stop_clicked(self, topic_name='') source code
 
show_topic_output(self, topic_name, show_hz_only, use_ssh=False)
Shows the topic output in a new window.
source code
 
on_service_call_clicked(self, services=[])
calls a service.
source code
 
service_call(self, service_name) source code
 
on_node_filter_changed(self, text)
Filter the displayed nodes
source code
 
on_topic_filter_changed(self, text)
Filter the displayed topics
source code
 
on_service_filter_changed(self, text)
Filter the displayed services
source code
 
on_parameter_filter_changed(self, text)
Filter the displayed parameter
source code
 
on_get_parameter_clicked(self)
Requests parameter list from the ROS parameter server.
source code
 
on_add_parameter_clicked(self)
Adds a parameter to the ROS parameter server.
source code
 
on_delete_parameter_clicked(self)
Deletes the parameter from the ROS parameter server.
source code
 
on_save_parameter_clicked(self)
Stores selected parameter to a file.
source code
 
append_diagnostic(self, diagnostic_status) source code
 
select_host_block(self, index)
Selects all nodes of a host with given index
source code
 
on_shortcut1_activated(self) source code
 
on_shortcut2_activated(self) source code
 
on_shortcut3_activated(self) source code
 
on_shortcut4_activated(self) source code
 
on_shortcut5_activated(self) source code
 
on_shortcut_collapse_all(self) source code
 
on_copy_c_pressed(self) source code
 
on_copy_x_pressed(self) source code

Inherited from PyQt5.QtWidgets.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, event, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, height, heightForWidth, hide, hideEvent, initPainter, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyPressEvent, keyReleaseEvent, keyboardGrabber, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, winId, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconChanged, windowIconText, windowIconTextChanged, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowTitleChanged, windowType, x, y

Inherited from PyQt5.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr

Inherited from PyQt5.QtGui.QPaintDevice: colorCount, depth, devicePixelRatio, heightMM, logicalDpiX, logicalDpiY, paintingActive, physicalDpiX, physicalDpiY, widthMM

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  DIAGNOSTIC_LEVELS = {0: 'OK', 1: 'WARN', 2: 'ERROR', 3: 'STALE...

Inherited from PyQt5.QtWidgets.QWidget: DrawChildren, DrawWindowBackground, IgnoreMask

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Inherited from PyQt5.QtGui.QPaintDevice: PdmDepth, PdmDevicePixelRatio, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

Instance Variables
 
host_description_updated(...)
the signal is emitted on description changes and contains the ROS Master URI, host address and description a parameter.
source code
 
capabilities_update_signal(...)
the signal is emitted if a description with capabilities is received and has the ROS master URI, host address, the name of the default_cfg node and a list with descriptions (multimaster_msgs_fkie.srv.ListDescription Response) as parameter.
source code
 
remove_config_signal(...)
the signal is emitted if a default_cfg was removed
source code
 
description_signal(...)
the signal is emitted to show a description (title, description)
source code
 
request_xml_editor(...)
the signal to open a xml editor dialog (list with files, search text)
source code
 
stop_nodes_signal(...)
the signal is emitted to stop on masteruri the nodes described in the list.
source code
 
robot_icon_updated(...)
the signal is emitted, if the robot icon was changed by a configuration (masteruri, path)
source code
 
loaded_config(...)
the signal is emitted, after a launchfile is successful loaded (launchfile, LaunchConfig)
source code
 
save_profile_signal(...)
the signal is emitted, to save profile.
source code
Properties
  current_user
  is_local
  online
The online meens that master is discovered and master_info was received.
  master_state
  master_info
  use_sim_time
[str(ROS node name)] default_cfgs
Returns the copy of the dictionary with default configurations on this host
dict(str(file) : LaunchConfig, ...) launchfiles
Returns the copy of the dictionary with loaded launch files on this host
  launch_servers

Inherited from object: __class__

Method Details

__init__(self, masteruri, parent=None)
(Constructor)

source code 

Creates a new master.

Parameters:
  • masteruri (str) - the URI of the ROS master
Overrides: object.__init__

markNodesAsDuplicateOf(self, running_nodes)

source code 

Marks all nodes, which are not running and in a given list as a duplicates nodes.

Parameters:
  • running_nodes ([str]) - The list with names of running nodes

getRunningNodesIfSync(self)

source code 

Returns the list with all running nodes, which are registered by this ROS master. Also the nodes, which are physically running on remote hosts.

Returns: [str]
The list with names of running nodes

getRunningNodesIfLocal(self, remove_system_nodes=False)

source code 

Returns the list with all running nodes, which are running (has process) on this host. The nodes registered on this ROS master, but running on remote hosts are not returned.

Returns: dict(str:str)
The dictionary with names of running nodes and their masteruri

updateRunningNodesInModel(self, master_info)

source code 

Creates the dictionary with ExtendedNodeInfo objects and updates the nodes view.

Parameters:

getNode(self, node_name)

source code 
Parameters:
  • node_name (str) - The name of the node.
Returns: []
The list the nodes with given name.

hasLaunchfile(self, path)

source code 
Parameters:
  • path (str) - the launch file
Returns: boolean
True if the given launch file is open

update_robot_icon(self, force=False)

source code 

Update the current robot icon. If the icon was changed a `robot_icon_updated` signal will be emitted. :return: the path to the current robot icon :rtype: str

appendConfigToModel(self, launchfile, rosconfig)

source code 

Update the node view

Parameters:
  • launchfile (str) - the launch file path
  • rosconfig (LaunchConfig) - the configuration

removeConfigFromModel(self, launchfile)

source code 

Update the node view after removed configuration.

Parameters:
  • launchfile (str) - the launch file path

updateDefaultConfigs(self, master_info)

source code 

Updates the default configuration view based on the current master information.

Parameters:

on_default_cfg_nodes_retrieved(self, service_uri, config_name, nodes)

source code 

Handles the new list with nodes from default configuration service.

Parameters:
  • service_uri (str) - the URI of the service provided the default configuration
  • config_name (str) - the name of default configuration service
  • nodes ([str]) - the name of the nodes with name spaces

on_default_cfg_descr_retrieved(self, service_uri, config_name, items)

source code 

Handles the description list from default configuration service. Emits a Qt signal host_description_updated to notify about a new host description and a Qt signal capabilities_update_signal to notify about a capabilities update.

Parameters:
  • service_uri (str) - the URI of the service provided the default configuration
  • config_name (str) - the name of default configuration service
  • items ([multimaster_msgs_fkie.srv.ListDescription Response]) - list with descriptions

on_default_cfg_err(self, service_uri, service, msg)

source code 

Handles the error messages from default configuration service.

Parameters:
  • service_uri (str) - the URI of the service provided the default configuration
  • service (str) - the name of default configuration service
  • msg (str) - the error message

on_launch_server_retrieved(self, serveruri, pid, nodes)

source code 

Handles the info about roslaunch server. Emits a Qt signal host_description_updated to notify about a new host description and a Qt signal capabilities_update_signal to notify about a capabilities update.

Parameters:
  • serveruri (str) - the URI of the roslaunch server
  • pid (str) - the process id of the roslaunch server
  • nodes ([str]) - list with nodes handled by the roslaunch server

on_launch_server_err(self, serveruri, msg)

source code 

Handles the error messages from launch server hanlder.

Parameters:
  • serveruri (str) - the URI of the launch server
  • msg (str) - the error message

on_remove_all_launch_server(self)

source code 

Kill all running launch server. The coresponding URIS are removed by master_monitor.

on_node_activated(self, index)

source code 

Depending of the state of the node, it will be run or the screen output will be open.

Parameters:

on_topic_activated(self, index)

source code 
Parameters:

on_service_activated(self, index)

source code 
Parameters:

on_start_clicked(self)

source code 

Starts the selected nodes. If for a node more then one configuration is available, the selection dialog will be show.

start_nodes(self, nodes, force=False, force_host=None, use_adv_cfg=False, check_nodelets=True)

source code 

Internal method to start a list with nodes

Parameters:
  • nodes ([NodeItem, ...]) - the list with nodes to start
  • force (bool) - force the start of the node, also if it is already started.
  • force_host (str) - force the start of the node at specified host.

start_nodes_by_name(self, nodes, cfg, force=False, check_nodelets=True)

source code 

Start nodes given in a list by their names.

Parameters:
  • nodes ([str]) - a list with full node names

start_nodes_after_load_cfg(self, cfg_name, nodes, force=False)

source code 

Start nodes after the given configuration is loaded and applied to the model. :param cfg_name: the name of the cnofiguration :type cfg_name: str :param nodes: the list of node names :type nodes: list of strings

on_force_start_nodes(self, reset_global_param=False)

source code 

Starts the selected nodes (also if it already running). If for a node more then one configuration is available, the selection dialog will be show.

on_stop_clicked(self)

source code 

Stops the selected and running nodes. If the node can't be stopped using his RPC interface, it will be unregistered from the ROS master using the masters RPC interface.

stop_nodes(self, nodes, force=False)

source code 

Internal method to stop a list with nodes

Parameters:

stop_nodes_by_name(self, nodes, force=False, ignore=[])

source code 

Stop nodes given in a list by their names.

Parameters:
  • nodes ([str]) - a list with full node names

getHostFromNode(self, node)

source code 

If the node is running the host the node URI will be returned. Otherwise tries to get the host from the launch configuration. If the configuration contains no machine assignment for this node the host of the ROS master URI will be used.

Parameters:

select_host_block(self, index)

source code 

Selects all nodes of a host with given index

Parameters:
  • index (int) - the index of the host in the tree model

Class Variable Details

DIAGNOSTIC_LEVELS

Value:
{0: 'OK',
 1: 'WARN',
 2: 'ERROR',
 3: 'STALE',
 4: 'UNKNOWN',
 5: 'UNKNOWN'}

Instance Variable Details

save_profile_signal(...)

source code 
the signal is emitted, to save profile. (masteruri) If masteruri is empty, save all masters else only for this master.

Property Details

current_user

Get Method:
unreachable.current_user(self)
Set Method:
unreachable.current_user(self, user)

is_local

Get Method:
unreachable.is_local(self)

online

The online meens that master is discovered and master_info was received.

Get Method:
unreachable.online(self) - The online meens that master is discovered and master_info was received.
Set Method:
unreachable.online(self, state)

master_state

Get Method:
unreachable.master_state(self)
Set Method:
unreachable.master_state(self, master_state)

master_info

Get Method:
unreachable.master_info(self)
Set Method:
unreachable.master_info(self, master_info) - Sets the new master information.

use_sim_time

Get Method:
unreachable.use_sim_time(self)

default_cfgs

Returns the copy of the dictionary with default configurations on this host

Get Method:
unreachable.default_cfgs(self) - Returns the copy of the dictionary with default configurations on this host
Type:
[str(ROS node name)]

launchfiles

Returns the copy of the dictionary with loaded launch files on this host

Get Method:
unreachable.launchfiles(self) - Returns the copy of the dictionary with loaded launch files on this host
Set Method:
unreachable.launchfiles(self, launchfile) - Loads the launch file.
Type:
dict(str(file) : LaunchConfig, ...)

launch_servers

Get Method:
unreachable.launch_servers(self)