Comments (1)
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.
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.
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 lib
, but it does not appear to be required.
http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA
This reference states:
Applications may use a single subdirectory under /usr/lib. If an application uses a subdirectory, all architecture-dependent data exclusively used by the application must be placed within that subdirectory.
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.
http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/plugin.html
This reference is more opinionated (based on recommendation, not part of a standard like FHS), but it states:
Well, and extension is nothing more that some files in a right format (DLLs that implements the API your Software defined), put in the right folders (directories your Software looks for extensions).
Which is a principle that pluginlib adheres to (in my opinion), in that a plugin for an application like rviz
doesn't need to modify a global configuration file or rviz
itself to be a plugin. It goes on to say:
The most important thing to consider in your plugin architecture is to not share files between plugins and your Software. You should provide an architecture where plugins will be able to fully install and uninstall themselves by simply putting and removing files in specific directories, documented in you Software.
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:
Good candidates are /usr/lib/myproduct/plugins as the plugins directory, and /etc/myproduct/plugins as the plugins configuration files directory.
So, from my perspective, this is a recommendation, not a requirement as well. (oddly, /usr/lib/myproduct/plugins
seems to be at odds with what the FHS allows, a single subdirectory in lib)
@mikaelarguedas I believe pluginlib
is already flexible enough to support arbitrary subdirectories with <install prefix>/lib
(regardless of whether or not <install prefix>
is /opt/ros/$distro
or /usr
), but I think we could add a test for this case too.
So I propose we close this (with a "wontfix" for the recommendation to enforce the subdirectory in lib
) and open issues to either support or test (if already supported) subdirectories in lib for plugins and to update the recommendation for plugins to be installed in a subdirectory.
from pluginlib.
Related Issues (20)
- no implementation for QNX filesystem lib in CMakeLists.txt HOT 3
- [dashing] Syntax error on pluginlib/pluginlib-extras.cmake
- OS X has issues compiling with SDK <10.15 HOT 1
- Searching available plugins in ROS2 HOT 4
- Error_when_building_ROS2
- Rosdep signals missing tags on Foxy built from source
- Got LibraryUnloadException on correct unloading
- Error while plugin loading
- Pluginlib ament index resource types should use periods as a separator
- New noetic release HOT 6
- Error parsing xml comment in package.xml
- Missing license HOT 1
- no match for 'operator==' error HOT 1
- Building from source with Humble results in incorrect include directory HOT 1
- Galactic Documentation error on createInstance
- Wshadow compiler warning catches issues HOT 2
- Does ros-iron-pluginlib Support Windows 10?
- Add a License file
- Subdirectory file structure not supported
- Creating plugin base in same package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pluginlib.