Go to the documentation of this file.
8 #include <boost/make_shared.hpp>
40 e->addMeasurement(*it2);
48 e->setPose(it->second);
61 e->setVisual(it->second);
74 e->setCollision(it->second);
107 e->removeVolume(*it2);
120 e->addVolume(it2->first, it2->second);
133 e->setType(it->second);
156 e->setExistenceProbability(it->second);
163 e->setLastUpdateTimestamp(it->second);
179 std::cout <<
"WorldModel::update (relation): unknown entity: '" << it2->first <<
"'." <<
std::endl;
183 std::cout <<
"WorldModel::update (relation): unknown entity: '" << it->first <<
"'." <<
std::endl;
190 e->setFlag(it->second);
196 e->removeFlag(it->second);
205 params.
add(e->data());
206 params.
add(it->second);
219 e->setProperty(it2->first, p);
278 if (!r->calculateTransform(time, tr))
280 std::cout <<
"WorldModel::calculateTransform: transform could not be calculated. THIS SHOULD NEVER HAPPEN!" <<
std::endl;
300 if (visited.
find(n2) == visited.
end())
302 visited[n2] =
SearchNode(n, it->second,
false);
312 if (visited.
find(n2) == visited.
end())
314 visited[n2] =
SearchNode(n, it->second,
true);
332 std::cout <<
"[ED] ERROR: Invalid relation addition: parent or child does not exit." <<
std::endl;
336 Idx r_idx = p->relationTo(child);
344 p_new->setRelationTo(child, r_idx);
345 c_new->setRelationFrom(parent, r_idx);
409 if (it_e != new_entities.
end())
418 e = boost::make_shared<Entity>(*
entities_[idx]);
426 e = boost::make_shared<Entity>(
id);
433 new_entities[id] = e;
std::map< UUID, std::vector< MeasurementConstPtr > > measurements
std::map< UUID, std::string > types
std::vector< unsigned long > entity_volumes_revisions_
std::map< UUID, geo::ShapeConstPtr > visuals
WorldModel(const PropertyKeyDB *prop_key_db=nullptr)
std::vector< unsigned long > entity_revisions_
Idx addRelation(const RelationConstPtr &r)
std::vector< EntityConstPtr > entities_
const PropertyKeyDB * property_info_db_
std::map< UUID, std::map< Idx, Property > > properties
std::vector< unsigned long > entity_visual_revisions_
SearchNode(Idx parent_, Idx relation_, bool inverse_)
const PropertyKeyDBEntry * getPropertyInfo(const std::string &name) const
std::map< UUID, std::set< std::string > > type_sets_removed
std::map< UUID, double > last_update_timestamps
void update(const UpdateRequest &req)
std::map< UUID, std::map< std::string, geo::ShapeConstPtr > > volumes_added
shared_ptr< const Entity > EntityConstPtr
void removeEntity(const UUID &id)
std::vector< unsigned long > entity_collision_revisions_
void setRelation(Idx parent, Idx child, const RelationConstPtr &r)
std::map< UUID, std::map< UUID, RelationConstPtr > > relations
std::map< UUID, Idx > entity_map_
EntityPtr getOrAddEntity(const UUID &id, std::map< UUID, EntityPtr > &new_entities)
std::map< UUID, std::set< std::string > > type_sets_added
bool calculateTransform(const UUID &source, const UUID &target, const Time &time, geo::Pose3D &tf) const
std::map< ed::UUID, std::string > added_flags
std::queue< Idx > entity_empty_spots_
static const Idx INVALID_IDX
std::map< UUID, std::map< std::string, ed::MeasurementConvexHull > > convex_hulls_new
std::set< UUID > removed_entities
std::vector< RelationConstPtr > relations_
std::map< UUID, geo::Pose3D > poses
bool add(const DataConstPointer &ptr)
bool findEntityIdx(const UUID &id, Idx &idx) const
std::map< ed::UUID, std::string > removed_flags
shared_ptr< const Relation > RelationConstPtr
std::map< UUID, std::set< std::string > > volumes_removed
void setEntity(const UUID &id, const EntityConstPtr &e)
std::map< UUID, geo::ShapeConstPtr > collisions
std::map< UUID, double > existence_probabilities
std::vector< UUID > poses_removed
const PropertyKeyDBEntry * getPropertyKeyDBEntry(const std::string &name) const
std::map< UUID, tue::config::DataConstPointer > datas
shared_ptr< Entity > EntityPtr
Idx addNewEntity(const EntityConstPtr &e)