Master. More...
Public Member Functions | |
def | __init__ |
def | findGatewayNamespace |
Master utility methods for scripts. | |
def | generate_connection_details |
Master utility methods. | |
def | get_ros_ip |
def | getActionClients |
def | getActionServers |
def | getConnectionsFromActionList |
def | getConnectionsFromPubSubList |
def | getConnectionsFromServiceList |
def | getConnectionState |
def | register |
Registration. | |
def | unregister |
Private Member Functions | |
def | _get_anonymous_node_name |
def | _getActions |
def | _isTopicNodeInList |
def | _register_subscriber |
def | _unregister_subscriber |
Master.
Representing a ros master (local ros master). Just contains a few utility methods for retrieving master related information as well as handles for registering and unregistering rules that have been pulled or flipped in from another gateway.
Definition at line 35 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.__init__ | ( | self | ) |
Definition at line 43 of file master_api.py.
def rocon_gateway.master_api.LocalMaster._get_anonymous_node_name | ( | self, | |
topic | |||
) | [private] |
Definition at line 389 of file master_api.py.
def rocon_gateway.master_api.LocalMaster._getActions | ( | self, | |
pubs, | |||
subs | |||
) | [private] |
Return actions and pruned publisher, subscriber lists. @param publishers @type list of publishers in the form returned by rosgraph.Master.getSystemState @param subscribers @type list of subscribers in the form returned by rosgraph.Master.getSystemState @return list of actions, pruned_publishers, pruned_subscribers @rtype [base_topic, [nodes]], as param type, as param type
Definition at line 253 of file master_api.py.
def rocon_gateway.master_api.LocalMaster._isTopicNodeInList | ( | self, | |
topic, | |||
node, | |||
list | |||
) | [private] |
Definition at line 244 of file master_api.py.
def rocon_gateway.master_api.LocalMaster._register_subscriber | ( | self, | |
node_master, | |||
name, | |||
type_info, | |||
xmlrpc_uri | |||
) | [private] |
This one is not necessary, since you can pretty much guarantee the existence of the subscriber here, but it pays to be safe - we've seen some errors come out here when the ROS_MASTER_URI was only set to localhost. @param node_master : node-master xmlrpc method handler @param type_info : type of the subscriber message @param xmlrpc_uri : the uri of the node (xmlrpc server) @type string @param name : fully resolved subscriber name
Definition at line 125 of file master_api.py.
def rocon_gateway.master_api.LocalMaster._unregister_subscriber | ( | self, | |
node_master, | |||
xmlrpc_uri, | |||
name | |||
) | [private] |
It is a special case as it requires xmlrpc handling to inform the subscriber of the disappearance of publishers it was connected to. It also needs to handle the case when that information doesn't get to the subscriber because it is down. @param node_master : node-master xmlrpc method handler @param xmlrpc_uri : the uri of the node (xmlrpc server) @type string @param name : fully resolved subscriber name
Definition at line 152 of file master_api.py.
Master utility methods for scripts.
Assists a script to find the (hopefully) unique gateway namespace. Note that unique is a necessary condition, there should only be one gateway per ros system. @return Namespace of the gateway node. @rtype string
Definition at line 398 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.generate_connection_details | ( | self, | |
type, | |||
name, | |||
node | |||
) |
Master utility methods.
Creates all the extra details to create a connection object from a rule. @param type : the connection type (one of gateway_msgs.msg.ConnectionType) @type string @param name : the name of the connection @type string @param node : the master node name it comes from @param string @return the utils.Connection object complete with type_info and xmlrpc_uri @type utils.Connection
Definition at line 179 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.get_ros_ip | ( | self | ) |
Definition at line 226 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.getActionClients | ( | self, | |
publishers, | |||
subscribers | |||
) |
Return action clients and pruned publisher, subscriber lists. @param publishers @type list of publishers in the form returned by rosgraph.Master.getSystemState @param subscribers @type list of subscribers in the form returned by rosgraph.Master.getSystemState @return list of actions, pruned_publishers, pruned_subscribers @rtype [base_topic, [nodes]], as param type, as param type
Definition at line 312 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.getActionServers | ( | self, | |
publishers, | |||
subscribers | |||
) |
Return action servers and pruned publisher, subscriber lists. @param publishers @type list of publishers in the form returned by rosgraph.Master.getSystemState @param subscribers @type list of subscribers in the form returned by rosgraph.Master.getSystemState @return list of actions, pruned_publishers, pruned_subscribers @rtype [base_topic, [nodes]], as param type, as param type
Definition at line 298 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.getConnectionsFromActionList | ( | self, | |
list, | |||
type | |||
) |
Definition at line 343 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.getConnectionsFromPubSubList | ( | self, | |
list, | |||
type | |||
) |
Definition at line 326 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.getConnectionsFromServiceList | ( | self, | |
list, | |||
type | |||
) |
Definition at line 361 of file master_api.py.
Definition at line 377 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.register | ( | self, | |
registration | |||
) |
Registration.
Registers a rule with the local master. @param registration : registration details @type utils.Registration @return the updated registration object (only adds an anonymously generated local node name) @rtype utils.Registration
Definition at line 50 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.unregister | ( | self, | |
registration | |||
) |
Unregisters a rule with the local master. @param registration : registration details for an existing gateway registered rule @type utils.Registration
Definition at line 97 of file master_api.py.