class documentation

Create a handle to a ROS service for invoking calls.

Usage::
add_two_ints = ServiceProxy('add_two_ints', AddTwoInts) resp = add_two_ints(1, 2)
Method __call__ Callable-style version of the service API. This accepts either a request message instance, or you can call directly with arguments to create a new request instance. e.g.:
Method __init__ ctor. @param name: name of service to call @type name: str @param service_class: auto-generated service class @type service_class: Service class @param persistent: (optional) if True, proxy maintains a persistent connection to service...
Method call Call the service. This accepts either a request message instance, or you can call directly with arguments to create a new request instance. e.g.:
Method close Close this ServiceProxy. This only has an effect on persistent ServiceProxy instances.
Method wait_for_service Undocumented
Instance Variable buff_size Undocumented
Instance Variable persistent Undocumented
Instance Variable protocol Undocumented
Instance Variable seq Undocumented
Instance Variable transport Undocumented
Instance Variable uri Undocumented
Method _get_service_uri private routine for getting URI of service to call @param request: request message @type request: L{rospy.Message}
def __call__(self, *args, **kwds):

Callable-style version of the service API. This accepts either a request message instance, or you can call directly with arguments to create a new request instance. e.g.:

add_two_ints(AddTwoIntsRequest(1, 2))
add_two_ints(1, 2)
add_two_ints(a=1, b=2)

@param args: arguments to remote service @param kwds: message keyword arguments @raise ROSSerializationException: If unable to serialize message. This is usually a type error with one of the fields.

def __init__(self, name, service_class, persistent=False, headers=None):

ctor. @param name: name of service to call @type name: str @param service_class: auto-generated service class @type service_class: Service class @param persistent: (optional) if True, proxy maintains a persistent connection to service. While this results in better call performance, persistent connections are discouraged as they are less resistant to network issues and service restarts. @type persistent: bool @param headers: (optional) arbitrary headers @type headers: dict

def call(self, *args, **kwds):

Call the service. This accepts either a request message instance, or you can call directly with arguments to create a new request instance. e.g.:

add_two_ints(AddTwoIntsRequest(1, 2))
add_two_ints(1, 2)
add_two_ints(a=1, b=2)

@raise TypeError: if request is not of the valid type (Message) @raise ServiceException: if communication with remote service fails @raise ROSInterruptException: if node shutdown (e.g. ctrl-C) interrupts service call @raise ROSSerializationException: If unable to serialize message. This is usually a type error with one of the fields.

def close(self):

Close this ServiceProxy. This only has an effect on persistent ServiceProxy instances.

def wait_for_service(self, timeout=None):

Undocumented

buff_size =

Undocumented

persistent =

Undocumented

protocol =

Undocumented

seq: int =

Undocumented

transport =

Undocumented

uri =

Undocumented

def _get_service_uri(self, request):

private routine for getting URI of service to call @param request: request message @type request: L{rospy.Message}