Go to the documentation of this file.
34 return "FakeWorkingMemoryObjectLocalizer";
39 usingProxy(getProperty<std::string>(
"WorkingMemoryName").getValue());
69 mean.push_back(pos(0));
70 mean.push_back(pos(1));
71 mean.push_back(pos(2));
75 posDist->setMean(
mean);
76 posDist->setCovariance(0, 0, 2.0f);
77 posDist->setCovariance(1, 1, 2.0f);
78 posDist->setCovariance(2, 2, 2.0f);
84 memoryx::ObjectLocalizationResultList results;
85 auto objInstSeg =
wm->getObjectInstancesSegment();
86 for (
auto& className : objectClassNames)
90 auto objInstances = objInstSeg->getObjectInstancesByClass(className);
91 for (memoryx::ObjectInstanceBasePtr obj : objInstances)
95 memoryx::ObjectLocalizationResult result;
96 result.objectClassName = className;
97 result.orientation = obj->getOrientationBase();
98 result.position = obj->getPositionBase();
99 result.positionNoise =
computePositionNoise(armarx::FramedPositionPtr::dynamicCast(result.position)->toEigen());
100 result.recognitionCertainty = 0.95;
102 ARMARX_INFO <<
"Returning instance at pose " << obj->getPositionBase()->output();
103 results.push_back(result);
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
memoryx::WorkingMemoryInterfacePrx wm
std::string getDefaultName() const override
void onConnectComponent() override
static TimestampVariantPtr nowPtr()
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)
::std::vector< ::Ice::Float > FloatVector
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