Cross-package PluginLib Library Loading Error
Setup:
- Package A (
costmap_2d
) - Defined new plugin bass classcostmap_2d::CostmapPlugin
- Package B (
static_costmap_plugin
) - Define plugincostmap_plugins::StaticCostmapPlugin
- In Manifest:
<export>
<costmap_2d plugin="${prefix}/costmap_plugins.xml" />
</export>
- costmap_plugins.xml:
- In Manifest:
<library path="lib/libcostmap_plugins">
<class name="static_costmap_plugin/static_costmap" type="costmap_plugins::StaticCostmap" base_class_type="costmap_2d::CostmapPlugin">
<description>Uses a static costmap</description>
</class>
</library>
- Plugin Declaration:
PLUGINLIB_DECLARE_CLASS(costmap_plugins, static_costmap, costmap_plugins::StaticCostmapPlugin, costmap_2d::CostmapPlugin)
Error:
terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
what(): Failed to load library /home/dlu/ros/nav_experimental/static_costmap_plugin/lib/libcostmap_plugins.so. Make sure that you are calling the PLUGINLIB_REGISTER_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Cannot load library: No manifest in /home/dlu/ros/nav_experimental/static_costmap_plugin/lib/libcostmap_plugins.so: static_costmap_plugin__static_costmap
Aborted
To get this to work, what are the main differences between what you did and the tutorial? The main thing I would like to know is in which package did you declare you're plugin and if you had to turn your base class into a shared library for Package B to link with its plugin.