src/tools/benchmark_tool/benchmark_tool/rqt_graph/dotcode.py
def _group_tf_nodes(self, nodes_in, edges_in, node_connections):
        """
        Take topic nodes, edges and node connections.

        Returns topic nodes where tf topics have been removed,
        edges where the edges to tf topics have been removed, and
        a map with all the connections to the resulting tf group node
        """
        removal_nodes = []
        tf_topic_edges_in = []
        tf_topic_edges_out = []
        # do not manipulate incoming structures
        nodes = copy.copy(nodes_in)
        edges = copy.copy(edges_in)
        for n in nodes:
            if unicode(n).strip() in ['/tf', '/tf_static'] and n in node_connections:
                tf_topic_edges_in.extend(
                    [x for x in node_connections[n].incoming if x in edges and x.end in nodes])
                tf_topic_edges_out.extend(
                    [x for x in node_connections[n].outgoing if x in edges and x.start in nodes])
                removal_nodes.append(n)

                for e in tf_topic_edges_out:
                    if e in edges:
                        edges.remove(e)
                for e in tf_topic_edges_in:
                    if e in edges:
                        edges.remove(e)
        for n in removal_nodes:
            if n in nodes:
                nodes.remove(n)
        if not tf_topic_edges_in and not tf_topic_edges_out:
            return nodes, edges, None

        return nodes, edges, {'outgoing': tf_topic_edges_out, 'incoming': tf_topic_edges_in}

        Take topic nodes, edges and node connections.

        Returns topic nodes where tf topics have been removed,
        edges where the edges to tf topics have been removed, and
        a map with all the connections to the resulting tf group node
        
Take topic nodes, edges and node connections.
Returns topic nodes where tf topics have been removed,
edges where the edges to tf topics have been removed, and
a map with all the connections to the resulting tf group node
Take topic nodes edges and node connections . Returns topic nodes where tf topics have been removed edges where the edges to tf topics have been removed and a map with all the connections to the resulting tf group node
def _group_tf_nodes(self, nodes_in, edges_in, node_connections):
        removal_nodes = []
        tf_topic_edges_in = []
        tf_topic_edges_out = []
        nodes = copy.copy(nodes_in)
        edges = copy.copy(edges_in)
        for n in nodes:
            if unicode(n).strip() in ['/tf', '/tf_static'] and n in node_connections:
                tf_topic_edges_in.extend(
                    [x for x in node_connections[n].incoming if x in edges and x.end in nodes])
                tf_topic_edges_out.extend(
                    [x for x in node_connections[n].outgoing if x in edges and x.start in nodes])
                removal_nodes.append(n)
                for e in tf_topic_edges_out:
                    if e in edges:
                        edges.remove(e)
                for e in tf_topic_edges_in:
                    if e in edges:
                        edges.remove(e)
        for n in removal_nodes:
            if n in nodes:
                nodes.remove(n)
        if not tf_topic_edges_in and not tf_topic_edges_out:
            return nodes, edges, None
        return nodes, edges, {'outgoing': tf_topic_edges_out, 'incoming': tf_topic_edges_in}
def _group_tf_nodes ( self , nodes_in , edges_in , node_connections ) : removal_nodes = [ ] tf_topic_edges_in = [ ] tf_topic_edges_out = [ ] nodes = copy . copy ( nodes_in ) edges = copy . copy ( edges_in ) for n in nodes : if unicode ( n ) . strip ( ) in [ '/tf' , '/tf_static' ] and n in node_connections : tf_topic_edges_in . extend ( [ x for x in node_connections [ n ] . incoming if x in edges and x . end in nodes ] ) tf_topic_edges_out . extend ( [ x for x in node_connections [ n ] . outgoing if x in edges and x . start in nodes ] ) removal_nodes . append ( n ) for e in tf_topic_edges_out : if e in edges : edges . remove ( e ) for e in tf_topic_edges_in : if e in edges : edges . remove ( e ) for n in removal_nodes : if n in nodes : nodes . remove ( n ) if not tf_topic_edges_in and not tf_topic_edges_out : return nodes , edges , None return nodes , edges , { 'outgoing' : tf_topic_edges_out , 'incoming' : tf_topic_edges_in }
Take topic nodes, edges and node connections.
Take topic nodes edges and node connections .
"""
        Take topic nodes, edges and node connections.

        Returns topic nodes where tf topics have been removed,
        edges where the edges to tf topics have been removed, and
        a map with all the connections to the resulting tf group node
        """ # do not manipulate incoming structures
self
nodes_in
edges_in
node_connections