rqt_py_common.rqt_ros_graph module

class rqt_py_common.rqt_ros_graph.RqtRosGraph

Bases: object

DELIM_GRN = '/'
static get_full_grn(model_index)

Create full path format of GRN.

@deprecated: Not completed.

Create full path format of GRN (Graph Resource Names, see http://www.ros.org/wiki/Names). Build GRN by recursively transcending parents & children of a given QModelIndex instance.

A complete example of GRN: /wide_stereo/left/image_color/compressed

Upon its very 1st call, the argument is the index where user clicks on on the view object (here QTreeView is used but should work with other View too. Not tested yet though). str_grn can be 0-length string.

Parameters:

str_grn (str) – This could be an incomplete or a complete GRN format.

Return type:

str

static get_lower_grn_dfs(model_index, grn_prev='')

Traverse all children treenodes and returns a list of “partial” GRNs.

Partial means that this method returns names under current level.

Ex. Consider a tree like this:

Root

|–TopitemA | |–1 | |–2 | |–3 | |–4 | |–5 | |–6 | |–7 |–TopitemB

Re-formatted in GRN (omitting root):

TopitemA/1/2/3/4 TopitemA/1/2/3/5/6 TopitemA/1/2/3/5/7 TopitemB

Might not be obvious from tree representation but there are 4 nodes as GRN form suggests.

(doc from here TBD)

Return type:

str[]

static get_upper_grn(model_index, str_grn)