-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Location to install a plugin managed by pluginlib #36
Comments
I'm about to do some work on pluginlib in preparation for using it in ROS 1 and ROS 2 at the same time, and I wanted to take the time to respond to this issue. Sorry no one has given feedback until now.
I would be happy for pluginlib to support this case and maybe even recommend it, but I do not believe this is something pluginlib should enforce. It would be convenient for organizational purposes for people to put plugins for a particular application in a particular subfolder in
This reference states:
But it doesn't say it must use a subdirectory or even that it should if it has plugins. So I don't see that as a mandate to do so for plugins.
This reference is more opinionated (based on recommendation, not part of a standard like FHS), but it states:
Which is a principle that pluginlib adheres to (in my opinion), in that a plugin for an application like
Which reinforces the idea that no matter how you do it, just make plugins decoupled from the application's installation or configuration. Again, which I believe pluginlib does already. Finally, it gives a recommendation on where to put the files:
So, from my perspective, this is a recommendation, not a requirement as well. (oddly, @mikaelarguedas I believe So I propose we close this (with a "wontfix" for the recommendation to enforce the subdirectory in |
As the definition of the package says: "pluginlib is a C++ library for loading and unloading plugins from within a ROS package". The implementation of that is that every plugin is build as a shared library.
In the case that ROS was installed in /usr to follow FHS instead that /opt/ros/$distro/lib, a ros installation with multiple packages providing plugins the /usr/lib/* (or /usr/lib/$arch/*) directories contain a bunch of "libraries" that are not public libraries for the system installed in the place of public libraries. This consideration could be applied to /opt/ros/$distro/lib.
So, the plugins created by this library should go so some directory inside the default library path (i.e. /opt/ros/$distro/lib/ros-plugins or /usr/lib/ros/plugins or /usr/lib/ros or /usr/lib/pluginlib or whatever you consider appropriate.
Some references could be found here:
http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/plugin.html
http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA
I cannot evaluate the implications of that change (catkin, LD_LIBRARY_PATH, RUNPATH, etc), but it should be consider.
The text was updated successfully, but these errors were encountered: