Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hey I am sure you have figured out the answer to this, just to make sure that others are able to find the answer easily here is what is causing the issue.

Registering/Exporting a Plugin

In order to allow a class to be dynamically loaded, it must be marked as an exported class. This is done through the special macro PLUGINLIB_EXPORT_CLASS. This macro can be put into any source (.cpp) file that composes the plugin library, but is usually put at the end of the .cpp file for the exported class. For the example above, we might create a class_list.cpp file in package 'example_pkg' that looks as follows and compile it into the librectangle library. In your case your cpp should have something like this at the top

#include <pluginlib/class_list_macros.h>
#include <FrontierPlugins/NearestBasedAllocation.h>

PLUGINLIB_EXPORT_CLASS(FrontierPlugins::NearestBasedAllocation, YourBaseClassNamespace::YourBaseClass)
click to hide/show revision 2
No.2 Revision

Hey I am sure you have figured out the answer to this, just to make sure that others are able to find the answer easily here is what is causing the issue.

Registering/Exporting a Plugin

In order to allow a class to be dynamically loaded, it must be marked as an exported class. This is done through the special macro PLUGINLIB_EXPORT_CLASS. PLUGINLIB_EXPORT_CLASS. This macro can be put into any source (.cpp) (.cpp) file that composes the plugin library, but is usually put at the end of the .cpp file for the exported class. For the example above, we might create a class_list.cpp class_list.cpp file in package 'example_pkg' example_pkg that looks as follows and compile it into the librectangle librectangle library. In your case your cpp should have something like this at the top

#include <pluginlib/class_list_macros.h>
#include <FrontierPlugins/NearestBasedAllocation.h>

PLUGINLIB_EXPORT_CLASS(FrontierPlugins::NearestBasedAllocation, YourBaseClassNamespace::YourBaseClass)