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