PrimitiveExtractionParameterTuning.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package VisionX::ArmarXObjects::PrimitiveExtractionParameterTuning
17  * @author Peter Kaiser ( peter dot kaiser at kit dot edu )
18  * @date 2017
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
24 
26 
27 #include <pcl/octree/octree.h>
28 
29 using namespace armarx;
30 
31 
33 {
34  primitivesProviderName = getProperty<std::string>("PrimitivesProviderName").getValue();
36 
37  usingProxy(getProperty<std::string>("PointCloudProviderName").getValue());
38  usingProxy(getProperty<std::string>("PointCloudSegmenterName").getValue());
39  usingProxy(getProperty<std::string>("PrimitiveExtractorName").getValue());
40 
41  sourcePointCloudFilename = getProperty<std::string>("SourcePointCloud").getValue();
42  referencePointCloudFilename = getProperty<std::string>("GroundTruthPointCloud").getValue();
43  exportDirectory = getProperty<std::string>("ExportDirectory").getValue();
44 
45  // Load reference point cloud
49  {
50  ARMARX_ERROR << "Could not find point cloud files in ArmarXDataPath";
51  return;
52  }
53 
54  referencePointCloud.reset(new pcl::PointCloud<pcl::PointXYZRGBL>());
55  if (pcl::io::loadPCDFile(referencePointCloudFilename.c_str(), *referencePointCloud) == -1)
56  {
57  ARMARX_WARNING << "Unable to load point cloud from file " << getProperty<std::string>("GroundTruthPointCloud").getValue();
58  return;
59  }
60 
61  // Initialize default parameters
62  extractionPrm.minSegmentSize = 100;
63  extractionPrm.maxSegmentSize = 250000000;
64  extractionPrm.euclideanClusteringTolerance = 30;
65  extractionPrm.outlierThreshold = 20;
66 
67  extractionPrm.planeMaxIterations = 100;
68  extractionPrm.planeDistanceThreshold = 40;
69  extractionPrm.planeNormalDistance = 10;
70 
71  extractionPrm.cylinderMaxIterations = 100;
72  extractionPrm.cylinderDistanceThreshold = 10;
73  extractionPrm.cylinderRadiusLimit = 10;
74 
75  extractionPrm.sphereMaxIterations = 100;
76  extractionPrm.sphereDistanceThreshold = 90;
77  extractionPrm.sphereNormalDistance = 10;
78  extractionPrm.circularDistanceThreshold = 10;
79 
80  segmentationPrm.minSegmentSize = 5;
81  segmentationPrm.voxelResolution = 20;
82  segmentationPrm.seedResolution = 70;
83  segmentationPrm.colorImportance = 0;
84  segmentationPrm.spatialImportance = 1;
85  segmentationPrm.normalImportance = 4;
86  segmentationPrm.concavityThreshold = 10;
87  segmentationPrm.smoothnessThreshold = 0.1;
88 
89  bestFitness = -std::numeric_limits<float>::infinity();
90 
91  // Initialize bounds
92  bounds_segmentation_minSegmentSize = Eigen::Vector2f(100, 1000);
93  bounds_segmentation_maxSegmentSize = Eigen::Vector2f(250000000, 250000000);
94  bounds_segmentation_euclideanClusteringTolerance = Eigen::Vector2f(1, 100);
95  bounds_segmentation_outlierThreshold = Eigen::Vector2f(1, 100);
96  bounds_segmentation_planeMaxIterations = Eigen::Vector2f(100, 100);
97  bounds_segmentation_planeDistanceThreshold = Eigen::Vector2f(1e-6, 100);
98  bounds_segmentation_planeNormalDistance = Eigen::Vector2f(1e-6, 100);
99  bounds_segmentation_cylinderMaxIterations = Eigen::Vector2f(100, 100);
100  bounds_segmentation_cylinderDistanceThreshold = Eigen::Vector2f(1e-6, 100);
101  bounds_segmentation_cylinderRadiusLimit = Eigen::Vector2f(1e-6, 100);
102  bounds_segmentation_sphereMaxIterations = Eigen::Vector2f(100, 100);
103  bounds_segmentation_sphereDistanceThreshold = Eigen::Vector2f(1e-6, 100);
104  bounds_segmentation_sphereNormalDistance = Eigen::Vector2f(1e-6, 100);
105  bounds_segmentation_circularDistanceThreshold = Eigen::Vector2f(1, 100);
106  bounds_primitives_minSegmentSize = Eigen::Vector2f(1, 100);
107  bounds_primitives_voxelResolution = Eigen::Vector2f(1, 100);
108  bounds_primitives_seedResolution = Eigen::Vector2f(1, 100);
109  bounds_primitives_colorImportance = Eigen::Vector2f(0, 0);
110  bounds_primitives_spatialImportance = Eigen::Vector2f(1e-6, 100);
111  bounds_primitives_normalImportance = Eigen::Vector2f(1e-6, 100);
112  bounds_primitives_concavityThreshold = Eigen::Vector2f(1e-6, 100);
113  bounds_primitives_smoothnessThreshold = Eigen::Vector2f(1e-6, 100);
114 }
115 
117 {
118  pointCloudProvider = getProxy<visionx::FakePointCloudProviderInterfacePrx>(getProperty<std::string>("PointCloudProviderName").getValue());
119  if (!pointCloudProvider)
120  {
121  ARMARX_ERROR << "Could not obtain point cloud provider proxy";
122  return;
123  }
124 
125  pointCloudSegmenter = getProxy<visionx::PointCloudSegmenterInterfacePrx>(getProperty<std::string>("PointCloudSegmenterName").getValue());
126  if (!pointCloudSegmenter)
127  {
128  ARMARX_ERROR << "Could not obtain point cloud segmenter proxy";
129  return;
130  }
131 
132  primitiveExtractor = getProxy<visionx::PrimitiveMapperInterfacePrx>(getProperty<std::string>("PrimitiveExtractorName").getValue());
133  if (!primitiveExtractor)
134  {
135  ARMARX_ERROR << "Could not obtain primitive extractor";
136  return;
137  }
138 
139  iteration = 1;
140 
141  primitiveExtractor->setParameters(extractionPrm);
142  pointCloudSegmenter->setLccpParameters(segmentationPrm);
143 
144  pointCloudProvider->setPointCloudFilename(sourcePointCloudFilename);
145  pointCloudProvider->begin_startCaptureForNumFrames(1);
146 }
147 
149 {
150 
151 }
152 
154 {
155 
156 }
157 
159 {
161  {
162  return;
163  }
164 
165  pcl::PointCloud<pcl::PointXYZL>::Ptr primitives(new pcl::PointCloud<pcl::PointXYZL>());
166  if (!getPointClouds(primitivesProviderName, primitives))
167  {
168  ARMARX_WARNING << "Unable to get point cloud data.";
169  return;
170  }
171 
172  float fitness = compareLabeledPointClouds(primitives, referencePointCloud);
173  ARMARX_INFO << "Processed point cloud #" << iteration << " received (fitness = " << fitness << ")";
174 
175  if (fitness > bestFitness)
176  {
177  ARMARX_INFO << "New best parameter set found";
180  bestFitness = fitness;
181 
183  }
184  else
185  {
186  ARMARX_INFO << "Current parameter set not better";
187  }
188 
189  iteration++;
191 
192  primitiveExtractor->setParameters(extractionPrm);
193  pointCloudSegmenter->setLccpParameters(segmentationPrm);
194  pointCloudProvider->begin_startCaptureForNumFrames(1);
195 }
196 
198 {
200 }
201 
202 float PrimitiveExtractionParameterTuning::compareLabeledPointClouds(const pcl::PointCloud<pcl::PointXYZL>::Ptr& labeled, const pcl::PointCloud<pcl::PointXYZRGBL>::Ptr& reference)
203 {
204  ARMARX_INFO << labeled->size() << " points in segmentation point cloud";
205  ARMARX_INFO << reference->size() << " points in ground truth point cloud";
206 
207  pcl::octree::OctreePointCloudSearch<pcl::PointXYZL> octree(50);
208  octree.setInputCloud(labeled);
209  octree.addPointsFromInputCloud();
210 
211  std::map<unsigned int, unsigned int> labelMap;
212 
213  unsigned int num_covered = 0;
214  for (auto& p : reference->points)
215  {
216  std::vector<int> indices;
217  std::vector<float> squaredDistances;
218 
219  pcl::PointXYZL q;
220  q.x = p.x;
221  q.y = p.y;
222  q.z = p.z;
223 
224  if (octree.nearestKSearch(q, 1, indices, squaredDistances) > 0 && squaredDistances[0] < 50)
225  {
226  if (labelMap.find(p.label) == labelMap.end())
227  {
228  labelMap[p.label] = labeled->points[indices[0]].label;
229  }
230  if (labelMap[p.label] == labeled->points[indices[0]].label)
231  {
232  num_covered++;
233  }
234  }
235  }
236 
237  return ((float)num_covered) / reference->size();
238 }
239 
241 {
242  // Randomly sample within a hyperplane around the current parameter set
245  extractionPrm.euclideanClusteringTolerance = sample(bestExtractionPrm.euclideanClusteringTolerance, bounds_segmentation_euclideanClusteringTolerance);
246  extractionPrm.outlierThreshold = sample(bestExtractionPrm.outlierThreshold, bounds_segmentation_outlierThreshold);
247  extractionPrm.planeMaxIterations = sample(bestExtractionPrm.planeMaxIterations, bounds_segmentation_planeMaxIterations);
248  extractionPrm.planeDistanceThreshold = sample(bestExtractionPrm.planeDistanceThreshold, bounds_segmentation_planeDistanceThreshold);
249  extractionPrm.planeNormalDistance = sample(bestExtractionPrm.planeNormalDistance, bounds_segmentation_planeNormalDistance);
250  extractionPrm.cylinderMaxIterations = sample(bestExtractionPrm.cylinderMaxIterations, bounds_segmentation_cylinderMaxIterations);
251  extractionPrm.cylinderDistanceThreshold = sample(bestExtractionPrm.cylinderDistanceThreshold, bounds_segmentation_cylinderDistanceThreshold);
252  extractionPrm.cylinderRadiusLimit = sample(bestExtractionPrm.cylinderRadiusLimit, bounds_segmentation_cylinderRadiusLimit);
253  extractionPrm.sphereMaxIterations = sample(bestExtractionPrm.sphereMaxIterations, bounds_segmentation_sphereMaxIterations);
254  extractionPrm.sphereDistanceThreshold = sample(bestExtractionPrm.sphereDistanceThreshold, bounds_segmentation_sphereDistanceThreshold);
255  extractionPrm.sphereNormalDistance = sample(bestExtractionPrm.sphereNormalDistance, bounds_segmentation_sphereNormalDistance);
256  extractionPrm.circularDistanceThreshold = sample(bestExtractionPrm.circularDistanceThreshold, bounds_segmentation_circularDistanceThreshold);
257 
262  segmentationPrm.spatialImportance = sample(bestSegmentationPrm.spatialImportance, bounds_primitives_spatialImportance);
264  segmentationPrm.concavityThreshold = sample(bestSegmentationPrm.concavityThreshold, bounds_primitives_concavityThreshold);
265  segmentationPrm.smoothnessThreshold = sample(bestSegmentationPrm.smoothnessThreshold, bounds_primitives_smoothnessThreshold);
266 
267  std::stringstream s;
268  s << "Randomly determined parameter set: {" << std::endl
269  << " extractionPrm.minSegmentSize: " << extractionPrm.minSegmentSize << "," << std::endl
270  << " extractionPrm.maxSegmentSize: " << extractionPrm.maxSegmentSize << "," << std::endl
271  << " extractionPrm.euclideanClusteringTolerance: " << extractionPrm.euclideanClusteringTolerance << "," << std::endl
272  << " extractionPrm.outlierThreshold: " << extractionPrm.outlierThreshold << "," << std::endl
273  << " extractionPrm.planeMaxIterations: " << extractionPrm.planeMaxIterations << "," << std::endl
274  << " extractionPrm.planeDistanceThreshold: " << extractionPrm.planeDistanceThreshold << "," << std::endl
275  << " extractionPrm.planeNormalDistance: " << extractionPrm.planeNormalDistance << "," << std::endl
276  << " extractionPrm.cylinderMaxIterations: " << extractionPrm.cylinderMaxIterations << "," << std::endl
277  << " extractionPrm.cylinderDistanceThreshold: " << extractionPrm.cylinderDistanceThreshold << "," << std::endl
278  << " extractionPrm.cylinderRadiusLimit: " << extractionPrm.cylinderRadiusLimit << "," << std::endl
279  << " extractionPrm.sphereMaxIterations: " << extractionPrm.sphereMaxIterations << "," << std::endl
280  << " extractionPrm.sphereDistanceThreshold: " << extractionPrm.sphereDistanceThreshold << "," << std::endl
281  << " extractionPrm.sphereNormalDistance: " << extractionPrm.sphereNormalDistance << "," << std::endl
282  << " extractionPrm.circularDistanceThreshold: " << extractionPrm.circularDistanceThreshold << "," << std::endl
283  << " segmentationPrm.minSegmentSize: " << segmentationPrm.minSegmentSize << "," << std::endl
284  << " segmentationPrm.voxelResolution: " << segmentationPrm.voxelResolution << "," << std::endl
285  << " segmentationPrm.seedResolution: " << segmentationPrm.seedResolution << "," << std::endl
286  << " segmentationPrm.colorImportance: " << segmentationPrm.colorImportance << "," << std::endl
287  << " segmentationPrm.spatialImportance: " << segmentationPrm.spatialImportance << "," << std::endl
288  << " segmentationPrm.normalImportance: " << segmentationPrm.normalImportance << "," << std::endl
289  << " segmentationPrm.concavityThreshold: " << segmentationPrm.concavityThreshold << "," << std::endl
290  << " segmentationPrm.smoothnessThreshold: " << segmentationPrm.smoothnessThreshold << "," << std::endl
291  << "}";
292  ARMARX_INFO << s.str();
293 }
294 
295 float PrimitiveExtractionParameterTuning::sample(float current, const Eigen::Vector2f& bounds)
296 {
297  float radius_percent = 0.05;
298 
299  if (iteration % 5 == 0)
300  {
301  radius_percent = 0.3;
302  }
303 
304  // Random value in [-1, 1]
305  float r = ((float)(rand() % 2000 - 1000)) / 1000.0f;
306 
307  // Scale to admitted radius
308  current += r * (bounds(1) - bounds(0)) * radius_percent;
309 
310  // Crop to boundaries
311  current = std::max(current, bounds(0));
312  current = std::min(current, bounds(1));
313 
314  return current;
315 }
316 
317 void PrimitiveExtractionParameterTuning::exportBestSetup(const std::string& directory, const pcl::PointCloud<pcl::PointXYZL>::Ptr& pointCloud, const visionx::LccpParameters& lccp_prm, const visionx::PrimitiveExtractorParameters& pe_prm)
318 {
319  std::stringstream path_pcd;
320  path_pcd << directory << "/point_cloud_" << iteration << ".pcd";
321 
322  std::stringstream path_prm;
323  path_prm << directory << "/parameters_" << iteration << ".cfg";
324 
325  ARMARX_INFO << "Exporting labeled point cloud to: " << path_pcd.str();
326  pcl::io::savePCDFile<pcl::PointXYZL>(path_pcd.str(), *pointCloud);
327 
328  ARMARX_INFO << "Exporting parameters to: " << path_prm.str();
329  std::ofstream f;
330  f.open(path_prm.str());
331 
332  f << "Randomly determined parameter set: {" << std::endl
333  << " extractionPrm.minSegmentSize: " << pe_prm.minSegmentSize << "," << std::endl
334  << " extractionPrm.maxSegmentSize: " << pe_prm.maxSegmentSize << "," << std::endl
335  << " extractionPrm.euclideanClusteringTolerance: " << pe_prm.euclideanClusteringTolerance << "," << std::endl
336  << " extractionPrm.outlierThreshold: " << pe_prm.outlierThreshold << "," << std::endl
337  << " extractionPrm.planeMaxIterations: " << pe_prm.planeMaxIterations << "," << std::endl
338  << " extractionPrm.planeDistanceThreshold: " << pe_prm.planeDistanceThreshold << "," << std::endl
339  << " extractionPrm.planeNormalDistance: " << pe_prm.planeNormalDistance << "," << std::endl
340  << " extractionPrm.cylinderMaxIterations: " << pe_prm.cylinderMaxIterations << "," << std::endl
341  << " extractionPrm.cylinderDistanceThreshold: " << pe_prm.cylinderDistanceThreshold << "," << std::endl
342  << " extractionPrm.cylinderRadiusLimit: " << pe_prm.cylinderRadiusLimit << "," << std::endl
343  << " extractionPrm.sphereMaxIterations: " << pe_prm.sphereMaxIterations << "," << std::endl
344  << " extractionPrm.sphereDistanceThreshold: " << pe_prm.sphereDistanceThreshold << "," << std::endl
345  << " extractionPrm.sphereNormalDistance: " << pe_prm.sphereNormalDistance << "," << std::endl
346  << " extractionPrm.circularDistanceThreshold: " << pe_prm.circularDistanceThreshold << "," << std::endl
347  << " segmentationPrm.minSegmentSize: " << lccp_prm.minSegmentSize << "," << std::endl
348  << " segmentationPrm.voxelResolution: " << lccp_prm.voxelResolution << "," << std::endl
349  << " segmentationPrm.seedResolution: " << lccp_prm.seedResolution << "," << std::endl
350  << " segmentationPrm.colorImportance: " << lccp_prm.colorImportance << "," << std::endl
351  << " segmentationPrm.spatialImportance: " << lccp_prm.spatialImportance << "," << std::endl
352  << " segmentationPrm.normalImportance: " << lccp_prm.normalImportance << "," << std::endl
353  << " segmentationPrm.concavityThreshold: " << lccp_prm.concavityThreshold << "," << std::endl
354  << " segmentationPrm.smoothnessThreshold: " << lccp_prm.smoothnessThreshold << "," << std::endl
355  << "}" << std::endl
356  << std::endl
357  << "fitness: " << bestFitness << std::endl;
358 
359  f.close();
360 }
361 
armarx::PrimitiveExtractionParameterTuning::primitiveExtractor
visionx::PrimitiveMapperInterfacePrx primitiveExtractor
Definition: PrimitiveExtractionParameterTuning.h:126
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_voxelResolution
Eigen::Vector2f bounds_primitives_voxelResolution
Definition: PrimitiveExtractionParameterTuning.h:154
armarx::PrimitiveExtractionParameterTuning::compareLabeledPointClouds
float compareLabeledPointClouds(const pcl::PointCloud< pcl::PointXYZL >::Ptr &labeled, const pcl::PointCloud< pcl::PointXYZRGBL >::Ptr &reference)
Definition: PrimitiveExtractionParameterTuning.cpp:202
armarx::PrimitiveExtractionParameterTuning::onExitPointCloudProcessor
void onExitPointCloudProcessor() override
Definition: PrimitiveExtractionParameterTuning.cpp:153
armarx::PrimitiveExtractionParameterTuning::sourcePointCloudFilename
std::string sourcePointCloudFilename
Definition: PrimitiveExtractionParameterTuning.h:120
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_concavityThreshold
Eigen::Vector2f bounds_primitives_concavityThreshold
Definition: PrimitiveExtractionParameterTuning.h:159
armarx::PrimitiveExtractionParameterTuningPropertyDefinitions
Definition: PrimitiveExtractionParameterTuning.h:41
armarx::PrimitiveExtractionParameterTuning::bestSegmentationPrm
visionx::LccpParameters bestSegmentationPrm
Definition: PrimitiveExtractionParameterTuning.h:134
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_maxSegmentSize
Eigen::Vector2f bounds_segmentation_maxSegmentSize
Definition: PrimitiveExtractionParameterTuning.h:140
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_spatialImportance
Eigen::Vector2f bounds_primitives_spatialImportance
Definition: PrimitiveExtractionParameterTuning.h:157
armarx::PrimitiveExtractionParameterTuning::onInitPointCloudProcessor
void onInitPointCloudProcessor() override
Definition: PrimitiveExtractionParameterTuning.cpp:32
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_planeDistanceThreshold
Eigen::Vector2f bounds_segmentation_planeDistanceThreshold
Definition: PrimitiveExtractionParameterTuning.h:144
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_minSegmentSize
Eigen::Vector2f bounds_segmentation_minSegmentSize
Definition: PrimitiveExtractionParameterTuning.h:139
armarx::PrimitiveExtractionParameterTuning::exportBestSetup
void exportBestSetup(const std::string &directory, const pcl::PointCloud< pcl::PointXYZL >::Ptr &pointCloud, const visionx::LccpParameters &lccp_prm, const visionx::PrimitiveExtractorParameters &pe_prm)
Definition: PrimitiveExtractionParameterTuning.cpp:317
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_colorImportance
Eigen::Vector2f bounds_primitives_colorImportance
Definition: PrimitiveExtractionParameterTuning.h:156
armarx::PrimitiveExtractionParameterTuning::exportDirectory
std::string exportDirectory
Definition: PrimitiveExtractionParameterTuning.h:122
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_sphereMaxIterations
Eigen::Vector2f bounds_segmentation_sphereMaxIterations
Definition: PrimitiveExtractionParameterTuning.h:149
pcl::graph::indices
pcl::PointIndices::Ptr indices(const PCG &g)
Retrieve the indices of the points of the point cloud stored in a point cloud graph that actually bel...
Definition: point_cloud_graph.h:737
armarx::PrimitiveExtractionParameterTuning::process
void process() override
Definition: PrimitiveExtractionParameterTuning.cpp:158
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_normalImportance
Eigen::Vector2f bounds_primitives_normalImportance
Definition: PrimitiveExtractionParameterTuning.h:158
armarx::PrimitiveExtractionParameterTuning::referencePointCloudFilename
std::string referencePointCloudFilename
Definition: PrimitiveExtractionParameterTuning.h:121
armarx::PrimitiveExtractionParameterTuning::pointCloudSegmenter
visionx::PointCloudSegmenterInterfacePrx pointCloudSegmenter
Definition: PrimitiveExtractionParameterTuning.h:125
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_outlierThreshold
Eigen::Vector2f bounds_segmentation_outlierThreshold
Definition: PrimitiveExtractionParameterTuning.h:142
PrimitiveExtractionParameterTuning.h
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_euclideanClusteringTolerance
Eigen::Vector2f bounds_segmentation_euclideanClusteringTolerance
Definition: PrimitiveExtractionParameterTuning.h:141
visionx::PointCloudProcessor::waitForPointClouds
bool waitForPointClouds(int milliseconds=1000)
Wait for new PointClouds.
Definition: PointCloudProcessor.cpp:433
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_sphereNormalDistance
Eigen::Vector2f bounds_segmentation_sphereNormalDistance
Definition: PrimitiveExtractionParameterTuning.h:151
max
T max(T t1, T t2)
Definition: gdiam.h:48
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_cylinderRadiusLimit
Eigen::Vector2f bounds_segmentation_cylinderRadiusLimit
Definition: PrimitiveExtractionParameterTuning.h:148
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:189
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_seedResolution
Eigen::Vector2f bounds_primitives_seedResolution
Definition: PrimitiveExtractionParameterTuning.h:155
visionx::PointCloudProcessor::getPointClouds
int getPointClouds(const PointCloudPtrT &pointCloudPtr)
Poll PointClouds from provider.
Definition: PointCloudProcessor.h:373
q
#define q
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_minSegmentSize
Eigen::Vector2f bounds_primitives_minSegmentSize
Definition: PrimitiveExtractionParameterTuning.h:153
armarx::PrimitiveExtractionParameterTuning::pointCloudProvider
visionx::FakePointCloudProviderInterfacePrx pointCloudProvider
Definition: PrimitiveExtractionParameterTuning.h:124
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_cylinderDistanceThreshold
Eigen::Vector2f bounds_segmentation_cylinderDistanceThreshold
Definition: PrimitiveExtractionParameterTuning.h:147
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_sphereDistanceThreshold
Eigen::Vector2f bounds_segmentation_sphereDistanceThreshold
Definition: PrimitiveExtractionParameterTuning.h:150
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_planeNormalDistance
Eigen::Vector2f bounds_segmentation_planeNormalDistance
Definition: PrimitiveExtractionParameterTuning.h:145
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
armarx::PrimitiveExtractionParameterTuning::referencePointCloud
pcl::PointCloud< pcl::PointXYZRGBL >::Ptr referencePointCloud
Definition: PrimitiveExtractionParameterTuning.h:128
armarx::PrimitiveExtractionParameterTuning::bounds_primitives_smoothnessThreshold
Eigen::Vector2f bounds_primitives_smoothnessThreshold
Definition: PrimitiveExtractionParameterTuning.h:160
armarx::PrimitiveExtractionParameterTuning::generateNewParameterSet
void generateNewParameterSet()
Definition: PrimitiveExtractionParameterTuning.cpp:240
float
#define float
Definition: 16_Level.h:22
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_planeMaxIterations
Eigen::Vector2f bounds_segmentation_planeMaxIterations
Definition: PrimitiveExtractionParameterTuning.h:143
armarx::PrimitiveExtractionParameterTuning::iteration
unsigned int iteration
Definition: PrimitiveExtractionParameterTuning.h:137
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::PrimitiveExtractionParameterTuning::onDisconnectPointCloudProcessor
void onDisconnectPointCloudProcessor() override
Definition: PrimitiveExtractionParameterTuning.cpp:148
visionx::PointCloudProcessor::usingPointCloudProvider
void usingPointCloudProvider(std::string providerName)
Registers a delayed topic subscription and a delayed provider proxy retrieval which will be available...
Definition: PointCloudProcessor.cpp:261
armarx::PrimitiveExtractionParameterTuning::sample
float sample(float current, const Eigen::Vector2f &bounds)
Definition: PrimitiveExtractionParameterTuning.cpp:295
armarx::PrimitiveExtractionParameterTuning::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: PrimitiveExtractionParameterTuning.cpp:197
armarx::PrimitiveExtractionParameterTuning::primitivesProviderName
std::string primitivesProviderName
Definition: PrimitiveExtractionParameterTuning.h:119
armarx::PrimitiveExtractionParameterTuning::bestFitness
float bestFitness
Definition: PrimitiveExtractionParameterTuning.h:135
armarx::ArmarXDataPath::getAbsolutePath
static bool getAbsolutePath(const std::string &relativeFilename, std::string &storeAbsoluteFilename, const std::vector< std::string > &additionalSearchPaths={}, bool verbose=true)
Definition: ArmarXDataPath.cpp:111
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_circularDistanceThreshold
Eigen::Vector2f bounds_segmentation_circularDistanceThreshold
Definition: PrimitiveExtractionParameterTuning.h:152
min
T min(T t1, T t2)
Definition: gdiam.h:42
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::PropertyDefinitionsPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Definition: forward_declarations.h:34
ArmarXDataPath.h
armarx::PrimitiveExtractionParameterTuning::onConnectPointCloudProcessor
void onConnectPointCloudProcessor() override
Definition: PrimitiveExtractionParameterTuning.cpp:116
armarx::PrimitiveExtractionParameterTuning::extractionPrm
visionx::PrimitiveExtractorParameters extractionPrm
Definition: PrimitiveExtractionParameterTuning.h:130
armarx::PrimitiveExtractionParameterTuning::segmentationPrm
visionx::LccpParameters segmentationPrm
Definition: PrimitiveExtractionParameterTuning.h:131
armarx::ManagedIceObject::usingProxy
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
Definition: ManagedIceObject.cpp:151
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::PrimitiveExtractionParameterTuning::bestExtractionPrm
visionx::PrimitiveExtractorParameters bestExtractionPrm
Definition: PrimitiveExtractionParameterTuning.h:133
armarx::PrimitiveExtractionParameterTuning::bounds_segmentation_cylinderMaxIterations
Eigen::Vector2f bounds_segmentation_cylinderMaxIterations
Definition: PrimitiveExtractionParameterTuning.h:146