$search
00001 /**************************************************************** 00002 * 00003 * Copyright (c) 2011 00004 * 00005 * Fraunhofer Institute for Manufacturing Engineering 00006 * and Automation (IPA) 00007 * 00008 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00009 * 00010 * Project name: care-o-bot 00011 * ROS stack name: cob_environment_perception_intern 00012 * ROS package name: cob_3d_mapping_semantics 00013 * Description: 00014 * 00015 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00016 * 00017 * Author: Georg Arbeiter, email:georg.arbeiter@ipa.fhg.de 00018 * Supervised by: Georg Arbeiter, email:georg.arbeiter@ipa.fhg.de 00019 * 00020 * Date of creation: 11/2012 00021 * ToDo: 00022 * 00023 * 00024 * 00025 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00026 * 00027 * Redistribution and use in source and binary forms, with or without 00028 * modification, are permitted provided that the following conditions are met: 00029 * 00030 * * Redistributions of source code must retain the above copyright 00031 * notice, this list of conditions and the following disclaimer. 00032 * * Redistributions in binary form must reproduce the above copyright 00033 * notice, this list of conditions and the following disclaimer in the 00034 * documentation and/or other materials provided with the distribution. 00035 * * Neither the name of the Fraunhofer Institute for Manufacturing 00036 * Engineering and Automation (IPA) nor the names of its 00037 * contributors may be used to endorse or promote products derived from 00038 * this software without specific prior written permission. 00039 * 00040 * This program is free software: you can redistribute it and/or modify 00041 * it under the terms of the GNU Lesser General Public License LGPL as 00042 * published by the Free Software Foundation, either version 3 of the 00043 * License, or (at your option) any later version. 00044 * 00045 * This program is distributed in the hope that it will be useful, 00046 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00047 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00048 * GNU Lesser General Public License LGPL for more details. 00049 * 00050 * You should have received a copy of the GNU Lesser General Public 00051 * License LGPL along with this program. 00052 * If not, see <http://www.gnu.org/licenses/>. 00053 * 00054 ****************************************************************/ 00055 00056 #ifndef SUPPORTING_PLANE_EXTRACTION_H_ 00057 #define SUPPORTING_PLANE_EXTRACTION_H_ 00058 00059 //################## 00060 //#### includes #### 00061 00062 //standard includes 00063 #include <iostream> 00064 #include <fstream> 00065 #include <sstream> 00066 #include <string> 00067 #include <vector> 00068 #include <math.h> 00069 00070 //PCL includes 00071 #include "pcl/point_types.h" 00072 #include "pcl/common/centroid.h" 00073 #include "pcl/common/eigen.h" 00074 00075 //other includes 00076 #include <Eigen/Core> 00077 00078 #include <cob_3d_mapping_common/polygon.h> 00079 00080 using namespace cob_3d_mapping; 00081 00082 class SupportingPlaneExtraction 00083 { 00084 00085 public: 00086 00090 SupportingPlaneExtraction () 00091 :distance_min_ (0.4), 00092 distance_max_ (3), 00093 area_min_ (0.3), 00094 area_max_ (3) 00095 { 00097 } 00098 00102 ~SupportingPlaneExtraction () 00103 { 00104 00106 } 00107 00108 00115 void 00116 setDistanceMin (double distance_min) 00117 { 00118 distance_min_ = distance_min; 00119 } 00120 00127 void 00128 setDistanceMax (double distance_max) 00129 { 00130 distance_max_ = distance_max; 00131 } 00138 void 00139 setAreaMin (double area_min) 00140 { 00141 area_min_ = area_min; 00142 } 00143 00150 void 00151 setAreaMax (double area_max) 00152 { 00153 area_max_ = area_max; 00154 } 00155 00156 00162 bool 00163 getSupportingPlane(std::vector<Polygon::Ptr>& polys, Polygon& sp); 00164 00165 00166 protected: 00167 00168 double distance_min_, distance_max_; 00169 double area_min_, area_max_; 00170 00171 00172 }; 00173 00174 #endif /* SUPPORTING_PLANE_EXTRACTION_H_ */