them file test static_layer
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
#include <costmap_2d/critical_layer.h>
|
||||
#include <boost/dll/alias.hpp>
|
||||
#include "shared.h"
|
||||
|
||||
PLUGINLIB_EXPORT_CLASS(costmap_2d::CriticalLayer, costmap_2d::Layer)
|
||||
|
||||
using costmap_2d::NO_INFORMATION;
|
||||
using costmap_2d::LETHAL_OBSTACLE;
|
||||
@@ -35,4 +32,12 @@ void CriticalLayer::updateCosts(costmap_2d::Costmap2D& master_grid, int min_i, i
|
||||
updateWithMax(master_grid, min_i, min_j, max_i, max_j);
|
||||
|
||||
}
|
||||
|
||||
// Export factory function
|
||||
static PluginPtr create_critical_plugin() {
|
||||
return std::make_shared<CriticalLayer>();
|
||||
}
|
||||
|
||||
// Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias)
|
||||
BOOST_DLL_ALIAS(create_critical_plugin, create_plugin)
|
||||
}
|
||||
Reference in New Issue
Block a user