From 8c52d2182e0717a0038d9ad830cb25967c912d1a Mon Sep 17 00:00:00 2001
From: Fabian Reister <fabian.reister@kit.edu>
Date: Tue, 7 Feb 2023 11:25:07 +0100
Subject: [PATCH] making sure that package path is valid

---
 .../armem_robot_state/server/description/Segment.cpp          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/source/RobotAPI/libraries/armem_robot_state/server/description/Segment.cpp b/source/RobotAPI/libraries/armem_robot_state/server/description/Segment.cpp
index 0996242a4..af2381c78 100644
--- a/source/RobotAPI/libraries/armem_robot_state/server/description/Segment.cpp
+++ b/source/RobotAPI/libraries/armem_robot_state/server/description/Segment.cpp
@@ -1,4 +1,5 @@
 #include "Segment.h"
+#include <filesystem>
 #include <SimoxUtility/algorithm/string/string_tools.h>
 
 #include <ArmarXCore/core/application/properties/PluginAll.h>
@@ -105,6 +106,9 @@ namespace armarx::armem::server::robot_state::description
                 .xml  = {package, robotFileRelPath}
             };
 
+            // make sure that the package path is valid
+            ARMARX_CHECK(std::filesystem::exists(robotDescription.xml.toSystemPath()));
+
             commitRobotDescription(robotDescription);
         }
         else
-- 
GitLab