23 int SemanticObject::N_SEMANTICOBJECT = 0;
25 SemanticObject::SemanticObject(
long ID) : ID_(ID), expected_class_(
"") {
46 double likelihood = 1;
48 vector<Attribute> need_to_deduce;
53 const Property* ev_prop = it->second;
60 need_to_deduce.push_back(attribute);
69 likelihood *= it_prop->getLikelihood(ev_prop->
getValue());
103 bool class_changed =
false;
108 class_changed =
true;
116 const Property* ev_prop = it->second;
118 if (attribute != class_att) {
121 if (my_prop && !class_changed) {
152 class_name =
"object";
SemanticObject * clone() const
const ClassModel * getClassModel(const std::string &class_name) const
const Property * getProperty(const Attribute &attribute) const
Time getTimestamp() const
static Attribute attribute(const std::string &attribute_str)
attribute
std::set< Hypothesis * > parent_hypotheses_
void update(const Evidence &z)
const IStateEstimator * getEstimator(const Attribute &attribute) const
void update(const pbl::PDF &z, const Time &time)
virtual bool getExpectedValue(std::string &v) const
const std::map< Attribute, Property * > & getPropertyMap() const
virtual double getLikelihood(const pbl::PDF &pdf) const
static int N_SEMANTICOBJECT
void addProperty(const Attribute &attribute, const pbl::PDF &value)
Base class for all state estimators used by the world model.
static KnowledgeDatabase & getInstance()
static std::string attribute_str(const Attribute &attribute)
attribute_str
iterator(field< oT > &in_M, const bool at_end=false)
The class Evidence represents a set of properties (PropertySet) that all originate from one physical ...
unsigned int getNumParentHypotheses() const
void init(const Evidence &z)
std::string expected_class_
const std::string & getModelName() const
const_iterator(const field< oT > &in_M, const bool at_end=false)
double getLikelihood(const PropertySet &ev) const
Contains knowledge about a specific object class on where to expect new objects of that class (new) a...
void removeFromHypothesis(Hypothesis *hyp)
std::vector< Property > inferProperties(const PropertySet &prop_set, std::vector< Attribute >) const
const pbl::PDF & getValue() const
virtual ~SemanticObject()
void propagate(const Time &time)
Propagates the internal state to Time time.
void addPotentialAssignment(Assignment *assignment)
const ClassModel & getExpectedObjectModel() const
void addPotentialAssignment(const Evidence &ev, double probability)
void addToHypothesis(Hypothesis *hyp)