40 #include <boost/tokenizer.hpp>
45 class ConstraintSamplerManagerLoader::Helper
48 Helper(
const constraint_samplers::ConstraintSamplerManagerPtr& csm) :
nh_(
"~")
56 std::make_unique<pluginlib::ClassLoader<constraint_samplers::ConstraintSamplerAllocator>>(
57 "moveit_core",
"constraint_samplers::ConstraintSamplerAllocator");
61 ROS_ERROR_STREAM(
"Exception while creating constraint sampling plugin loader " << ex.what());
64 boost::char_separator<char> sep(
" ");
66 for (boost::tokenizer<boost::char_separator<char>>::iterator beg = tok.begin(); beg != tok.end(); ++beg)
70 constraint_samplers::ConstraintSamplerAllocatorPtr csa =
72 csm->registerSamplerAllocator(csa);
73 ROS_INFO(
"Loaded constraint sampling plugin %s", std::string(*beg).c_str());
77 ROS_ERROR_STREAM(
"Exception while planning adapter plugin '" << *beg <<
"': " << ex.what());
85 std::unique_ptr<pluginlib::ClassLoader<constraint_samplers::ConstraintSamplerAllocator>>
90 const constraint_samplers::ConstraintSamplerManagerPtr& csm)
91 : constraint_sampler_manager_(csm ? csm :
std::make_shared<
constraint_samplers::ConstraintSamplerManager>())
92 , impl_(new
Helper(constraint_sampler_manager_))