Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "ProfileLibrarySegment.h"
#include <SimoxUtility/algorithm/string.h>
#include <ArmarXCore/core/time/ice_conversions.h>
#include <RobotAPI/libraries/armem/server/MemoryToIceAdapter.h>
#include <RobotAPI/libraries/armem_skills/aron_conversions.h>
#include <RobotAPI/libraries/aron/converter/datatype/DatatypeConverterVisitor.h>
#include <RobotAPI/libraries/aron/converter/json/NLohmannJSONConverter.h>
#include <RobotAPI/libraries/skills/core/aron/FluxioProfile.aron.generated.h>
namespace armarx::skills::segment
{
ProfileLibraryCoreSegment::ProfileLibraryCoreSegment(
armem::server::MemoryToIceAdapter& iceMemory) :
Base(iceMemory, CoreSegmentName, skills::manager::arondto::FluxioProfile::ToAronType())
{
}
void
ProfileLibraryCoreSegment::defineProperties(PropertyDefinitionsPtr defs,
const std::string& prefix)
{
this->setDefaultMaxHistorySize(3);
Base::defineProperties(defs, prefix);
}
void
ProfileLibraryCoreSegment::init()
{
Base::init();
}
void
ProfileLibraryCoreSegment::addProfile(const skills::manager::arondto::FluxioProfile& profile)
{
// // add skills
// auto provId = id().withProviderSegmentName(skill.skillProviderId.id);
// armem::Commit commit;
// auto& entityUpdate = commit.add();
// entityUpdate.confidence = 1.0;
// entityUpdate.referencedTime = armem::Time::Now();
// entityUpdate.sentTime = armem::Time::Now();
// entityUpdate.arrivedTime = armem::Time::Now();
// entityUpdate.instancesData = {skill.toAron()};
// entityUpdate.entityID = provId.withEntityName("ArmarBlow");
// // Commit data to memory and notify
// iceMemory.commit(commit);
}
} // namespace armarx::skills::segment