From 1c51b4f8940125ef1a9323c427cdcfe4d34bdcb5 Mon Sep 17 00:00:00 2001
From: Christian Dreher <c.dreher@kit.edu>
Date: Mon, 28 Aug 2023 10:51:01 +0200
Subject: [PATCH] feat: Better interpretable error message (RK).

---
 .../RobotUnit/Devices/GlobalRobotPoseSensorDevice.cpp  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/source/RobotAPI/components/units/RobotUnit/Devices/GlobalRobotPoseSensorDevice.cpp b/source/RobotAPI/components/units/RobotUnit/Devices/GlobalRobotPoseSensorDevice.cpp
index 0a11b0975..2bb041a7b 100644
--- a/source/RobotAPI/components/units/RobotUnit/Devices/GlobalRobotPoseSensorDevice.cpp
+++ b/source/RobotAPI/components/units/RobotUnit/Devices/GlobalRobotPoseSensorDevice.cpp
@@ -121,10 +121,14 @@ namespace armarx
         const IceUtil::Time& sensorValuesTimestamp,
         const IceUtil::Time& timeSinceLastIteration)
     {
-
-        if (sensorGlobalPositionCorrection == nullptr or sensorRelativePosition == nullptr)
+        if (sensorGlobalPositionCorrection == nullptr)
+        {
+            ARMARX_ERROR << "The global position correction sensor is not available.";
+            return;
+        }
+        if (sensorRelativePosition == nullptr)
         {
-            ARMARX_ERROR << "one of the sensors is not available";
+            ARMARX_ERROR << "The relative position sensor is not available.";
             return;
         }
 
-- 
GitLab