21 #ifndef ROBOT_CALIBRATION_FEATURE_FINDER_LOADER_H 22 #define ROBOT_CALIBRATION_FEATURE_FINDER_LOADER_H 25 #include <boost/shared_ptr.hpp> 44 plugin_loader_(
"robot_calibration",
"robot_calibration::FeatureFinder")
49 FeatureFinderMap& features)
56 if (!nh.
getParam(
"features", finder_params))
58 ROS_FATAL(
"Parameter 'features' is not set!");
65 ROS_FATAL(
"Parameter 'features' should be a struct.");
70 ROS_INFO(
"Loading %d feature finders.", (
int)finder_params.
size());
72 it != finder_params.
end();
76 std::string name =
static_cast<std::string
>(it->first);
81 if (!finder_handle.
getParam(
"type", type))
83 ROS_FATAL(
"Feature finder %s has no type defined", name.c_str());
88 FeatureFinderPtr finder;
89 ROS_INFO(
" New %s: %s", type.c_str(), name.c_str());
91 if (finder && finder->init(name, finder_handle))
92 features[name] = finder;
103 #endif // ROBOT_CALIBRATION_FEATURE_FINDER_LOADER_H
std::map< std::string, FeatureFinderPtr > FeatureFinderMap
ValueStruct::iterator iterator
Load feature finders, based on param server config.
Type const & getType() const
bool load(ros::NodeHandle &nh, FeatureFinderMap &features)
Calibration code lives under this namespace.
pluginlib::ClassLoader< robot_calibration::FeatureFinder > plugin_loader_
bool getParam(const std::string &key, std::string &s) const
boost::shared_ptr< FeatureFinder > FeatureFinderPtr