68 CollisionPluginPtr
load(
const std::string& name)
70 CollisionPluginPtr plugin;
73 plugin = cache_->createUniqueInstance(name);
74 plugins_[name] = plugin;
76 catch (pluginlib::PluginlibException& ex)
78 RCLCPP_ERROR_STREAM(getLogger(),
"Exception while loading " << name <<
": " << ex.what());
83 bool activate(
const std::string& name,
const planning_scene::PlanningScenePtr& scene)
85 std::map<std::string, CollisionPluginPtr>::iterator it = plugins_.find(name);
86 if (it == plugins_.end())
88 const CollisionPluginPtr plugin =
load(name);
91 return plugin->initialize(scene);
97 return it->second->initialize(scene);