Go to the documentation of this file.
35 return "FakeWorkingMemoryObjectLocalizer";
41 usingProxy(getProperty<std::string>(
"WorkingMemoryName").getValue());
71 mean.push_back(pos(0));
72 mean.push_back(pos(1));
73 mean.push_back(pos(2));
78 posDist->setMean(
mean);
79 posDist->setCovariance(0, 0, 2.0f);
80 posDist->setCovariance(1, 1, 2.0f);
81 posDist->setCovariance(2, 2, 2.0f);
85 memoryx::ObjectLocalizationResultList
87 const memoryx::ObjectClassNameList& objectClassNames,
90 memoryx::ObjectLocalizationResultList results;
91 auto objInstSeg =
wm->getObjectInstancesSegment();
92 for (
auto& className : objectClassNames)
96 auto objInstances = objInstSeg->getObjectInstancesByClass(className);
97 for (memoryx::ObjectInstanceBasePtr obj : objInstances)
101 memoryx::ObjectLocalizationResult result;
102 result.objectClassName = className;
103 result.orientation = obj->getOrientationBase();
104 result.position = obj->getPositionBase();
106 armarx::FramedPositionPtr::dynamicCast(result.position)->toEigen());
107 result.recognitionCertainty = 0.95;
109 ARMARX_INFO <<
"Returning instance at pose " << obj->getPositionBase()->output();
110 results.push_back(result);
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
memoryx::WorkingMemoryInterfacePrx wm
std::string getDefaultName() const override
void onConnectComponent() override
static TimestampVariantPtr nowPtr()
::std::vector<::Ice::Float > FloatVector
ProxyType getProxyFromProperty(const std::string &propertyName, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
Get a proxy whose name is specified by the given property.
std::optional< float > mean(const boost::circular_buffer< NameValueMap > &buffer, const std::string &key)
void onExitComponent() override
void onInitComponent() override
::memoryx::MultivariateNormalDistributionPtr computePositionNoise(const Eigen::Vector3f &pos)
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
memoryx::ObjectLocalizationResultList localizeObjectClasses(const memoryx::ObjectClassNameList &objectClassNames, const Ice::Current &) override
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
This file offers overloads of toIce() and fromIce() functions for STL container types.
void onDisconnectComponent() override
const armarx::VariantTypeId MultivariateNormalDistribution