From 072886e2f869268d8f499c2c68371c63fb6d0e34 Mon Sep 17 00:00:00 2001
From: Fabian Reister <fabian.reister@kit.edu>
Date: Thu, 25 Mar 2021 16:25:53 +0100
Subject: [PATCH] platformsubunit: using old interface / listener

---
 .../units/RobotUnit/Units/PlatformSubUnit.cpp | 24 +++++++++++++++++++
 .../units/RobotUnit/Units/PlatformSubUnit.h   |  7 ++++++
 .../interface/units/PlatformUnitInterface.ice |  2 +-
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp
index 09d1b2a42..49e49a65f 100755
--- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp
+++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp
@@ -206,4 +206,28 @@ namespace armarx
         globalPosCtrl->setGlobalPos(toPlatformPose(currentPose));
     }
 
+
+
+    // legacy stuff
+
+
+    void armarx::PlatformSubUnit::reportPlatformPose(PlatformPose const& currentPose, const Ice::Current& c)
+    {
+        globalPosCtrl->setGlobalPos(currentPose);
+    }
+
+    void armarx::PlatformSubUnit::reportNewTargetPose(Ice::Float newPlatformPositionX, Ice::Float newPlatformPositionY, Ice::Float newPlatformRotation, const Ice::Current& c)
+    {
+
+    }
+
+    void armarx::PlatformSubUnit::reportPlatformVelocity(Ice::Float currentPlatformVelocityX, Ice::Float currentPlatformVelocityY, Ice::Float currentPlatformVelocityRotation, const Ice::Current& c)
+    {
+
+    }
+
+    void armarx::PlatformSubUnit::reportPlatformOdometryPose(Ice::Float, Ice::Float, Ice::Float, const Ice::Current&)
+    {
+    }
+
 }
\ No newline at end of file
diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h
index 1da5ebcae..21ab6338e 100755
--- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h
+++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h
@@ -61,6 +61,13 @@ namespace armarx
 
         void reportGlobalRobotPose(const TransformStamped& currentPose, const Ice::Current& = Ice::emptyCurrent) override;
 
+
+        void reportPlatformPose(PlatformPose const& currentPose, const Ice::Current& c = ::Ice::Current()) override ;
+        void reportNewTargetPose(Ice::Float newPlatformPositionX, Ice::Float newPlatformPositionY, Ice::Float newPlatformRotation, const Ice::Current& c = ::Ice::Current()) override;
+        void reportPlatformVelocity(Ice::Float currentPlatformVelocityX, Ice::Float currentPlatformVelocityY, Ice::Float currentPlatformVelocityRotation, const Ice::Current& c = ::Ice::Current()) override;
+        void reportPlatformOdometryPose(::Ice::Float, ::Ice::Float, ::Ice::Float, const ::Ice::Current& = ::Ice::Current()) override;
+
+
         // PlatformUnit interface
         void onInitPlatformUnit()  override
         {
diff --git a/source/RobotAPI/interface/units/PlatformUnitInterface.ice b/source/RobotAPI/interface/units/PlatformUnitInterface.ice
index 2d93b642a..148e807f9 100644
--- a/source/RobotAPI/interface/units/PlatformUnitInterface.ice
+++ b/source/RobotAPI/interface/units/PlatformUnitInterface.ice
@@ -117,7 +117,7 @@ module armarx
         void reportPlatformOdometryPose(float x, float y, float angle);
     };
 
-    interface PlatformSubUnitInterface extends PlatformUnitInterface, GlobalRobotPoseLocalizationListener
+    interface PlatformSubUnitInterface extends PlatformUnitInterface, GlobalRobotPoseLocalizationListener, PlatformUnitListener
     {
 
     };
-- 
GitLab