ObjectInstance Class Reference

#include <MemoryX/libraries/memorytypes/entity/ObjectInstance.h>

+ Inheritance diagram for ObjectInstance:

Public Member Functions

void addClass (const std::string &className, float probability, const Ice::Current &=Ice::emptyCurrent) override
 Adds new class membership to the class attribute. More...
 
void clearClasses (const Ice::Current &=Ice::emptyCurrent) override
 Clear class membership. More...
 
ObjectInstancePtr clone (const Ice::Current &c=Ice::emptyCurrent) const
 
ClassProbabilityMap getClasses (const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve classes and associated class membership probability for this instance. More...
 
float getClassProbability (const ::std::string &className, const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve membership probability for a given class. More...
 
float getExistenceCertainty (const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve existence certainty for this instance. More...
 
int getLocalizationPriority (const ::Ice::Current &=Ice::emptyCurrent) const override
 
IceUtil::Time getLocalizationTimestamp () const
 
::std::string getMostProbableClass (const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve the class with highest membership probability. More...
 
AbstractMotionModelPtr getMotionModel () const
 
armarx::FramedOrientationPtr getOrientation () const
 Retrieve orientation of the instance. More...
 
EntityAttributeBasePtr getOrientationAttribute () const
 Retrieve attribute which holds instance position. More...
 
armarx::FramedPosePtr getPose () const
 Convenience function to get position and orientation attributes at once. More...
 
armarx::FramedPositionPtr getPosition () const
 Retrieve position of the instance. More...
 
EntityAttributeBasePtr getPositionAttribute () const
 Retrieve attribute which holds instance position. More...
 
MultivariateNormalDistributionBasePtr getPositionUncertainty (const ::Ice::Current &=Ice::emptyCurrent) const override
 Get uncertainty of position estimate. More...
 
bool hasLocalizationTimestamp () const
 
Ice::ObjectPtr ice_clone () const override
 
 ObjectInstance (const ObjectInstance &source)
 
 ObjectInstance (const std::string &name, const std::string &id="")
 Constructs a new ObjectInstance WorkingMemory entity. More...
 
void setClass (const std::string &className, float probability, const Ice::Current &=Ice::emptyCurrent) override
 Set the class attribute of the ObjectInstance. More...
 
void setExistenceCertainty (float existenceCertainty, const ::Ice::Current &=Ice::emptyCurrent) override
 Set existence certainty for this instance. More...
 
void setLocalizationPriority (Ice::Int priority, const ::Ice::Current &=Ice::emptyCurrent) override
 
void setLocalizationTimestamp (const armarx::TimestampBasePtr &timestamp)
 
void setLocalizationTimestamp (const IceUtil::Time &timestamp)
 
void setMotionModel (AbstractMotionModelPtr motionModel)
 Set the motion model for this object. More...
 
void setOrientation (const armarx::FramedOrientationBasePtr &orientation, const ::Ice::Current &=Ice::emptyCurrent) override
 Set orientation of the instance. More...
 
void setPose (const armarx::FramedPoseBasePtr &newPose)
 Convenience function to set position and orientation attributes at once. More...
 
void setPosition (const armarx::FramedPositionBasePtr &position, const ::Ice::Current &=Ice::emptyCurrent) override
 Set position of the instance. More...
 
void setPositionUncertainty (const MultivariateNormalDistributionBasePtr &uncertainty, const ::Ice::Current &=Ice::emptyCurrent) override
 Set uncertainty of position estimate. More...
 
- Public Member Functions inherited from Entity
void __decRef () override
 
template<typename T >
IceInternal::Handle< TaddWrapper (T *wrapper)
 Add EntityWrapper to entity. More...
 
EntityPtr clone (const Ice::Current &c=Ice::emptyCurrent) const
 
void deserialize (const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
 Subclasses should use serializable attributes and consider these methods final. More...
 
bool equals (const EntityBasePtr &otherEntity, const ::Ice::Current &=Ice::emptyCurrent) const override
 equals computes if two Entity instances are equal. More...
 
bool equalsAttributes (const EntityBasePtr &otherEntity, const ::Ice::Current &=Ice::emptyCurrent) const override
 equalsAttributes computes if two Entity instances are equal. More...
 
virtual EntityRefBaseList getAllParentRefs (bool includeMetaEntities=true) const
 Retrieve all parents by traversing the whole hierarchy. More...
 
virtual std::vector< std::string > getAllParentsAsStringList () const
 
EntityAttributeBasePtr getAttribute (const ::std::string &attrName, const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve attribute from entity. More...
 
memoryx::NameList getAttributeNames (const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve list of all attribute names. More...
 
virtual armarx::VariantPtr getAttributeValue (const ::std::string &attrName) const
 Retrieve value of an attribute from entity. More...
 
virtual EntityRefBaseList getDirectParentRefs () const
 Retrieve parent entity references. More...
 
::std::string getId (const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve id of this entity which is an integer in string representation. More...
 
::std::string getName (const ::Ice::Current &=Ice::emptyCurrent) const override
 Retrieve name of this entity. More...
 
template<typename T >
IceInternal::Handle< TgetWrapper ()
 Retrieve EntityWrapper that has previously been added with Entity::addWrapper(). More...
 
bool hasAttribute (const ::std::string &attrName, const ::Ice::Current &=Ice::emptyCurrent) const override
 Check whether this entity has an attribute with the given name. More...
 
Ice::ObjectPtr ice_clone () const override
 
bool isMetaEntity (const ::Ice::Current &=Ice::emptyCurrent) const override
 Indicates whether this entity only contains meta information. More...
 
void putAttribute (const ::memoryx::EntityAttributeBasePtr &attr, const ::Ice::Current &=Ice::emptyCurrent) override
 Store attribute in entity. More...
 
template<typename T >
void putAttribute (const std::string &attrName, T attrValue, ProbabilityMeasureBasePtr uncertainty=ProbabilityMeasureBasePtr())
 Create and store attribute from name, value, and optionally uncertainty measure. More...
 
void removeAttribute (const ::std::string &attrName, const ::Ice::Current &=Ice::emptyCurrent) override
 Remove attribute with given name from entity. More...
 
void serialize (const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
 Subclasses should use serializable attributes and consider these methods final. More...
 
virtual void setDirectParentRefs (const EntityRefBaseList &entityRefs)
 Replace parent entity references. More...
 
void setId (const ::std::string &id, const ::Ice::Current &=Ice::emptyCurrent) override
 Set id of this entity. More...
 
void setMetaEntity (bool isMetaEntity, const ::Ice::Current &=Ice::emptyCurrent) override
 Mark this entity as meta (i.e. More...
 
void setName (const ::std::string &name, const ::Ice::Current &=Ice::emptyCurrent) override
 Set name of this entity. More...
 

Protected Member Functions

armarx::FramedOrientationBasePtr getOrientationBase (const ::Ice::Current &=Ice::emptyCurrent) const override
 
armarx::FramedPositionBasePtr getPositionBase (const ::Ice::Current &=Ice::emptyCurrent) const override
 
- Protected Member Functions inherited from Entity
 Entity ()
 
 Entity (const Entity &source)
 
void ice_postUnmarshal () override
 
void ice_preMarshal () override
 
void output (std::ostream &stream) const
 
 ~Entity () override
 

Protected Attributes

AbstractMotionModelPtr motionModel
 
- Protected Attributes inherited from Entity
std::mutex attributesMutex
 
std::shared_mutex entityMutex
 
AbstractEntityWrapperBaseList wrappers
 
std::recursive_mutex wrappersMutex
 

Friends

template<class IceBaseClass , class DerivedClass >
class armarx::GenericFactory
 
std::ostream & operator<< (std::ostream &stream, const ObjectInstance &rhs)
 
std::ostream & operator<< (std::ostream &stream, const ObjectInstanceBasePtr &rhs)
 
std::ostream & operator<< (std::ostream &stream, const ObjectInstancePtr &rhs)
 

Additional Inherited Members

- Static Public Member Functions inherited from Entity
static EntityPtr CreateGenericEntity ()
 Creates an entity without any convenience getter/setter functions. More...
 

Detailed Description

Definition at line 47 of file ObjectInstance.h.

Constructor & Destructor Documentation

◆ ObjectInstance() [1/2]

ObjectInstance ( const std::string &  name,
const std::string &  id = "" 
)

Constructs a new ObjectInstance WorkingMemory entity.

A name needs to be assigned. The id is optional.

Parameters
namefriendly name of the instance
idoptional id of the instance

Definition at line 36 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ ObjectInstance() [2/2]

ObjectInstance ( const ObjectInstance source)

Definition at line 56 of file ObjectInstance.cpp.

Member Function Documentation

◆ addClass()

void addClass ( const std::string &  className,
float  probability,
const Ice::Current &  = Ice::emptyCurrent 
)
override

Adds new class membership to the class attribute.

Parameters
classNamename of the class
probabilityprobability of class membership

Definition at line 238 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearClasses()

void clearClasses ( const Ice::Current &  = Ice::emptyCurrent)
override

Clear class membership.

Definition at line 247 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clone()

ObjectInstancePtr clone ( const Ice::Current &  c = Ice::emptyCurrent) const

Definition at line 307 of file ObjectInstance.cpp.

+ Here is the caller graph for this function:

◆ getClasses()

ClassProbabilityMap getClasses ( const ::Ice::Current &  = Ice::emptyCurrent) const
override

Retrieve classes and associated class membership probability for this instance.

Returns
map of class names and probabilities

Definition at line 198 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClassProbability()

float getClassProbability ( const ::std::string &  className,
const ::Ice::Current &  = Ice::emptyCurrent 
) const
override

Retrieve membership probability for a given class.

Parameters
className

Definition at line 273 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ getExistenceCertainty()

float getExistenceCertainty ( const ::Ice::Current &  = Ice::emptyCurrent) const
override

Retrieve existence certainty for this instance.

The existence certainty encodes how likely the scene containes this instance at the given position and orientation. The existence certainty represents the current believe for the instance's existance in the dynamic inference process. Values lie in the interval [0:1], where 1 means perfect knowledge.

Returns
existance certainty as probability

Definition at line 69 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ getLocalizationPriority()

int getLocalizationPriority ( const ::Ice::Current &  = Ice::emptyCurrent) const
override

Definition at line 138 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ getLocalizationTimestamp()

IceUtil::Time getLocalizationTimestamp ( ) const

Definition at line 130 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMostProbableClass()

std::string getMostProbableClass ( const ::Ice::Current &  = Ice::emptyCurrent) const
override

Retrieve the class with highest membership probability.

Returns
className

Definition at line 257 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ getMotionModel()

AbstractMotionModelPtr getMotionModel ( ) const

Definition at line 296 of file ObjectInstance.cpp.

◆ getOrientation()

armarx::FramedOrientationPtr getOrientation ( ) const

Retrieve orientation of the instance.

Returns
orientation linked to a named coordinate frame

Definition at line 172 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrientationAttribute()

EntityAttributeBasePtr getOrientationAttribute ( ) const

Retrieve attribute which holds instance position.

Returns
attribute holding mean value of position as well as probability distribution

Definition at line 166 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrientationBase()

armarx::FramedOrientationBasePtr getOrientationBase ( const ::Ice::Current &  = Ice::emptyCurrent) const
overrideprotected

Definition at line 339 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPose()

armarx::FramedPosePtr getPose ( ) const

Convenience function to get position and orientation attributes at once.

Returns
current pose

Definition at line 183 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPosition()

armarx::FramedPositionPtr getPosition ( ) const

Retrieve position of the instance.

Returns
position linked to a named coordinate frame

Definition at line 87 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPositionAttribute()

EntityAttributeBasePtr getPositionAttribute ( ) const

Retrieve attribute which holds instance position.

Returns
attribute holding mean value of position as well as probability distribution

Definition at line 81 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPositionBase()

armarx::FramedPositionBasePtr getPositionBase ( const ::Ice::Current &  = Ice::emptyCurrent) const
overrideprotected

Definition at line 334 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPositionUncertainty()

MultivariateNormalDistributionBasePtr getPositionUncertainty ( const ::Ice::Current &  = Ice::emptyCurrent) const
override

Get uncertainty of position estimate.

Returns
3 dimensional multivariate normal distribution with mean at the position

Definition at line 153 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ hasLocalizationTimestamp()

bool hasLocalizationTimestamp ( ) const

Definition at line 125 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ ice_clone()

Ice::ObjectPtr ice_clone ( ) const
override

Definition at line 302 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ setClass()

void setClass ( const std::string &  className,
float  probability,
const Ice::Current &  = Ice::emptyCurrent 
)
override

Set the class attribute of the ObjectInstance.

Corresponds to calling clearClasses() and addClass(...).

Parameters
classNamename of the class
probabilityprobability of class membership

Definition at line 219 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ setExistenceCertainty()

void setExistenceCertainty ( float  existenceCertainty,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

Set existence certainty for this instance.

The existence certainty encodes how likely the scene containes this instance at the given position and orientation. The existence certainty represents the current believe for the instance's existance in the dynamic inference process. Values lie in the interval [0:1], where 1 means perfect knowledge.

Parameters
existanceCertaintyexistance certainty as probability

Definition at line 75 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocalizationPriority()

void setLocalizationPriority ( Ice::Int  priority,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

Definition at line 147 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocalizationTimestamp() [1/2]

void setLocalizationTimestamp ( const armarx::TimestampBasePtr &  timestamp)

Definition at line 120 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ setLocalizationTimestamp() [2/2]

void setLocalizationTimestamp ( const IceUtil::Time &  timestamp)

Definition at line 115 of file ObjectInstance.cpp.

◆ setMotionModel()

void setMotionModel ( AbstractMotionModelPtr  motionModel)

Set the motion model for this object.

Parameters
motionModelThe motion model

Definition at line 289 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

◆ setOrientation()

void setOrientation ( const armarx::FramedOrientationBasePtr &  orientation,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

Set orientation of the instance.

Parameters
orientationorientation linked to a named coordinate frame

Definition at line 178 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPose()

void setPose ( const armarx::FramedPoseBasePtr &  newPose)

Convenience function to set position and orientation attributes at once.

Parameters
newPoseNew Pose to set

Definition at line 190 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPosition()

void setPosition ( const armarx::FramedPositionBasePtr &  position,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

Set position of the instance.

Parameters
orientationposition linked to a named coordinate frame

Definition at line 93 of file ObjectInstance.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPositionUncertainty()

void setPositionUncertainty ( const MultivariateNormalDistributionBasePtr &  uncertainty,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

Set uncertainty of position estimate.

Parameters
uncertainty3 dimensional multivariate normal distribution with mean at the position

Definition at line 159 of file ObjectInstance.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ armarx::GenericFactory

friend class armarx::GenericFactory
friend

Definition at line 52 of file ObjectInstance.h.

◆ operator<< [1/3]

std::ostream& operator<< ( std::ostream &  stream,
const ObjectInstance rhs 
)
friend

Definition at line 227 of file ObjectInstance.h.

◆ operator<< [2/3]

std::ostream& operator<< ( std::ostream &  stream,
const ObjectInstanceBasePtr &  rhs 
)
friend

Definition at line 239 of file ObjectInstance.h.

◆ operator<< [3/3]

std::ostream& operator<< ( std::ostream &  stream,
const ObjectInstancePtr rhs 
)
friend

Definition at line 233 of file ObjectInstance.h.

Member Data Documentation

◆ motionModel

AbstractMotionModelPtr motionModel
protected

Definition at line 220 of file ObjectInstance.h.


The documentation for this class was generated from the following files: