Costmap Constructor fails to load plugin

asked 2019-04-22 10:59:05 -0500

Mohsen1313 gravatar image

Hi,

I have two packages that I define my plugins in them, costmap_2d, and my_costmap. Plugin files in my_costmap package are as below

my_costmap_plugins.xml:

<library path="lib/libmy_costmap_layer">
  <class type="my_costmap::ProbabilisticLayer"  base_class_type="costmap_2d::Layer">
    <description>Listens to ...</description>
  </class>
  <class type="my_costmap::SpecifiedCostLayer"  base_class_type="costmap_2d::Layer">
    <description>Listens to...</description>
  </class>
</library>

package.xml

<export>
    <costmap_2d plugin="${prefix}/my_costmap_plugins.xml"/>
  </export>

specified_cost_layer.cpp Added PLUGINLIB_EXPORT_CLASS(my_costmap::SpecifiedCostLayer, costmap_2d::Layer)

In another package (my_package_2), I created an instance of costmap2DROS as

costmap_ = new costmap_2d::Costmap2DROS("costmap", tf_);

Once plugin_loader_.createInstance() is called in costmap2dROS pluginlib first loads costmap_2d plugins properly. However once it wants to load my_costmap::SpecifiedCostLayer, my_costmap_layer.so is found but I get a SIGABRT with the follwing error

ERROR: flag 'log_prefix' was defined more than once (in files 'src/base/logging.cc' and 'src/logging.cc').
my_package_2: /usr/include/boost/thread/pthread/recursive_mutex.hpp:104: boost::recursive_mutex::~recursive_mutex(): Assertion `!pthread_mutex_destroy(&m)' failed.

Any idea?

edit retag flag offensive close merge delete