Package rospy :: Module service :: Class ServiceManager

Class ServiceManager

source code

object --+
         |
        ServiceManager

Keeps track of currently registered services in the ROS system

Instance Methods
 
__init__(self, registration_listeners=None)
ctor
source code
[(str, str)]
get_services(self)
Returns: List of (service_name, service_uri) for all registered services.
source code
 
unregister_all(self)
Unregister all registered services
source code
 
register(self, resolved_service_name, service)
Register service with ServiceManager and ROS master
source code
 
unregister(self, resolved_service_name, service)
Unregister service with ServiceManager and ROS Master
source code
_Service
get_service(self, resolved_service_name)
Returns: service implementation
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, registration_listeners=None)
(Constructor)

source code 

ctor

Parameters:
  • registration_listeners (RegistrationListeners) - override default registration listener.
Overrides: object.__init__

get_services(self)

source code 
Returns: [(str, str)]
List of (service_name, service_uri) for all registered services.

register(self, resolved_service_name, service)

source code 

Register service with ServiceManager and ROS master

Parameters:
  • resolved_service_name (str) - name of service (resolved)
  • service (_Service) - Service to register

unregister(self, resolved_service_name, service)

source code 

Unregister service with ServiceManager and ROS Master

Parameters:
  • resolved_service_name (str) - name of service
  • service (_Service) - service implementation

get_service(self, resolved_service_name)

source code 
Parameters:
  • resolved_service_name (str) - name of service
Returns: _Service
service implementation