From cb16e56142a72845513de9eb5ba9e1f3ce827dd0 Mon Sep 17 00:00:00 2001
From: Fabian Reister <fabian.reister@kit.edu>
Date: Thu, 10 Nov 2022 15:47:56 +0100
Subject: [PATCH] PlatformUnitInterface: removing reportPlatformPose and
 reportNewTargetPose. There is a dedicated interface to obtain the robot's
 global pose via a topic

---
 .../interface/units/PlatformUnitInterface.ice | 68 +++++++++----------
 1 file changed, 32 insertions(+), 36 deletions(-)

diff --git a/source/RobotAPI/interface/units/PlatformUnitInterface.ice b/source/RobotAPI/interface/units/PlatformUnitInterface.ice
index f7f62d13d..f83ad97cf 100644
--- a/source/RobotAPI/interface/units/PlatformUnitInterface.ice
+++ b/source/RobotAPI/interface/units/PlatformUnitInterface.ice
@@ -24,22 +24,22 @@
 
 #pragma once
 
-#include <RobotAPI/interface/units/UnitInterface.ice>
-
-#include <ArmarXCore/interface/core/UserException.ice>
 #include <ArmarXCore/interface/core/BasicTypes.ice>
+#include <ArmarXCore/interface/core/UserException.ice>
+
 #include <RobotAPI/interface/core/GeometryBase.ice>
 #include <RobotAPI/interface/core/RobotLocalization.ice>
+#include <RobotAPI/interface/units/UnitInterface.ice>
 
 
 module armarx
-{	
-	/**
+{
+    /**
 	* Implements an interface to an PlatformUnit.
 	**/
     interface PlatformUnitInterface extends SensorActorUnitInterface
     {
-		/**
+        /**
 		* moveTo moves the platform to a global pose specified by:
 		* @param targetPlatformPositionX Global x-coordinate of target position. 
 		* @param targetPlatformPositionY Global y-coordinate of target position.
@@ -47,14 +47,20 @@ module armarx
 		* @param postionalAccuracy Platform stops translating if distance to target position gets lower than this threshhold.
 		* @param orientationalAccuracy Platform stops rotating if distance from current to target orientation gets lower than this threshhold.
 		**/
-        void moveTo(float targetPlatformPositionX, float targetPlatformPositionY, float targetPlatformRotation, float positionalAccuracy, float orientationalAccuracy);
+        void moveTo(float targetPlatformPositionX,
+                    float targetPlatformPositionY,
+                    float targetPlatformRotation,
+                    float positionalAccuracy,
+                    float orientationalAccuracy);
         /**
 		* move moves the platform with given velocities.
 		* @param targetPlatformVelocityX x-coordinate of target velocity defined in platform root. 
 		* @param targetPlatformVelocityY y-coordinate of target velocity defined in platform root. 
 		* @param targetPlatformVelocityRotation Target orientational velocity defined in platform root. 
 		**/
-        void move(float targetPlatformVelocityX, float targetPlatformVelocityY, float targetPlatformVelocityRotation);
+        void move(float targetPlatformVelocityX,
+                  float targetPlatformVelocityY,
+                  float targetPlatformVelocityRotation);
         /**
 		* moveRelative moves to a pose defined in platform coordinates.
 		* @param targetPlatformOffsetX x-coordinate of target position defined in platform root. 
@@ -63,7 +69,11 @@ module armarx
 		* @param postionalAccuracy Platform stops translating if distance to target position gets lower than this threshhold.
 		* @param orientationalAccuracy Platform stops rotating if distance from current to target orientation gets lower than this threshhold.
 		**/
-        void moveRelative(float targetPlatformOffsetX, float targetPlatformOffsetY, float targetPlatformOffsetRotation, float positionalAccuracy, float orientationalAccuracy);
+        void moveRelative(float targetPlatformOffsetX,
+                          float targetPlatformOffsetY,
+                          float targetPlatformOffsetRotation,
+                          float positionalAccuracy,
+                          float orientationalAccuracy);
         /**
 		* setMaxVelocities allows to specify max velocities in translation and orientation.
 		* @param positionalVelocity Max translation velocity. 
@@ -84,42 +94,28 @@ module armarx
         float rotationAroundZ = 0.0f;
     };
 
-	/**
+    /**
 	* Implements an interface to an PlatformUnitListener.
 	**/
     interface PlatformUnitListener
     {
         /**
-        * reportPlatformPose reports current platform pose.
-        * @param currentPose Current global platform pose.
-        **/
-		["deprecate:reportPlatformPose() has been deprecated, use GlobalRobotPoseLocalizationListener::reportGlobalRobotPose() instead."]
-        void reportPlatformPose(PlatformPose currentPose);
-        
-		/**
-		* reportNewTargetPose reports target platform pose.
-		* @param newPlatformPositionX Global x-coordinate of target platform position.
-		* @param newPlatformPositionY Global y-coordinate of target platform position.
-		* @param newPlatformRotation Target global orientation of platform.
-		**/
-		["deprecate:reportNewTargetPose() has been deprecated, use ... instead."]
-		void reportNewTargetPose(float newPlatformPositionX, float newPlatformPositionY, float newPlatformRotation);
-        /**
-		* reportPlatformVelocity reports current platform velocities.
-		* @param currentPlatformVelocityX x-coordinate of current velocity defined in platform root. 
-		* @param currentPlatformVelocityY y-coordinate of current velocity defined in platform root. 
-		* @param currentPlatformVelocityRotation Current orientational velocity defined in platform root. 
-		**/
-		// ["deprecate:reportPlatformVelocity() has been deprecated, use OdometryListener::reportOdometryVelocity() instead."]
-        void reportPlatformVelocity(float currentPlatformVelocityX, float currentPlatformVelocityY, float currentPlatformVelocityRotation);
+				* reportPlatformVelocity reports current platform velocities.
+				* @param currentPlatformVelocityX x-coordinate of current velocity defined in platform root. 
+				* @param currentPlatformVelocityY y-coordinate of current velocity defined in platform root. 
+				* @param currentPlatformVelocityRotation Current orientational velocity defined in platform root. 
+				**/
+        // ["deprecate:reportPlatformVelocity() has been deprecated, use OdometryListener::reportOdometryVelocity() instead."]
+        void reportPlatformVelocity(float currentPlatformVelocityX,
+                                    float currentPlatformVelocityY,
+                                    float currentPlatformVelocityRotation);
 
-		["deprecate:reportPlatformOdometryPose() has been deprecated, use OdometryListener::reportOdometryPose() instead."]
-        void reportPlatformOdometryPose(float x, float y, float angle);
+        ["deprecate:reportPlatformOdometryPose() has been deprecated, use "
+         "OdometryListener::reportOdometryPose() instead."] void
+        reportPlatformOdometryPose(float x, float y, float angle);
     };
 
     interface PlatformSubUnitInterface extends PlatformUnitInterface
     {
-
     };
-
 };
-- 
GitLab