The Service Discovery Module¶
This module provides a way to create a spec_index remotely via a ROS service call.
Typical usage:
>>> from capabilities.service_discovery import spec_index_from_service
>>> si, errors = spec_index_from_service(capability_server_node_name='/capability_server', timeout=3.0)
>>> assert not errors, errors
This results in a capabilities.discovery.SpecIndex class,
created using the capability specs (interfaces, semantic interfaces,
and providers) availble to the remote capability_server.
-
capabilities.service_discovery.spec_index_from_service(capability_server_node_name='capability_server', timeout=None)[source]¶ Builds a
capabilities.discovery.SpecIndexby calling a ROS service to get the specsWorks just like
capabilities.discovery.spec_index_from_spec_file_index(), except the raw spec files are retreived over a service call rather than from disk.Parameters: Returns: A
tupleofcapabilities.discovery.SpecIndexand alistof errors encountered, based on contents of~get_capability_specsReturn type: Raises: rospy.ServiceExceptionwhen the service call fails