00001 #include <ros/ros.h> 00002 #include <ros/package.h> 00003 00004 #include <opencv/cv.h> 00005 #include <opencv/highgui.h> 00006 #include <sensor_msgs/Image.h> 00007 #include <cv_bridge/CvBridge.h> 00008 #include <image_transport/image_transport.h> 00009 00010 //service definitions 00011 #include <portrait_robot_msgs/alubsc_node_instr.h> 00012 00013 //std 00014 #include <vector> 00015 #include <queue> 00016 #include <map> 00017 #include <string> 00018 #include <iostream> 00019 00020 #include <face_contour_detector/FaceContourRequestHandler.h> 00021 00022 //main 00023 00024 int main(int argc, char* argv[]) { 00025 00026 ros::init(argc, argv, "parameter_autoselect"); 00027 ros::NodeHandle n; 00028 00029 std::string path = ros::package::getPath("face_contour_detector"); 00030 path = path.append("/config/explore_settings.xml"); 00031 00032 ROS_INFO("parameter autoselector ready"); 00033 ros::Rate loop_rate(10); 00034 face_contour_detector::FaceContourRequestHandler reqHandler = face_contour_detector::FaceContourRequestHandler(n, path); 00035 ros::ServiceServer service = n.advertiseService("contour_detector", &face_contour_detector::FaceContourRequestHandler::HandleAlubscRequest, &reqHandler); 00036 while(ros::ok()) { 00037 reqHandler.SolveOneRequest(); 00038 ros::spinOnce(); 00039 loop_rate.sleep(); 00040 } 00041 return 0; 00042 00043 } 00044 00045 00046 00047 00048