Skip to content
Snippets Groups Projects
Commit 7ac8d3d2 authored by Firat Yusuf Duran's avatar Firat Yusuf Duran :moyai:
Browse files

add addProfile to ProfileCoreSegment

parent 00d28166
No related branches found
No related tags found
2 merge requests!458Fluxio/dev get types,!449Fluxio preliminary release
Pipeline #21125 failed
......@@ -43,10 +43,10 @@ namespace armarx::skills::segment
ComposedSkillLibraryCoreSegment::addSkill(const skills::manager::arondto::FluxioSkill& skill)
{
// add skills
auto provId = id().withProviderSegmentName(skill.skillProviderId.id);
armem::MemoryID provId = id().withProviderSegmentName(skill.skillProviderId.id);
armem::Commit commit;
auto& entityUpdate = commit.add();
armem::EntityUpdate& entityUpdate = commit.add();
entityUpdate.confidence = 1.0;
entityUpdate.referencedTime = armem::Time::Now();
entityUpdate.sentTime = armem::Time::Now();
......
......@@ -4,6 +4,8 @@
#include <ArmarXCore/core/time/ice_conversions.h>
#include "RobotAPI/libraries/armem/core/Commit.h"
#include "RobotAPI/libraries/armem/core/MemoryID.h"
#include <RobotAPI/libraries/armem/server/MemoryToIceAdapter.h>
#include <RobotAPI/libraries/armem_skills/aron_conversions.h>
#include <RobotAPI/libraries/aron/converter/datatype/DatatypeConverterVisitor.h>
......@@ -35,19 +37,19 @@ namespace armarx::skills::segment
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);
// add profile
armem::MemoryID& provId = id();
armem::Commit commit;
armem::EntityUpdate& entityUpdate = commit.add();
entityUpdate.confidence = 1.0;
entityUpdate.referencedTime = armem::Time::Now();
entityUpdate.sentTime = armem::Time::Now();
entityUpdate.arrivedTime = armem::Time::Now();
entityUpdate.instancesData = {profile.toAron()};
entityUpdate.entityID = provId.withEntityName(profile.name);
// Commit data to memory and notify
iceMemory.commit(commit);
}
} // namespace armarx::skills::segment
......@@ -29,7 +29,5 @@ namespace armarx::skills::segment
void init();
void addProfile(const skills::manager::arondto::FluxioProfile& profile);
size_t size() const;
};
} // namespace armarx::skills::segment
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment