osrf / capabilities

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

Default provider is ignore #44

Closed jonbinney closed 10 years ago

jonbinney commented 10 years ago

It's possible I'm misunderstanding how default providers work, but it appears that if there are multiple providers for an interface, and a default is defined, it isn't necessarily used. Instead, start_capability() just uses the first provider in the list:

https://github.com/osrf/capabilities/blob/master/src/capabilities/server.py#L620

wjwwood commented 10 years ago

I think you are correct, the default provider is respected when a capability starts another capability which it depends on, but not when the user passes any empty string as the preferred provider for the start_capability service call.

I'll fix this.

wjwwood commented 10 years ago

I now have a test to reproduce this, fix coming soon.

wjwwood commented 10 years ago

Ok, fix pushed, I'll wait for CI to catch up and then merge.

@jonbinney for review

jonbinney commented 10 years ago

testing it now on my setup

jonbinney commented 10 years ago

Works for me, and i don't see any problems with the code. Thanks william!

wjwwood commented 10 years ago

I fixed the typo and cleaned up the code to have 100% coverage again. Waiting to merge until CI and coveralls catches up.

jonbinney commented 10 years ago

But the typo was awesome :-(

jonbinney commented 10 years ago

See - even travis fails without the typo...

wjwwood commented 10 years ago

:stuck_out_tongue_winking_eye: