diff --git a/scenarios/ArmemGraspMemory/ArmemGraspMemory.scx b/scenarios/ArmemGraspMemory/ArmemGraspMemory.scx index 7dee5334bc635e927fe9d020c16b0363dfb53a68..76e0430474a628b61d9146a146e44a0685588a77 100644 --- a/scenarios/ArmemGraspMemory/ArmemGraspMemory.scx +++ b/scenarios/ArmemGraspMemory/ArmemGraspMemory.scx @@ -5,5 +5,6 @@ <application name="DebugObserver" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="RemoteGuiProviderApp" instance="" package="ArmarXGui" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="GraspProviderExample" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> + <application name="ArVizStorage" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> </scenario> diff --git a/scenarios/ArmemGraspMemory/config/DebugObserver.cfg b/scenarios/ArmemGraspMemory/config/DebugObserver.cfg index 4a0b9dac036cd4d103efd7d1b718d508f285d85a..8dc7ead26b3bd2f7678b3b3e7a1b00c01213225d 100644 --- a/scenarios/ArmemGraspMemory/config/DebugObserver.cfg +++ b/scenarios/ArmemGraspMemory/config/DebugObserver.cfg @@ -18,7 +18,7 @@ # ArmarX.ApplicationName = "" -# 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) +# ArmarX.CachePath: Path for cache files. If relative path AND env. variable ARMARX_CONFIG_DIR is set, the cache path will be made relative to ARMARX_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${ARMARX_WORKSPACE}/armarx_config) # Attributes: # - Default: mongo/.cache # - Case sensitivity: yes diff --git a/scenarios/ArmemGraspMemory/config/GraspMemory.cfg b/scenarios/ArmemGraspMemory/config/GraspMemory.cfg index 7bd56e9fa827996e3c78f217b2421489af0a748d..1bd159565ea19854931d8e5e7709b9537b8b5353 100644 --- a/scenarios/ArmemGraspMemory/config/GraspMemory.cfg +++ b/scenarios/ArmemGraspMemory/config/GraspMemory.cfg @@ -18,7 +18,7 @@ # ArmarX.ApplicationName = "" -# 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) +# ArmarX.CachePath: Path for cache files. If relative path AND env. variable ARMARX_CONFIG_DIR is set, the cache path will be made relative to ARMARX_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${ARMARX_WORKSPACE}/armarx_config) # Attributes: # - Default: mongo/.cache # - Case sensitivity: yes @@ -76,6 +76,14 @@ # ArmarX.EnableProfiling = false +# ArmarX.GraspMemory.ArVizStorageName: Name of the ArViz storage +# Attributes: +# - Default: ArVizStorage +# - Case sensitivity: yes +# - Required: no +# ArmarX.GraspMemory.ArVizStorageName = ArVizStorage + + # ArmarX.GraspMemory.ArVizTopicName: Name of the ArViz topic # Attributes: # - Default: ArVizTopic @@ -118,13 +126,45 @@ # ArmarX.GraspMemory.RemoteGuiName = RemoteGuiProvider -# ArmarX.GraspMemory.mem.ltm.00_enabled: +# ArmarX.GraspMemory.mem.ltm..buffer.storeFreq: Frequency to store the buffer to the LTM in Hz. # Attributes: -# - Default: true +# - Default: 10 +# - Case sensitivity: yes +# - Required: no +# ArmarX.GraspMemory.mem.ltm..buffer.storeFreq = 10 + + +# ArmarX.GraspMemory.mem.ltm.enabled: +# Attributes: +# - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.GraspMemory.mem.ltm.00_enabled = true +# ArmarX.GraspMemory.mem.ltm.enabled = false + + +# ArmarX.GraspMemory.mem.ltm.memFreqFilter.WaitingTime: Withdraw time in MS after each LTM update. +# Attributes: +# - Default: -1 +# - Case sensitivity: yes +# - Required: no +# ArmarX.GraspMemory.mem.ltm.memFreqFilter.WaitingTime = -1 + + +# ArmarX.GraspMemory.mem.ltm.memSnapFilter.WaitingTime: Withdraw time in MS after each Entity update. +# Attributes: +# - Default: 1000 +# - Case sensitivity: yes +# - Required: no +# ArmarX.GraspMemory.mem.ltm.memSnapFilter.WaitingTime = 1000 + + +# ArmarX.GraspMemory.mem.ltm.storagepath: The path to the memory storage. +# Attributes: +# - Default: /tmp/MemoryExport +# - Case sensitivity: yes +# - Required: no +# ArmarX.GraspMemory.mem.ltm.storagepath = /tmp/MemoryExport # ArmarX.GraspMemory.memory.Name: Name of this memory server. diff --git a/scenarios/ArmemGraspMemory/config/GraspProviderExample.cfg b/scenarios/ArmemGraspMemory/config/GraspProviderExample.cfg index 9df508c17697c16e196f1194f847d1f532ee61b9..072641101e6a1afbe72d99f2009194d430e873a9 100644 --- a/scenarios/ArmemGraspMemory/config/GraspProviderExample.cfg +++ b/scenarios/ArmemGraspMemory/config/GraspProviderExample.cfg @@ -18,7 +18,7 @@ # ArmarX.ApplicationName = "" -# 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) +# ArmarX.CachePath: Path for cache files. If relative path AND env. variable ARMARX_CONFIG_DIR is set, the cache path will be made relative to ARMARX_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${ARMARX_WORKSPACE}/armarx_config) # Attributes: # - Default: mongo/.cache # - Case sensitivity: yes diff --git a/scenarios/ArmemGraspMemory/config/MemoryNameSystem.cfg b/scenarios/ArmemGraspMemory/config/MemoryNameSystem.cfg index 7dd22218243ca4f9e67e843da8b42916f3b8568a..b8bc70a66ca7f32a628886ad1bf13e373f9750d3 100644 --- a/scenarios/ArmemGraspMemory/config/MemoryNameSystem.cfg +++ b/scenarios/ArmemGraspMemory/config/MemoryNameSystem.cfg @@ -18,7 +18,7 @@ # ArmarX.ApplicationName = "" -# 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) +# ArmarX.CachePath: Path for cache files. If relative path AND env. variable ARMARX_CONFIG_DIR is set, the cache path will be made relative to ARMARX_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${ARMARX_WORKSPACE}/armarx_config) # Attributes: # - Default: mongo/.cache # - Case sensitivity: yes diff --git a/scenarios/ArmemGraspMemory/config/RemoteGuiProviderApp.cfg b/scenarios/ArmemGraspMemory/config/RemoteGuiProviderApp.cfg index 4fd690cefd94559b207493cf40e346a3e47f3b12..4b6abea40d72afd7d313ee47a9b191f3b26de30d 100644 --- a/scenarios/ArmemGraspMemory/config/RemoteGuiProviderApp.cfg +++ b/scenarios/ArmemGraspMemory/config/RemoteGuiProviderApp.cfg @@ -18,7 +18,7 @@ # ArmarX.ApplicationName = "" -# 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) +# ArmarX.CachePath: Path for cache files. If relative path AND env. variable ARMARX_CONFIG_DIR is set, the cache path will be made relative to ARMARX_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${ARMARX_WORKSPACE}/armarx_config) # Attributes: # - Default: mongo/.cache # - Case sensitivity: yes diff --git a/source/RobotAPI/components/armem/client/GraspProviderExample/GraspProviderExample.cpp b/source/RobotAPI/components/armem/client/GraspProviderExample/GraspProviderExample.cpp index 8f98b2383da3556f459ae6fa01a7f3ec190b29e2..2b899c6a91d2e90c4bb2a1305bc9f406d67c04a0 100644 --- a/source/RobotAPI/components/armem/client/GraspProviderExample/GraspProviderExample.cpp +++ b/source/RobotAPI/components/armem/client/GraspProviderExample/GraspProviderExample.cpp @@ -89,6 +89,7 @@ namespace armarx candidate.approachVector = Vector3BasePtr(toIce(Eigen::Vector3f())); candidate.graspPose = PoseBasePtr(toIce(Eigen::Matrix4f())); candidate.providerName = "Example"; + candidate.side = "Right"; candidate.robotPose = PoseBasePtr(toIce(Eigen::Matrix4f())); candidate.tcpPoseInHandRoot = PoseBasePtr(toIce(Eigen::Matrix4f())); // source Info is also not necessary, but reference object name is used as entity name diff --git a/source/RobotAPI/libraries/GraspingUtility/GraspCandidateVisu.cpp b/source/RobotAPI/libraries/GraspingUtility/GraspCandidateVisu.cpp index 1c5e3bc4781d504f8f467ce2b8584d5358b09a06..f9a396845a6ff01e04ca32a9b85d6a1758058e10 100644 --- a/source/RobotAPI/libraries/GraspingUtility/GraspCandidateVisu.cpp +++ b/source/RobotAPI/libraries/GraspingUtility/GraspCandidateVisu.cpp @@ -33,9 +33,10 @@ namespace armarx::grasping alpha = it->second; } + ARMARX_CHECK(candidate.tcpPoseInHandRoot) << "Candidate needs to have tcpPoseInHandRoot to be visualized!"; viz::Robot hand = visualize("Grasp_" + id, candidate, alpha); - if (candidate.reachabilityInfo->reachable) + if (candidate.reachabilityInfo && candidate.reachabilityInfo->reachable) { layerReachable.add(hand); } @@ -70,7 +71,7 @@ namespace armarx::grasping const grasping::GraspCandidate& candidate, int alpha) { - bool isReachable = candidate.reachabilityInfo->reachable; + bool isReachable = candidate.reachabilityInfo && candidate.reachabilityInfo->reachable; viz::Color color = isReachable ? viz::Color::green() : viz::Color::red(); color.a = alpha;