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

        Returns topic nodes where action topics have been removed,
        edges where the edges to action topics have been removed, and
        a map with the connection to each virtual action topic node
        """
        removal_nodes = []
        action_nodes = {}
        # do not manipulate incoming structures
        nodes = copy.copy(nodes_in)
        edges = copy.copy(edges_in)
        for n in nodes:
            if unicode(n).endswith('/feedback'):
                prefix = unicode(n)[:-len('/feedback')].strip()
                action_topic_nodes = []
                action_topic_edges_out = list()
                action_topic_edges_in = list()
                for suffix in ['/status', '/result', '/goal', '/cancel', '/feedback']:
                    for n2 in nodes:
                        if unicode(n2).strip() == prefix + suffix:
                            action_topic_nodes.append(n2)
                            if n2 in node_connections:
                                action_topic_edges_out.extend(node_connections[n2].outgoing)
                                action_topic_edges_in.extend(node_connections[n2].incoming)
                if len(action_topic_nodes) == 5:
                    # found action
                    removal_nodes.extend(action_topic_nodes)
                    for e in action_topic_edges_out:
                        if e in edges:
                            edges.remove(e)
                    for e in action_topic_edges_in:
                        if e in edges:
                            edges.remove(e)
                    action_nodes[prefix] = {'topics': action_topic_nodes,
                                            'outgoing': action_topic_edges_out,
                                            'incoming': action_topic_edges_in}
        for n in removal_nodes:
            nodes.remove(n)
        return nodes, edges, action_nodes

        Take topic nodes, edges and node connections.

        Returns topic nodes where action topics have been removed,
        edges where the edges to action topics have been removed, and
        a map with the connection to each virtual action topic node
        
Take topic nodes, edges and node connections.
Returns topic nodes where action topics have been removed,
edges where the edges to action topics have been removed, and
a map with the connection to each virtual action topic node
Take topic nodes edges and node connections . Returns topic nodes where action topics have been removed edges where the edges to action topics have been removed and a map with the connection to each virtual action topic node
def _accumulate_action_topics(self, nodes_in, edges_in, node_connections):
        removal_nodes = []
        action_nodes = {}
        nodes = copy.copy(nodes_in)
        edges = copy.copy(edges_in)
        for n in nodes:
            if unicode(n).endswith('/feedback'):
                prefix = unicode(n)[:-len('/feedback')].strip()
                action_topic_nodes = []
                action_topic_edges_out = list()
                action_topic_edges_in = list()
                for suffix in ['/status', '/result', '/goal', '/cancel', '/feedback']:
                    for n2 in nodes:
                        if unicode(n2).strip() == prefix + suffix:
                            action_topic_nodes.append(n2)
                            if n2 in node_connections:
                                action_topic_edges_out.extend(node_connections[n2].outgoing)
                                action_topic_edges_in.extend(node_connections[n2].incoming)
                if len(action_topic_nodes) == 5:
                    removal_nodes.extend(action_topic_nodes)
                    for e in action_topic_edges_out:
                        if e in edges:
                            edges.remove(e)
                    for e in action_topic_edges_in:
                        if e in edges:
                            edges.remove(e)
                    action_nodes[prefix] = {'topics': action_topic_nodes,
                                            'outgoing': action_topic_edges_out,
                                            'incoming': action_topic_edges_in}
        for n in removal_nodes:
            nodes.remove(n)
        return nodes, edges, action_nodes
def _accumulate_action_topics ( self , nodes_in , edges_in , node_connections ) : removal_nodes = [ ] action_nodes = { } nodes = copy . copy ( nodes_in ) edges = copy . copy ( edges_in ) for n in nodes : if unicode ( n ) . endswith ( '/feedback' ) : prefix = unicode ( n ) [ : - len ( '/feedback' ) ] . strip ( ) action_topic_nodes = [ ] action_topic_edges_out = list ( ) action_topic_edges_in = list ( ) for suffix in [ '/status' , '/result' , '/goal' , '/cancel' , '/feedback' ] : for n2 in nodes : if unicode ( n2 ) . strip ( ) == prefix + suffix : action_topic_nodes . append ( n2 ) if n2 in node_connections : action_topic_edges_out . extend ( node_connections [ n2 ] . outgoing ) action_topic_edges_in . extend ( node_connections [ n2 ] . incoming ) if len ( action_topic_nodes ) == 5 : removal_nodes . extend ( action_topic_nodes ) for e in action_topic_edges_out : if e in edges : edges . remove ( e ) for e in action_topic_edges_in : if e in edges : edges . remove ( e ) action_nodes [ prefix ] = { 'topics' : action_topic_nodes , 'outgoing' : action_topic_edges_out , 'incoming' : action_topic_edges_in } for n in removal_nodes : nodes . remove ( n ) return nodes , edges , action_nodes
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 action topics have been removed,
        edges where the edges to action topics have been removed, and
        a map with the connection to each virtual action topic node
        """ # do not manipulate incoming structures # found action
self
nodes_in
edges_in
node_connections