30#include <VisionX/libraries/armem_human/aron/Person.aron.generated.h>
36namespace fs = std::filesystem;
43 using Person = armarx::human::arondto::Person;
61 "Load profiles from prior knowledge on startup.");
62 defs->optional(
properties.priorKnowledge.packageName,
63 prefix +
"pk.packageName",
64 "ArmarX package to load human profiles from.");
67 prefix +
"pk.loadFaceImages",
68 "Load face images of the people described in the prior knowledge profiles on startup.");
93 Finder finder(dataPackageName);
94 const std::vector<Info> infos = finder.
findAll();
96 ARMARX_INFO <<
"Loading " << infos.size() <<
" human profiles ...";
98 for (
const Info& info : infos)
100 if (std::optional<Person>
profile = info.loadProfile(loadFaceImages))
107 update.referencedTime = update.sentTime = update.arrivedTime = now;
108 update.instancesData = {
profile->toAron()};
std::string coreSegmentName
MemoryID withProviderSegmentName(const std::string &name) const
MemoryID withEntityName(const std::string &name) const
Accessor for human profile files.
Helps connecting a Memory server to the Ice interface.
Used to find human profiles in the Prior Knowledge Data repository [1].
static const std::string DefaultPackageName
std::vector< Info > findAll(bool checkPaths=true) const
void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
static const std::string CORE_SEGMENT_NAME
void loadPriorKnowledge()
Segment(armem::server::MemoryToIceAdapter &iceMemory)
armem::server::segment::SpecializedCoreSegment Base
virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
wm::CoreSegment & getCoreSegment()
virtual void init() override
MemoryToIceAdapter & iceMemory
#define ARMARX_INFO
The normal logging level.
armarx::armem::human::Info Info
armarx::human::arondto::Person Person
armarx::core::time::DateTime Time
const armem::MemoryID ProfileCoreSegmentID
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
A bundle of updates to be sent to the memory.
std::vector< EntityUpdate > updates
The entity updates.
An update of an entity for a specific point in time.