From 7cd7b5616244ff80b7210cfbd8926b9f4978b3a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobias=20Gr=C3=B6ger?= <tobias.groeger@student.kit.edu>
Date: Mon, 29 Apr 2024 21:15:59 +0200
Subject: [PATCH] test

---
 ...omicPlatformVelocityControllerWithRamp.cpp | 42 +++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformVelocityControllerWithRamp.cpp b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformVelocityControllerWithRamp.cpp
index 80b581c14..e7205be05 100644
--- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformVelocityControllerWithRamp.cpp
+++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformVelocityControllerWithRamp.cpp
@@ -73,29 +73,29 @@ namespace armarx
         const IceUtil::Time& sensorValuesTimestamp,
         const IceUtil::Time& timeSinceLastIteration)
     {
-        auto commandAge = sensorValuesTimestamp - rtGetControlStruct().commandTimestamp;
+        //        auto commandAge = sensorValuesTimestamp - rtGetControlStruct().commandTimestamp;
 
-        if (commandAge > maxCommandDelay && // command must be recent
-            (rtGetControlStruct().velocityX != 0.0f || rtGetControlStruct().velocityY != 0.0f ||
-             rtGetControlStruct().velocityRotation !=
-                 0.0f)) // only throw error if any command is not zero
-        {
-            throw LocalException(
-                "Platform target velocity was not set for a too long time: delay: ")
-                << commandAge.toSecondsDouble()
-                << " s, max allowed delay: " << maxCommandDelay.toSecondsDouble() << " s";
-        }
-        else
-        {
-            Eigen::VectorXf x(6);
-            x << rtGetControlStruct().velocityX, rtGetControlStruct().velocityY, 0, 0, 0,
-                rtGetControlStruct().velocityRotation;
+        //        if (commandAge > maxCommandDelay && // command must be recent
+        //            (rtGetControlStruct().velocityX != 0.0f || rtGetControlStruct().velocityY != 0.0f ||
+        //             rtGetControlStruct().velocityRotation !=
+        //                 0.0f)) // only throw error if any command is not zero
+        //        {
+        //            throw LocalException(
+        //                "Platform target velocity was not set for a too long time: delay: ")
+        //                << commandAge.toSecondsDouble()
+        //                << " s, max allowed delay: " << maxCommandDelay.toSecondsDouble() << " s";
+        //        }
+        //        else
+        //        {
+        Eigen::VectorXf x(6);
+        x << rtGetControlStruct().velocityX, rtGetControlStruct().velocityY, 0, 0, 0,
+            rtGetControlStruct().velocityRotation;
 
-            Eigen::VectorXf result = ramp.update(x, timeSinceLastIteration.toSecondsDouble());
-            target->velocityX = result(0);
-            target->velocityY = result(1);
-            target->velocityRotation = result(5);
-        }
+        Eigen::VectorXf result = ramp.update(x, timeSinceLastIteration.toSecondsDouble());
+        target->velocityX = result(0);
+        target->velocityY = result(1);
+        target->velocityRotation = result(5);
+        //        }
     }
 
     void
-- 
GitLab