diff --git a/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.cpp b/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.cpp index 4bf9a374473bfde3644f7634087b357bf0170f50..653435b4ebf6b1324514cf7d449bbdf350ee0054 100644 --- a/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.cpp +++ b/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.cpp @@ -18,14 +18,7 @@ namespace armarx defs->topic(debugObserver); - defs->optional(p.memoryName, "memory.Name", "Name of this memory server."); - - p.core._defaultSegmentsStr = simox::alg::join(p.core.defaultCoreSegments, ", "); - defs->optional(p.core._defaultSegmentsStr, "core.DefaultSegments", - "Core segments to add on start up (just as Grasp)."); - defs->optional(p.core.addOnUsage, "core.AddOnUsage", - "If enabled, core segments are added when required by a new provider segment." - "This will usually be off for most memory servers."); + defs->optional(memoryName, "memory.Name", "Name of this memory server."); return defs; } @@ -38,16 +31,11 @@ namespace armarx void GraspMemory::onInitComponent() { - memory.name() = p.memoryName; + memory.name() = memoryName; // Usually, the memory server will specify a number of core segments with a specific aron type. memory.addCoreSegment("GraspCandidate", armarx::grasping::arondto::GraspCandidate::toInitialAronType()); - // For illustration purposes, we add more segments (without types). - bool trim = true; - p.core.defaultCoreSegments = simox::alg::split(p.core._defaultSegmentsStr, ",", trim); - p.core._defaultSegmentsStr.clear(); - memory.addCoreSegments(p.core.defaultCoreSegments); } void GraspMemory::onConnectComponent() @@ -68,15 +56,6 @@ namespace armarx // WRITING - armem::data::AddSegmentsResult GraspMemory::addSegments(const armem::data::AddSegmentsInput& input, const Ice::Current&) - { - // This function is overloaded to trigger the remote gui rebuild. - armem::data::AddSegmentsResult result = ComponentPluginUser::addSegments(input, p.core.addOnUsage); - tab.rebuild = true; - return result; - } - - armem::data::CommitResult GraspMemory::commit(const armem::data::Commit& commit, const Ice::Current&) { // This function is overloaded to trigger the remote gui rebuild. diff --git a/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.h b/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.h index c3568423b32a6585a553d3c00b953ca2d68e9f87..732c74a83a496f7f70d834ca2f5584589858686e 100644 --- a/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.h +++ b/source/RobotAPI/components/armem/server/GraspMemory/GraspMemory.h @@ -23,7 +23,7 @@ namespace armarx * Detailed description of class ExampleMemory. */ class GraspMemory : - virtual public armarx::Component + virtual public Component , virtual public armem::server::ComponentPluginUser , virtual public LightweightRemoteGuiComponentPluginUser // , virtual public armarx::ArVizComponentPluginUser @@ -36,7 +36,6 @@ namespace armarx // WritingInterface interface public: - armem::data::AddSegmentsResult addSegments(const armem::data::AddSegmentsInput& input, const Ice::Current&) override; armem::data::CommitResult commit(const armem::data::Commit& commit, const Ice::Current&) override; @@ -48,7 +47,7 @@ namespace armarx protected: - armarx::PropertyDefinitionsPtr createPropertyDefinitions() override; + PropertyDefinitionsPtr createPropertyDefinitions() override; void onInitComponent() override; void onConnectComponent() override; @@ -58,22 +57,11 @@ namespace armarx private: - armarx::DebugObserverInterfacePrx debugObserver; + DebugObserverInterfacePrx debugObserver; - struct Properties - { - std::string memoryName = "Grasp"; - struct CoreSegments - { - std::vector<std::string> defaultCoreSegments = { "GraspModality", "GraspConcept" }; - std::string _defaultSegmentsStr; - bool addOnUsage = false; - }; + std::string memoryName = "Grasp"; - CoreSegments core; - }; - Properties p; struct RemoteGuiTab : RemoteGui::Client::Tab