From ab20bb32d547d7b71a96e5e72fc4b16e97b7ba87 Mon Sep 17 00:00:00 2001
From: Fabian Reister <fabian.reister@kit.edu>
Date: Fri, 12 Mar 2021 15:46:45 +0100
Subject: [PATCH] fixing merge

---
 .../components/RobotState/RobotStateComponent.cpp   | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp
index 6016f6820..f443dcd41 100644
--- a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp
+++ b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp
@@ -374,17 +374,9 @@ namespace armarx
 
 
     void RobotStateComponent::reportPlatformPose(const PoseStamped& platformPose, const Current&)
-
-    void RobotStateComponent::reportPlatformPose(const PlatformPose& currentPose, const Current&)
     {
-        const float z = 0;
-        const Eigen::Vector3f position(currentPose.x, currentPose.y, z);
-        const Eigen::Matrix3f orientation =
-            Eigen::AngleAxisf(currentPose.rotationAroundZ, Eigen::Vector3f::UnitZ()).toRotationMatrix();
-        const Eigen::Matrix4f globalPose = math::Helpers::Pose(position, orientation);
-
-        IceUtil::Time time = IceUtil::Time::microSeconds(currentPose.timestampInMicroSeconds);
-        insertPose(time, globalPose);
+        IceUtil::Time time = IceUtil::Time::microSeconds(platformPose.header.timestampInMicroSeconds);
+        insertPose(time, platformPose.pose.matrix());
 
         if (_sharedRobotServant)
         {
@@ -401,7 +393,6 @@ namespace armarx
     void RobotStateComponent::setRobotStateObserver(RobotStateObserverPtr observer)
     {
         // Unused.
-        (void) newPlatformPositionX, (void) newPlatformPositionY, (void) newPlatformRotation;
     }
 
 
-- 
GitLab