From a2ab70bf4bcbee2a6f8e3bb195efb56fcddf2a48 Mon Sep 17 00:00:00 2001
From: armar-user <armar6@kit>
Date: Mon, 6 Feb 2023 14:53:37 +0100
Subject: [PATCH] fix robot descriptor filename, remove package name from path
 string

---
 .../armem_robot_state/server/description/Segment.cpp         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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 e285967fd..e323a2815 100644
--- a/source/RobotAPI/libraries/armem_robot_state/server/description/Segment.cpp
+++ b/source/RobotAPI/libraries/armem_robot_state/server/description/Segment.cpp
@@ -83,12 +83,13 @@ namespace armarx::armem::server::robot_state::description
             const std::vector<std::string> packages = armarx::CMakePackageFinder::FindAllArmarXSourcePackages();
             const std::string package = armarx::ArmarXDataPath::getProject(packages, robotFilename);
 
-            ARMARX_INFO << "Robot description '" << robotFilename << "' found in package " << package;
+            const std::string fixedRobotFilename = robotFilename.substr(package.size() + 1, -1);
+            ARMARX_INFO << "Robot description '" << VAROUT(fixedRobotFilename) << "' found in package " << package;
 
             const robot::RobotDescription robotDescription
             {
                 .name = kinematicUnit->getRobotName(),
-                .xml  = {package, kinematicUnit->getRobotFilename()}
+                .xml  = {package, fixedRobotFilename}
             }; // FIXME
 
             commitRobotDescription(robotDescription);
-- 
GitLab