From ae94188218a73f929481f822dbcd0b2c779f1a78 Mon Sep 17 00:00:00 2001
From: Fabian Reister <fabian.reister@kit.edu>
Date: Thu, 20 May 2021 10:40:06 +0200
Subject: [PATCH] aron attachment structs

---
 .../libraries/armem_objects/CMakeLists.txt    |  4 +-
 .../armem_objects/aron/Attachment.xml         | 44 +++++++++++++++----
 2 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/source/RobotAPI/libraries/armem_objects/CMakeLists.txt b/source/RobotAPI/libraries/armem_objects/CMakeLists.txt
index ed02a9adf..30a1f2ef6 100644
--- a/source/RobotAPI/libraries/armem_objects/CMakeLists.txt
+++ b/source/RobotAPI/libraries/armem_objects/CMakeLists.txt
@@ -70,8 +70,8 @@ armarx_enable_aron_file_generation_for_target(
         aron/ObjectClass.xml
         aron/ObjectInstance.xml
 
-        # aron/Attachment.xml
-        aron/Constraint.xml
+        aron/Attachment.xml
+        # aron/Constraint.xml
 )
 
 add_library(${PROJECT_NAME}::armem_objects ALIAS armem_objects)
diff --git a/source/RobotAPI/libraries/armem_objects/aron/Attachment.xml b/source/RobotAPI/libraries/armem_objects/aron/Attachment.xml
index 6b0227772..530e1df92 100644
--- a/source/RobotAPI/libraries/armem_objects/aron/Attachment.xml
+++ b/source/RobotAPI/libraries/armem_objects/aron/Attachment.xml
@@ -1,27 +1,55 @@
 <!--This class contains the data structure for ObjectPose -->
 <?xml version="1.0" encoding="UTF-8" ?>
 <AronTypeDefinition>
-    <CodeIncludes>
-        <Include include="<Eigen/Core>" />
+     <CodeIncludes>
+        <Include include="<RobotAPI/libraries/armem/aron/MemoryID.aron.generated.h>" />
     </CodeIncludes>
+     <AronIncludes>
+        <Include include="<RobotAPI/libraries/armem/aron/MemoryID.xml>" />
+    </AronIncludes>
     <GenerateTypes>
 
-        <Object name="armarx::armem::arondto::Attachment">
+        <Object name="armarx::armem::arondto::attachment::AgentDescription">
 
-            <ObjectChild key="constraintType">
+            <!-- Memory link pointing to arondto::Robot or arondto::ArticulatedObject -->
+            <ObjectChild key="id">
+                <armarx::armem::arondto::MemoryID />
+            </ObjectChild>
+
+            <!-- one of the robot's frames -->
+            <ObjectChild key="frame">
+                <string/>
+            </ObjectChild>
+        </Object>
 
+        <!-- Fixed transformation between agent and object -->
+        <Object name="armarx::armem::arondto::attachment::ObjectAttachment">
+            <ObjectChild key="agent">
+                <armarx::armem::arondto::attachment::AgentDescription />
             </ObjectChild>
 
             <ObjectChild key="transformation">
                 <Pose/>
             </ObjectChild>
 
-            <ObjectChild key="objectName">
-                <string/>
+            <ObjectChild key="object">
+                <armarx::armem::arondto::MemoryID />
             </ObjectChild>
+        </Object>
 
-            <ObjectChild key="objectNode">
-                <string/>
+        <!-- Fixed transformation between agent and articulated object -->
+        <Object name="armarx::armem::arondto::attachment::ArticulatedObjectAttachment">
+
+            <ObjectChild key="agent">
+                <armarx::armem::arondto::attachment::AgentDescription />
+            </ObjectChild>
+
+            <ObjectChild key="transformation">
+                <Pose/>
+            </ObjectChild>
+
+            <ObjectChild key="object">
+                <armarx::armem::arondto::attachment::AgentDescription />
             </ObjectChild>
         </Object>
 
-- 
GitLab