82 if (recognitionMethod !=
"")
85 recognitionMethodAttr->setValue(
new armarx::Variant(recognitionMethod));
86 getEntity()-> putAttribute(recognitionMethodAttr);
92 if (defaultMotionModel !=
"")
96 getEntity()-> putAttribute(motionModelAttr);
110 getEntity()-> putAttribute(recognitionQueryAttr);
116 LocalizationQueryList resultList;
125 for (
int e = 0 ; e < numberElements ; e++)
143 for (
int e = 0 ; e < numberElements ; e++)
148 if (currentQueryName == queryName)
168 for (
int e = 0 ; e < numberElements ; e++)
176 if (currentQuery->queryName != queryName)
178 newVar->setClass(LocalizationQueryPtr::dynamicCast(currentQuery->ice_clone()));
182 newVar->setClass(LocalizationQueryPtr::dynamicCast(query->ice_clone()));
185 updatedQueries->addValue(newVar);
189 getEntity()-> putAttribute(updatedQueries);
209 return featureFileName;
217 if (featureFileName !=
"")
220 fileManager->storeFileToAttr(filesDBName, featureFileName, featureFileAttr);
222 getEntity()-> putAttribute(featureFileAttr);
240 std::vector<std::string> fileNames;
247 if (fileNames.size() == 0)
253 std::filesystem::path path;
254 path = fileNames.at(0);
256 return path.parent_path().c_str();
267 fileManager->storeDirectoryToAttr(filesDBName, dataPath, featureFileAttr);
270 getEntity()-> putAttribute(featureFileAttr);
288 getEntity()-> putAttribute(objectColorAttr);
318 getEntity()-> putAttribute(objectColorAttr);
334 std::vector<int> result;
341 for (
int i = 0; i < attr->size(); i++)
343 result.push_back(attr->getValueAt(i)->getInt());
358 for (
size_t i = 0; i < newMarkerIDs.size(); i++)
368 std::vector<float> result;
375 for (
int i = 0; i < attr->size(); i++)
377 result.push_back(attr->getValueAt(i)->getFloat());
392 for (
size_t i = 0; i < newMarkerSizes.size(); i++)
402 std::vector<Eigen::Vector3f> result;
406 EntityPtr p = EntityPtr::dynamicCast(getEntity());
409 for (
int i = 0; i < attr->size(); i++)
411 armarx::Vector3BasePtr vecBase = armarx::VariantPtr::dynamicCast(attr->getValueAt(i))->getClass<armarx::Vector3Base>();
416 result.push_back(vec);
431 for (
size_t i = 0; i < newTranslations.size(); i++)
442 std::vector<Eigen::Vector3f> result;
449 for (
int i = 0; i < attr->size(); i++)
451 armarx::Vector3BasePtr vecBase = armarx::VariantPtr::dynamicCast(attr->getValueAt(i))->getClass<armarx::Vector3Base>();
456 result.push_back(vec);
471 for (
size_t i = 0; i < newRotations.size(); i++)
482 std::vector<Eigen::Matrix4f> result;
490 for (
int i = 0; i < attrTransl->size() && i < attrRot->size(); i++)
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);
542 fileManager->storeFileToAttr(filesDBName, fileName, fileAttr);
560 expectedMatchDistance = 0;
561 mismatchDistance = 0;
569 expectedMatchDistanceAttr->setValue(
new armarx::Variant(expectedMatchDistance));
570 getEntity()-> putAttribute(expectedMatchDistanceAttr);
573 getEntity()-> putAttribute(mismatchDistanceAttr);