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.
Builds a capabilities.discovery.SpecIndex by calling a ROS service to get the specs
Works 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 tuple of capabilities.discovery.SpecIndex and a list of errors encountered, based on contents of ~get_capability_specs |
Return type: | capabilities.discovery.SpecIndex, list (Exception‘s) |
Raises : | rospy.ServiceException when the service call fails |