diff --git a/scenarios/ArMemObjectMemory/config/ArticulatedObjectLocalizerExample.cfg b/scenarios/ArMemObjectMemory/config/ArticulatedObjectLocalizerExample.cfg index 50dce2f4a5313f280f8f06bab180de49a4ce8098..82769e0f22bfa6de0ca678be094d396df07c89e0 100644 --- a/scenarios/ArMemObjectMemory/config/ArticulatedObjectLocalizerExample.cfg +++ b/scenarios/ArMemObjectMemory/config/ArticulatedObjectLocalizerExample.cfg @@ -102,6 +102,14 @@ ArmarX.ArticulatedObjectLocalizerExample.mem.obj.articulated.ProviderName = Exam # ArmarX.ArticulatedObjectLocalizerExample.tpc.sub.MemoryListener = MemoryUpdates +# ArmarX.ArticulatedObjectLocalizerExample.updateFrequency: Memory update frequency (write). +# Attributes: +# - Default: 25 +# - Case sensitivity: yes +# - Required: no +# ArmarX.ArticulatedObjectLocalizerExample.updateFrequency = 25 + + # ArmarX.CachePath: Path for cache files. If relative path AND env. variable ARMARX_USER_CONFIG_DIR is set, the cache path will be made relative to ARMARX_USER_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${HOME}/.armarx) # Attributes: # - Default: mongo/.cache diff --git a/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.cpp b/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.cpp index 837fcbcf8278e12b120b3dc9ff0a0b1de514fc9a..b6d997f6882daa1b9ee95d97fb4502ae181aa9ab 100644 --- a/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.cpp +++ b/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.cpp @@ -57,6 +57,8 @@ namespace armarx::armem::server::obj articulatedObjectInstanceSegment.defineProperties(defs, prefix + "articulated.inst."); articulatedObjectClassSegment.defineProperties(defs, prefix + "articulated.cls."); + attachmentSegment.defineProperties(defs, prefix + "attachments."); + return defs; } @@ -69,7 +71,9 @@ namespace armarx::armem::server::obj articulatedObjectClassSegment(server::ComponentPluginUser::iceMemory, server::ComponentPluginUser::workingMemoryMutex), articulatedObjectInstanceSegment(server::ComponentPluginUser::iceMemory, - server::ComponentPluginUser::workingMemoryMutex) + server::ComponentPluginUser::workingMemoryMutex), + attachmentSegment(server::ComponentPluginUser::iceMemory, + server::ComponentPluginUser::workingMemoryMutex) { } @@ -120,6 +124,10 @@ namespace armarx::armem::server::obj articulatedObjectInstanceSegment.init(); }); + initSegmentWithCatch("attachment", [&]() + { + attachmentSegment.init(); + }); } @@ -155,12 +163,9 @@ namespace armarx::armem::server::obj ArVizComponentPluginUser::getArvizClient() ); - - // { - // std::lock_guard g(server::ComponentPluginUser::workingMemoryMutex); - // // server::ComponentPluginUser::workingMemory.addCoreSegment("ArticulatedObjectInstance"); // TODO , arondto::::toInitialAronType()); - // server::ComponentPluginUser::workingMemory.addCoreSegment("ArticulatedObjectClass"); // TODO , arondto::::toInitialAronType()); - // } + attachmentSegment.connect( + ArVizComponentPluginUser::getArvizClient() + ); createRemoteGuiTab(); RemoteGui_startRunningTask(); diff --git a/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.h b/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.h index f42860d88af0dea25e783a05f9bf847a46939f70..2dfd668d1e43df914ff7b2f02205e699ad2ea5e9 100644 --- a/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.h +++ b/source/RobotAPI/components/armem/server/ObjectMemory/ObjectMemory.h @@ -40,6 +40,7 @@ #include <RobotAPI/libraries/armem_objects/server/instance/SegmentAdapter.h> #include <RobotAPI/libraries/armem_objects/server/articulated_object_instance/Segment.h> #include <RobotAPI/libraries/armem_objects/server/articulated_object_class/Segment.h> +#include <RobotAPI/libraries/armem_objects/server/attachments/Segment.h> #define ICE_CURRENT_ARG const Ice::Current& = Ice::emptyCurrent @@ -112,6 +113,7 @@ namespace armarx::armem::server::obj articulated_object_class::Segment articulatedObjectClassSegment; articulated_object_instance::Segment articulatedObjectInstanceSegment; + attachments::Segment attachmentSegment; // associations::Segment associationsSegment;