Skip to content

pluginlib usage for registering plugins #1040

Description

@emersonknapp

Is your feature request related to a problem? Please describe.

Right now, users need to provide (potentially long) explicit lists of plugin libraries to load, in order to extend the available node inventory.

navigation2 is one such user, that employs a fairly complex strategy to make sure all available plugins are loaded by the factory

Describe the solution you'd like

Instead of all this extra accounting, we can increase flexibility by a lot by using pluginlib.

I have already built a fully functional solution, available at https://github.com/polymathrobotics/behaviortree_cpp_pluginlib/tree/main/behaviortree_cpp_pluginlib - this eliminates most of the complexity of getting arbitrary plugins into a behavior tree factory.

The package works fine standalone as it is, but I believe users would be served better by including this functionality in the behaviortree.cpp core and recommending it as the default plugin pattern. Do you agree? If so, how do you think that code fits into this repository?

  1. Allows distributed export of any number of extensions, within a single library
  2. Allows automatic discovery and loading of plugins by the factory, without any behaviortree.cpp-specific special accounting

See the README for the usage pattern proposed here.

Describe alternatives you've considered

One could write a custom plugin system with discovery, but it would be reinventing a lot of wheels that pluginlib/classloader already provide.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions