ObjectRecognitionWrapper.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 MemoryX::Helpers
17 * @author Alexey Kozlov ( kozlov at kit dot edu)
18 * @date 2012
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
24 
25 // MemoryX
27 
28 // ArmarXCore
30 
32 
34 {
35  // ObjectRecognitionWrapper attributes
36  const std::string ATTR_RECOGNITION_METHOD = "recognitionMethod";
37  const std::string ATTR_MOTION_MODEL = "defaultMotionModel";
38  const std::string ATTR_RECOGNITION_QUERIES = "recognitionQueries";
39 
40  // TexturedRecognitionWrapper attributes
41  const std::string ATTR_FEATURE_FILE = "featureFile";
42 
43  // SegmentableRecognitionWrapper attributes
44  const std::string ATTR_OBJECT_COLOR = "objectColor";
45  const std::string ATTR_SEGMENTABLE_DATA = "segmentableObjectData";
46 
47  // ArMarkerWrapper attributes
48  const std::string ATTR_AR_MARKER_ID = "arMarkerID";
49  const std::string ATTR_AR_MARKER_SIZE = "arMarkerSize";
50  const std::string ATTR_AR_MARKER_TRANSLATION = "arMarkerTranslation";
51  const std::string ATTR_AR_MARKER_ROTATION = "arMarkerRotation";
52 
53  // PointCloudLocalizerWrapper attributes
54  const std::string POINTCLOUD_FILE = "pointcloudFile";
55  const std::string POINTCLOUD_EXP_MATCH_DIST = "expectedMatchDistance";
56  const std::string POINTCLOUD_MISMATCH_DIST = "mismatchDistance";
57 
58  std::string
60  {
61  if (getEntity()->hasAttribute(ATTR_RECOGNITION_METHOD))
62  {
63  return EntityPtr::dynamicCast(getEntity())
64  ->getAttributeValue(ATTR_RECOGNITION_METHOD)
65  ->getString();
66  }
67 
68  return "";
69  }
70 
71  std::string
73  {
74  if (getEntity()->hasAttribute(ATTR_MOTION_MODEL))
75  {
76  return EntityPtr::dynamicCast(getEntity())
77  ->getAttributeValue(ATTR_MOTION_MODEL)
78  ->getString();
79  }
80 
81  return "";
82  }
83 
84  void
85  ObjectRecognitionWrapper::setRecognitionMethod(const std::string& recognitionMethod)
86  {
87  if (recognitionMethod != "")
88  {
89  EntityAttributeBasePtr recognitionMethodAttr =
91  recognitionMethodAttr->setValue(new armarx::Variant(recognitionMethod));
92  getEntity()->putAttribute(recognitionMethodAttr);
93  }
94  }
95 
96  void
97  ObjectRecognitionWrapper::setDefaultMotionModel(const std::string& defaultMotionModel)
98  {
99  if (defaultMotionModel != "")
100  {
101  EntityAttributeBasePtr motionModelAttr = new EntityAttribute(ATTR_MOTION_MODEL);
102  motionModelAttr->setValue(new armarx::Variant(defaultMotionModel));
103  getEntity()->putAttribute(motionModelAttr);
104  }
105  }
106 
107  void
109  {
110  if (getEntity()->hasAttribute(ATTR_RECOGNITION_QUERIES))
111  {
112  getEntity()
113  ->getAttribute(ATTR_RECOGNITION_QUERIES)
114  ->addValue(new armarx::Variant(query));
115  }
116  else
117  {
118  EntityAttributeBasePtr recognitionQueryAttr =
120  recognitionQueryAttr->addValue(new armarx::Variant(query));
121  getEntity()->putAttribute(recognitionQueryAttr);
122  }
123  }
124 
125  LocalizationQueryList
127  {
128  LocalizationQueryList resultList;
129 
130  if (!getEntity()->hasAttribute(ATTR_RECOGNITION_QUERIES))
131  {
132  return resultList;
133  }
134 
135  int numberElements = getEntity()->getAttribute(ATTR_RECOGNITION_QUERIES)->size();
136 
137  for (int e = 0; e < numberElements; e++)
138  {
139  armarx::VariantPtr var = armarx::VariantPtr::dynamicCast(
140  getEntity()->getAttribute(ATTR_RECOGNITION_QUERIES)->getValueAt(e));
141  resultList.push_back(var->getClass<LocalizationQuery>());
142  }
143 
144  return resultList;
145  }
146 
147  void
149  {
150  if (!getEntity()->hasAttribute(ATTR_RECOGNITION_QUERIES))
151  {
152  return;
153  }
154 
155  int numberElements = getEntity()->getAttribute(ATTR_RECOGNITION_QUERIES)->size();
156 
157  for (int e = 0; e < numberElements; e++)
158  {
159  armarx::VariantPtr var = armarx::VariantPtr::dynamicCast(
160  getEntity()->getAttribute(ATTR_RECOGNITION_QUERIES)->getValueAt(e));
161  std::string currentQueryName = var->getClass<LocalizationQuery>()->queryName;
162 
163  if (currentQueryName == queryName)
164  {
165  getEntity()->getAttribute(ATTR_RECOGNITION_QUERIES)->removeValueAt(e);
166  e--;
167  numberElements--;
168  }
169  }
170  }
171 
172  void
174  const LocalizationQueryPtr& query)
175  {
176  if (!getEntity()->hasAttribute(ATTR_RECOGNITION_QUERIES))
177  {
178  ARMARX_ERROR_S << "Entity " << getEntity()->getName() << " does not have Attribute "
180  return;
181  }
182 
183  int numberElements = getEntity()->getAttribute(ATTR_RECOGNITION_QUERIES)->size();
185 
186  for (int e = 0; e < numberElements; e++)
187  {
188  armarx::VariantPtr var = armarx::VariantPtr::dynamicCast(
189  getEntity()->getAttribute(ATTR_RECOGNITION_QUERIES)->getValueAt(e));
190  LocalizationQueryPtr currentQuery = var->getClass<LocalizationQuery>();
191 
192  armarx::VariantPtr newVar = new armarx::Variant();
194 
195  if (currentQuery->queryName != queryName) // copy
196  {
197  newVar->setClass(LocalizationQueryPtr::dynamicCast(currentQuery->ice_clone()));
198  }
199  else // insert new query
200  {
201  newVar->setClass(LocalizationQueryPtr::dynamicCast(query->ice_clone()));
202  }
203 
204  updatedQueries->addValue(newVar);
205  }
206 
207  getEntity()->removeAttribute(ATTR_RECOGNITION_QUERIES);
208  getEntity()->putAttribute(updatedQueries);
209  }
210 
213  {
214  return new ObjectRecognitionWrapper(*this);
215  }
216 
219  {
220  }
221 
222  std::string
224  {
225  if (getEntity()->hasAttribute(ATTR_FEATURE_FILE))
226  {
227  const std::string featureFileName = cacheAttributeFile(ATTR_FEATURE_FILE, true);
228  return featureFileName;
229  }
230 
231  return "";
232  }
233 
234  void
235  TexturedRecognitionWrapper::setFeatureFile(const std::string& featureFileName,
236  const std::string& filesDBName)
237  {
238  if (featureFileName != "")
239  {
240  EntityAttributeBasePtr featureFileAttr = new EntityAttribute(ATTR_FEATURE_FILE);
241  fileManager->storeFileToAttr(filesDBName, featureFileName, featureFileAttr);
242  cleanUpAttributeFiles(getEntity()->getAttribute(ATTR_FEATURE_FILE), featureFileAttr);
243  getEntity()->putAttribute(featureFileAttr);
244  }
245  }
246 
249  {
250  return new TexturedRecognitionWrapper(*this);
251  }
252 
255  {
256  }
257 
258  std::string
260  {
261  std::vector<std::string> fileNames;
262 
263  if (getEntity()->hasAttribute(ATTR_SEGMENTABLE_DATA))
264  {
265  fileManager->ensureFilesInCache(
266  getEntity()->getAttribute(ATTR_SEGMENTABLE_DATA), fileNames, true);
267  }
268 
269  if (fileNames.size() == 0)
270  {
271  return "";
272  }
273 
274  // retrieve path
275  std::filesystem::path path;
276  path = fileNames.at(0);
277 
278  return path.parent_path().c_str();
279  }
280 
281  void
282  SegmentableRecognitionWrapper::setDataFiles(const std::string& dataPath,
283  const std::string& filesDBName)
284  {
285  if (dataPath != "")
286  {
287  EntityAttributeBasePtr featureFileAttr = new EntityAttribute(ATTR_SEGMENTABLE_DATA);
288  // if(getEntity()–>getAttribute(ATTR_SEGMENTABLE_DATA))
289  // fileManager->removeAttrFiles(getEntity()–>getAttribute(ATTR_SEGMENTABLE_DATA));
290  ARMARX_VERBOSE_S << "STORING datapath " << dataPath;
291  fileManager->storeDirectoryToAttr(filesDBName, dataPath, featureFileAttr);
293  featureFileAttr);
294 
295  getEntity()->putAttribute(featureFileAttr);
296  }
297  }
298 
299  ObjectColor
301  {
302  if (getEntity()->hasAttribute(ATTR_OBJECT_COLOR))
303  {
304  return (ObjectColor)EntityPtr::dynamicCast(getEntity())
305  ->getAttributeValue(ATTR_OBJECT_COLOR)
306  ->getInt();
307  }
308 
309  return eNone;
310  }
311 
312  void
314  {
315  EntityAttributeBasePtr objectColorAttr = new EntityAttribute(ATTR_OBJECT_COLOR);
316  objectColorAttr->setValue(new armarx::Variant(int(color)));
317  getEntity()->putAttribute(objectColorAttr);
318  }
319 
322  {
323  return new SegmentableRecognitionWrapper(*this);
324  }
325 
328  {
329  }
330 
331  ObjectColor
333  {
334  if (getEntity()->hasAttribute(ATTR_OBJECT_COLOR))
335  {
336  return (ObjectColor)EntityPtr::dynamicCast(getEntity())
337  ->getAttributeValue(ATTR_OBJECT_COLOR)
338  ->getInt();
339  }
340  else
341  {
342  return eNone;
343  }
344  }
345 
346  void
347  HandMarkerBallWrapper::setObjectColor(const ObjectColor& color)
348  {
349  EntityAttributeBasePtr objectColorAttr = new EntityAttribute(ATTR_OBJECT_COLOR);
350  objectColorAttr->setValue(new armarx::Variant(int(color)));
351  getEntity()->putAttribute(objectColorAttr);
352  }
353 
356  {
357  return new HandMarkerBallWrapper(*this);
358  }
359 
361  {
362  }
363 
364  std::vector<int>
366  {
367  std::vector<int> result;
368 
369  if (getEntity()->hasAttribute(ATTR_AR_MARKER_ID))
370  {
371  EntityPtr p = EntityPtr::dynamicCast(getEntity());
372  EntityAttributeBasePtr attr = p->getAttribute(ATTR_AR_MARKER_ID);
373 
374  for (int i = 0; i < attr->size(); i++)
375  {
376  result.push_back(attr->getValueAt(i)->getInt());
377  }
378  }
379  else
380  {
381  ARMARX_WARNING_S << "Entity doesn't have the requested attribute " << ATTR_AR_MARKER_ID;
382  }
383 
384  return result;
385  }
386 
387  void
388  ArMarkerWrapper::setArMarkerIDs(const std::vector<int>& newMarkerIDs)
389  {
390  EntityAttributeBasePtr attr = new EntityAttribute(ATTR_AR_MARKER_ID);
391 
392  for (size_t i = 0; i < newMarkerIDs.size(); i++)
393  {
394  attr->addValue(new armarx::Variant(newMarkerIDs.at(i)));
395  }
396 
397  getEntity()->putAttribute(attr);
398  }
399 
400  std::vector<float>
402  {
403  std::vector<float> result;
404 
405  if (getEntity()->hasAttribute(ATTR_AR_MARKER_SIZE))
406  {
407  EntityPtr p = EntityPtr::dynamicCast(getEntity());
408  EntityAttributeBasePtr attr = p->getAttribute(ATTR_AR_MARKER_SIZE);
409 
410  for (int i = 0; i < attr->size(); i++)
411  {
412  result.push_back(attr->getValueAt(i)->getFloat());
413  }
414  }
415  else
416  {
417  ARMARX_WARNING_S << "Entity doesn't have the requested attribute "
419  }
420 
421  return result;
422  }
423 
424  void
425  ArMarkerWrapper::setArMarkerSizes(const std::vector<float>& newMarkerSizes)
426  {
427  EntityAttributeBasePtr attr = new EntityAttribute(ATTR_AR_MARKER_SIZE);
428 
429  for (size_t i = 0; i < newMarkerSizes.size(); i++)
430  {
431  attr->addValue(new armarx::Variant(newMarkerSizes.at(i)));
432  }
433 
434  getEntity()->putAttribute(attr);
435  }
436 
437  std::vector<Eigen::Vector3f>
439  {
440  std::vector<Eigen::Vector3f> result;
441 
442  if (getEntity()->hasAttribute(ATTR_AR_MARKER_TRANSLATION))
443  {
444  EntityPtr p = EntityPtr::dynamicCast(getEntity());
445  EntityAttributeBasePtr attr = p->getAttribute(ATTR_AR_MARKER_TRANSLATION);
446 
447  for (int i = 0; i < attr->size(); i++)
448  {
449  armarx::Vector3BasePtr vecBase =
450  armarx::VariantPtr::dynamicCast(attr->getValueAt(i))
451  ->getClass<armarx::Vector3Base>();
452  Eigen::Vector3f vec;
453  vec(0) = vecBase->x;
454  vec(1) = vecBase->y;
455  vec(2) = vecBase->z;
456  result.push_back(vec);
457  }
458  }
459  else
460  {
461  ARMARX_WARNING_S << "Entity doesn't have the requested attribute "
463  }
464 
465  return result;
466  }
467 
468  void
470  const std::vector<Eigen::Vector3f>& newTranslations)
471  {
472  EntityAttributeBasePtr attr = new EntityAttribute(ATTR_AR_MARKER_TRANSLATION);
473 
474  for (size_t i = 0; i < newTranslations.size(); i++)
475  {
476  armarx::Vector3 vec(newTranslations.at(i));
477  attr->addValue(new armarx::Variant(vec));
478  }
479 
480  getEntity()->putAttribute(attr);
481  }
482 
483  std::vector<Eigen::Vector3f>
485  {
486  std::vector<Eigen::Vector3f> result;
487 
488  if (getEntity()->hasAttribute(ATTR_AR_MARKER_ROTATION))
489  {
490  EntityPtr p = EntityPtr::dynamicCast(getEntity());
491  EntityAttributeBasePtr attr = p->getAttribute(ATTR_AR_MARKER_ROTATION);
492 
493  for (int i = 0; i < attr->size(); i++)
494  {
495  armarx::Vector3BasePtr vecBase =
496  armarx::VariantPtr::dynamicCast(attr->getValueAt(i))
497  ->getClass<armarx::Vector3Base>();
498  Eigen::Vector3f vec;
499  vec(0) = vecBase->x;
500  vec(1) = vecBase->y;
501  vec(2) = vecBase->z;
502  result.push_back(vec);
503  }
504  }
505  else
506  {
507  ARMARX_WARNING_S << "Entity doesn't have the requested attribute "
509  }
510 
511  return result;
512  }
513 
514  void
516  const std::vector<Eigen::Vector3f>& newRotations)
517  {
518  EntityAttributeBasePtr attr = new EntityAttribute(ATTR_AR_MARKER_ROTATION);
519 
520  for (size_t i = 0; i < newRotations.size(); i++)
521  {
522  armarx::Vector3 vec(newRotations.at(i));
523  attr->addValue(new armarx::Variant(vec));
524  }
525 
526  getEntity()->putAttribute(attr);
527  }
528 
529  std::vector<Eigen::Matrix4f>
531  {
532  std::vector<Eigen::Matrix4f> result;
533 
534  if (getEntity()->hasAttribute(ATTR_AR_MARKER_TRANSLATION) &&
535  getEntity()->hasAttribute(ATTR_AR_MARKER_ROTATION))
536  {
537  EntityPtr p = EntityPtr::dynamicCast(getEntity());
538  EntityAttributeBasePtr attrTransl = p->getAttribute(ATTR_AR_MARKER_TRANSLATION);
539  EntityAttributeBasePtr attrRot = p->getAttribute(ATTR_AR_MARKER_ROTATION);
540 
541  for (int i = 0; i < attrTransl->size() && i < attrRot->size(); i++)
542  {
544  armarx::Vector3BasePtr vecBase =
545  armarx::VariantPtr::dynamicCast(attrTransl->getValueAt(i))
546  ->getClass<armarx::Vector3Base>();
547  newTrafo(0, 3) = vecBase->x;
548  newTrafo(1, 3) = vecBase->y;
549  newTrafo(2, 3) = vecBase->z;
550  vecBase = armarx::VariantPtr::dynamicCast(attrRot->getValueAt(i))
551  ->getClass<armarx::Vector3Base>();
552  newTrafo.block<3, 3>(0, 0) =
553  (Eigen::AngleAxisf(vecBase->x, Eigen::Vector3f::UnitX()) *
554  Eigen::AngleAxisf(vecBase->y, Eigen::Vector3f::UnitY()) *
555  Eigen::AngleAxisf(vecBase->z, Eigen::Vector3f::UnitZ()))
556  .matrix();
557  result.push_back(newTrafo);
558  }
559  }
560  else
561  {
562  ARMARX_WARNING_S << "Entity doesn't have both requested attributes "
564  }
565 
566  return result;
567  }
568 
571  {
572  return new ArMarkerWrapper(*this);
573  }
574 
577  {
578  }
579 
580  std::string
582  {
583  if (getEntity()->hasAttribute(POINTCLOUD_FILE))
584  {
585  const std::string fileName = cacheAttributeFile(POINTCLOUD_FILE, true);
586  return fileName;
587  }
588 
589  return "";
590  }
591 
592  void
594  const std::string& filesDBName)
595  {
596  if (fileName != "")
597  {
598  EntityAttributeBasePtr fileAttr = new EntityAttribute(POINTCLOUD_FILE);
599  fileManager->storeFileToAttr(filesDBName, fileName, fileAttr);
600  cleanUpAttributeFiles(getEntity()->getAttribute(POINTCLOUD_FILE), fileAttr);
601  getEntity()->putAttribute(fileAttr);
602  }
603  }
604 
605  void
607  float& mismatchDistance)
608  {
609  if (getEntity()->hasAttribute(POINTCLOUD_EXP_MATCH_DIST) &&
610  getEntity()->hasAttribute(POINTCLOUD_MISMATCH_DIST))
611  {
612  EntityPtr p = EntityPtr::dynamicCast(getEntity());
613  expectedMatchDistance = p->getAttributeValue(POINTCLOUD_EXP_MATCH_DIST)->getFloat();
614  mismatchDistance = p->getAttributeValue(POINTCLOUD_MISMATCH_DIST)->getFloat();
615  }
616  else
617  {
618  ARMARX_IMPORTANT_S << "Attribute " << POINTCLOUD_EXP_MATCH_DIST << " or "
619  << POINTCLOUD_MISMATCH_DIST << " not set for object "
620  << getEntity()->getName();
621  expectedMatchDistance = 0;
622  mismatchDistance = 0;
623  }
624  }
625 
626  void
628  const float mismatchDistance)
629  {
630  EntityAttributePtr expectedMatchDistanceAttr =
632  expectedMatchDistanceAttr->setValue(new armarx::Variant(expectedMatchDistance));
633  getEntity()->putAttribute(expectedMatchDistanceAttr);
634  EntityAttributePtr mismatchDistanceAttr = new EntityAttribute(POINTCLOUD_MISMATCH_DIST);
635  mismatchDistanceAttr->setValue(new armarx::Variant(mismatchDistance));
636  getEntity()->putAttribute(mismatchDistanceAttr);
637  }
638 
641  {
642  return new PointCloudLocalizerWrapper(*this);
643  }
644 } // namespace memoryx::EntityWrappers
memoryx::EntityWrappers::PointCloudLocalizerWrapper::getPointCloudFileName
std::string getPointCloudFileName() const
Definition: ObjectRecognitionWrapper.cpp:581
memoryx::EntityWrappers::SegmentableRecognitionWrapper::getDataFiles
std::string getDataFiles() const
Definition: ObjectRecognitionWrapper.cpp:259
memoryx::EntityWrappers::ArMarkerWrapper::getArMarkerIDs
std::vector< int > getArMarkerIDs() const
Definition: ObjectRecognitionWrapper.cpp:365
memoryx::EntityWrappers::TexturedRecognitionWrapper::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: ObjectRecognitionWrapper.cpp:248
armarx::Variant
The Variant class is described here: Variants.
Definition: Variant.h:223
memoryx::EntityWrappers::ArMarkerWrapper::getTransformationToCenterTranslations
std::vector< Eigen::Vector3f > getTransformationToCenterTranslations() const
Definition: ObjectRecognitionWrapper.cpp:438
memoryx::EntityWrappers::PointCloudLocalizerWrapper::setExpectedMatchingDistance
void setExpectedMatchingDistance(const float expectedMatchDistance, const float mismatchDistance)
Definition: ObjectRecognitionWrapper.cpp:627
ARMARX_IMPORTANT_S
#define ARMARX_IMPORTANT_S
Definition: Logging.h:210
memoryx::EntityWrappers::ObjectRecognitionWrapper::updateLocalizationQuery
void updateLocalizationQuery(const std::string &queryName, const LocalizationQueryPtr &query)
Definition: ObjectRecognitionWrapper.cpp:173
memoryx::EntityWrappers::ArMarkerWrapper::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: ObjectRecognitionWrapper.cpp:570
memoryx::EntityWrappers::ATTR_AR_MARKER_ROTATION
const std::string ATTR_AR_MARKER_ROTATION
Definition: ObjectRecognitionWrapper.cpp:51
memoryx::EntityWrappers::HandMarkerBallWrapper::HandMarkerBallWrapper
HandMarkerBallWrapper(const GridFileManagerPtr &gfm)
Constructs new HandMarkerBallWrapper.
Definition: ObjectRecognitionWrapper.cpp:326
memoryx::EntityWrappers::SegmentableRecognitionWrapper::SegmentableRecognitionWrapper
SegmentableRecognitionWrapper(const GridFileManagerPtr &gfm)
Constructs new SegmentableRecognitionWrapper.
Definition: ObjectRecognitionWrapper.cpp:253
memoryx::EntityWrappers::POINTCLOUD_EXP_MATCH_DIST
const std::string POINTCLOUD_EXP_MATCH_DIST
Definition: ObjectRecognitionWrapper.cpp:55
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
Pose.h
memoryx::EntityWrappers::ObjectRecognitionWrapper::addLocalizationQuery
void addLocalizationQuery(const LocalizationQueryPtr &query)
Definition: ObjectRecognitionWrapper.cpp:108
memoryx::EntityWrappers::SegmentableRecognitionWrapper::getObjectColor
ObjectColor getObjectColor() const
Definition: ObjectRecognitionWrapper.cpp:300
memoryx::EntityWrappers::AbstractFileEntityWrapper::cleanUpAttributeFiles
void cleanUpAttributeFiles(EntityAttributeBasePtr oldAttr, EntityAttributeBasePtr newAttr)
cleanUpAttributeFiles compares the files attached to the two given attributes and removes the files o...
Definition: AbstractEntityWrapper.cpp:70
memoryx::EntityWrappers::SegmentableRecognitionWrapper::setObjectColor
void setObjectColor(const ObjectColor &color)
Definition: ObjectRecognitionWrapper.cpp:313
memoryx::EntityWrappers::PointCloudLocalizerWrapper::setPointCloudFileName
void setPointCloudFileName(const std::string &fileName, const std::string &filesDBName)
Definition: ObjectRecognitionWrapper.cpp:593
memoryx::EntityWrappers::ATTR_RECOGNITION_METHOD
const std::string ATTR_RECOGNITION_METHOD
Definition: ObjectRecognitionWrapper.cpp:36
memoryx::EntityWrappers::ArMarkerWrapper::setTransformationToCenterRotationsRPY
void setTransformationToCenterRotationsRPY(const std::vector< Eigen::Vector3f > &newRotations)
Definition: ObjectRecognitionWrapper.cpp:515
memoryx::EntityWrappers::TexturedRecognitionWrapper::setFeatureFile
void setFeatureFile(const std::string &featureFileName, const std::string &filesDBName)
Definition: ObjectRecognitionWrapper.cpp:235
memoryx::EntityWrappers::ArMarkerWrapper::getArMarkerSizes
std::vector< float > getArMarkerSizes() const
Definition: ObjectRecognitionWrapper.cpp:401
ObjectRecognitionWrapper.h
memoryx::EntityWrappers::ATTR_RECOGNITION_QUERIES
const std::string ATTR_RECOGNITION_QUERIES
Definition: ObjectRecognitionWrapper.cpp:38
memoryx::EntityWrappers::ObjectRecognitionWrapper::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: ObjectRecognitionWrapper.cpp:212
memoryx::EntityWrappers::ATTR_AR_MARKER_ID
const std::string ATTR_AR_MARKER_ID
Definition: ObjectRecognitionWrapper.cpp:48
memoryx::EntityWrappers::ArMarkerWrapper::setArMarkerSizes
void setArMarkerSizes(const std::vector< float > &newMarkerSizes)
Definition: ObjectRecognitionWrapper.cpp:425
memoryx::EntityWrappers::TexturedRecognitionWrapper::TexturedRecognitionWrapper
TexturedRecognitionWrapper(const GridFileManagerPtr &gfm)
Constructs new TexturedRecognitionWrapper.
Definition: ObjectRecognitionWrapper.cpp:217
memoryx::EntityWrappers::AbstractEntityWrapper::getEntity
EntityBasePtr getEntity() const
Get the stored name of the stored entity.
Definition: AbstractEntityWrapper.cpp:53
memoryx::EntityWrappers::ObjectRecognitionWrapper::getLocalizationQueries
LocalizationQueryList getLocalizationQueries()
Definition: ObjectRecognitionWrapper.cpp:126
memoryx::EntityWrappers::ArMarkerWrapper::setArMarkerIDs
void setArMarkerIDs(const std::vector< int > &newMarkerIDs)
Definition: ObjectRecognitionWrapper.cpp:388
memoryx::EntityWrappers::POINTCLOUD_FILE
const std::string POINTCLOUD_FILE
Definition: ObjectRecognitionWrapper.cpp:54
memoryx::EntityWrappers::SegmentableRecognitionWrapper::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: ObjectRecognitionWrapper.cpp:321
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::EntityWrappers::PointCloudLocalizerWrapper::PointCloudLocalizerWrapper
PointCloudLocalizerWrapper(const GridFileManagerPtr &gfm)
Constructs new PointCloudLocalizerWrapper.
Definition: ObjectRecognitionWrapper.cpp:575
memoryx::LocalizationQuery
The LocalizationQuery class is used to create LocalizationJob instances and provide an interface to q...
Definition: LocalizationQuery.h:49
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:570
memoryx::EntityWrappers::ArMarkerWrapper::getTransformationsToCenter
std::vector< Eigen::Matrix4f > getTransformationsToCenter() const
Definition: ObjectRecognitionWrapper.cpp:530
memoryx::EntityWrappers::ATTR_AR_MARKER_SIZE
const std::string ATTR_AR_MARKER_SIZE
Definition: ObjectRecognitionWrapper.cpp:49
memoryx::EntityWrappers::ATTR_MOTION_MODEL
const std::string ATTR_MOTION_MODEL
Definition: ObjectRecognitionWrapper.cpp:37
memoryx::EntityWrappers::ATTR_AR_MARKER_TRANSLATION
const std::string ATTR_AR_MARKER_TRANSLATION
Definition: ObjectRecognitionWrapper.cpp:50
memoryx::EntityWrappers::ArMarkerWrapper::ArMarkerWrapper
ArMarkerWrapper(const GridFileManagerPtr &gfm)
Constructs new ArMarkerWrapper.
Definition: ObjectRecognitionWrapper.cpp:360
memoryx::EntityWrappers::ArMarkerWrapper::getTransformationToCenterRotationsRPY
std::vector< Eigen::Vector3f > getTransformationToCenterRotationsRPY() const
Definition: ObjectRecognitionWrapper.cpp:484
ARMARX_ERROR_S
#define ARMARX_ERROR_S
Definition: Logging.h:216
memoryx::EntityWrappers::AbstractFileEntityWrapper
Definition: AbstractEntityWrapper.h:81
armarx::Vector3
The Vector3 class.
Definition: Pose.h:112
memoryx::EntityWrappers::HandMarkerBallWrapper::getObjectColor
ObjectColor getObjectColor() const
Definition: ObjectRecognitionWrapper.cpp:332
memoryx::EntityWrappers::ATTR_SEGMENTABLE_DATA
const std::string ATTR_SEGMENTABLE_DATA
Definition: ObjectRecognitionWrapper.cpp:45
memoryx::EntityWrappers::ObjectRecognitionWrapper::setRecognitionMethod
void setRecognitionMethod(const std::string &recognitionMethod)
Definition: ObjectRecognitionWrapper.cpp:85
armarx::VariantType::LocalizationQuery
const armarx::VariantTypeId LocalizationQuery
Definition: LocalizationQuery.h:37
memoryx::EntityWrappers::PointCloudLocalizerWrapper::getExpectedMatchingDistance
void getExpectedMatchingDistance(float &expectedMatchDistance, float &mismatchDistance)
Definition: ObjectRecognitionWrapper.cpp:606
ARMARX_WARNING_S
#define ARMARX_WARNING_S
Definition: Logging.h:213
memoryx::EntityWrappers::ArMarkerWrapper::setTransformationToCenterTranslations
void setTransformationToCenterTranslations(const std::vector< Eigen::Vector3f > &newTranslations)
Definition: ObjectRecognitionWrapper.cpp:469
memoryx::EntityWrappers::ObjectRecognitionWrapper::getDefaultMotionModel
std::string getDefaultMotionModel() const
Definition: ObjectRecognitionWrapper.cpp:72
memoryx::EntityWrappers::AbstractFileEntityWrapper::cacheAttributeFile
std::string cacheAttributeFile(const std::string &attrName, bool preserveOriginalFName=false) const
Definition: AbstractEntityWrapper.cpp:138
memoryx::EntityWrappers::ObjectRecognitionWrapper::removeLocalizationQuery
void removeLocalizationQuery(const std::string &queryName)
Definition: ObjectRecognitionWrapper.cpp:148
memoryx::EntityWrappers
Definition: AbstractEntityWrapper.cpp:30
memoryx::GridFileManagerPtr
std::shared_ptr< GridFileManager > GridFileManagerPtr
Definition: AbstractEntityWrapper.h:33
Entity.h
memoryx::EntityWrappers::TexturedRecognitionWrapper::getFeatureFile
std::string getFeatureFile() const
Definition: ObjectRecognitionWrapper.cpp:223
memoryx::EntityWrappers::ATTR_FEATURE_FILE
const std::string ATTR_FEATURE_FILE
Definition: ObjectRecognitionWrapper.cpp:41
memoryx::EntityWrappers::ObjectRecognitionWrapper
Definition: ObjectRecognitionWrapper.h:40
memoryx::EntityWrappers::ObjectRecognitionWrapper::setDefaultMotionModel
void setDefaultMotionModel(const std::string &defaultMotionModel)
Definition: ObjectRecognitionWrapper.cpp:97
memoryx::EntityAttribute
Attribute of MemoryX entities.
Definition: EntityAttribute.h:49
memoryx::EntityWrappers::ATTR_OBJECT_COLOR
const std::string ATTR_OBJECT_COLOR
Definition: ObjectRecognitionWrapper.cpp:44
memoryx::EntityWrappers::ObjectRecognitionWrapper::getRecognitionMethod
std::string getRecognitionMethod() const
Definition: ObjectRecognitionWrapper.cpp:59
ARMARX_VERBOSE_S
#define ARMARX_VERBOSE_S
Definition: Logging.h:207
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
memoryx::EntityWrappers::HandMarkerBallWrapper::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: ObjectRecognitionWrapper.cpp:355
Logging.h
memoryx::EntityWrappers::SegmentableRecognitionWrapper::setDataFiles
void setDataFiles(const std::string &dataPath, const std::string &filesDBName)
Definition: ObjectRecognitionWrapper.cpp:282
memoryx::EntityWrappers::POINTCLOUD_MISMATCH_DIST
const std::string POINTCLOUD_MISMATCH_DIST
Definition: ObjectRecognitionWrapper.cpp:56
memoryx::EntityWrappers::HandMarkerBallWrapper::setObjectColor
void setObjectColor(const ObjectColor &color)
Definition: ObjectRecognitionWrapper.cpp:347
memoryx::EntityWrappers::AbstractFileEntityWrapper::fileManager
GridFileManagerPtr fileManager
Definition: AbstractEntityWrapper.h:106
memoryx::EntityWrappers::PointCloudLocalizerWrapper::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: ObjectRecognitionWrapper.cpp:640