osrf / capabilities

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

Move event subscribing ahead of service advertising. Fix #82. #83

Closed patrickcjh closed 8 years ago

wjwwood commented 8 years ago

Can you explain how you think this addresses #82?

patrickcjh commented 8 years ago

After the capability provider is started by the launch manager, the launch manager will publish a CapabilityEvent message containing the provider name, process ID (PID) and event type.

If the capability server starts listening to the CapabilityEvent messages at an earlier time, it will not miss any of these CapabilityEvent messages, and therefore can register the PID and "launched" status of the provider.

wjwwood commented 8 years ago

Ok, I think you're right that this might improve the situation, but I believe there is still a race condition. I still think that the "correct" thing to do is to depend on, and then call a service which is the final answer on whether or not the capability server is ready.

The tests pass and the coverage is still 99%, so I'll go a head and merge this, but I'd still like to see the service as described in #82.