class_loader
master
The class_loader package is a ROS-independent package for loading plugins during runtime.
|
The class_loader package is a ROS-independent package for loading plugins during runtime and the foundation of the higher level ROS pluginlib
library. class_loader utilizes the host operating system's runtime loader to open runtime libraries (e.g. .so/.dll/dylib files), introspect the library for exported plugin classes, and allows users to instantiate objects of said exported classes without the explicit declaration (i.e. header file) for those classes.
class_loader
is used in the implementation of the higher-level ROS package pluginlib
which is the encouraged method for loading plugins in the ROS ecosystem. You should use class_loader when creating plugins intended for non-ROS packages and pluginlib when exporting plugins to ROS packages.
This package claims to be in the Quality Level 4 category, see the Quality Declaration for more details.
The interface is provided through two classes, class_loader::ClassLoader
and class_loader::MultiLibraryClassLoader
. Both provide similar interfaces but the former only binds to a single runtime library whereas the latter can associate with multiple libraries. The typical workflow is as follows:
class_loader/class_loader.h
in your source codeclass_loader::ClassLoader
object passing the path and name of the library to open Visit the class_loader API documentation for a complete list of its main components.