osrf / capabilities

Implements the concept of capabilities as part of the robots-in-concert system.
Other
8 stars 26 forks source link

CapabilitiesClient's wait_for_service fails with namespaces #53

Closed bit-pirate closed 10 years ago

bit-pirate commented 10 years ago

Although all services are available wait_for_services times out and returns false.

wjwwood commented 10 years ago

I believe you need to inform the CapabilitiesClient of the namespace that you put the capability server in:

>>> from capabilities.client import CapabilitiesClient
>>> cl = CapabilitiesClient(capability_server_node_name='/some_ns/capability_server')
>>> cl.wait_for_services(1)
True
bit-pirate commented 10 years ago

For this quick test I embedded the capability server as well as the app manager (containing the CapabilitiesClient) in the launcher in <group ns="test"></group>. Since I'm initiating the CapabilitiesClient with a relative name, i.e. capability_server, I was expecting it to find the server, which is on the same namespace level, i.e. /test/app_manager and /test/capability_server.

Am I assuming something wrong here?

bit-pirate commented 10 years ago

Never mind.

After looking deeper into this I realised that this has to be handled by the node instantiating the CapabilitiesClient, i.e. that node needs to provide the fully resolved name. If that is the case, then everything works as expected.