diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.cpp b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.cpp index fd1522db93803516e2785e63f6adbfee32beb637..bc246422b98fbd89feac994a2ace52645532e22a 100755 --- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.cpp +++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.cpp @@ -23,8 +23,6 @@ */ #include "NJointHolonomicPlatformGlobalPositionController.h" -#include <SimoxUtility/math/convert/mat4f_to_rpy.h> - namespace armarx { NJointControllerRegistration<NJointHolonomicPlatformGlobalPositionController> @@ -122,20 +120,17 @@ namespace armarx } - void NJointHolonomicPlatformGlobalPositionController::setGlobalPos(const PoseStamped& currentPose) + void NJointHolonomicPlatformGlobalPositionController::setGlobalPos(const PlatformPose& currentPose) { // ..todo: check if norm is too large - const float yaw = simox::math::mat4f_to_rpy(currentPose.pose).z(); - const Eigen::Affine3f pose(currentPose.pose); - - getWriterControlStruct().globalPosition << pose.translation().x(), pose.translation().y(); - getWriterControlStruct().globalOrientation = yaw; + getWriterControlStruct().globalPosition << currentPose.x, currentPose.y; + getWriterControlStruct().globalOrientation = currentPose.rotationAroundZ; getWriterControlStruct().startPosition = currentPosition; getWriterControlStruct().startOrientation = currentOrientation; - getWriterControlStruct().lastUpdate = IceUtil::Time::microSeconds(currentPose.header.timestampInMicroSeconds); + getWriterControlStruct().lastUpdate = IceUtil::Time::microSeconds(currentPose.timestampInMicroSeconds); writeControlStruct(); diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.h b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.h index e8af657eda264ea87d999dd625699b00df162f62..59838fb021ae9df4ecf544d2feb40d7898ce8a63 100755 --- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.h +++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.h @@ -108,7 +108,7 @@ namespace armarx void setTarget(float x, float y, float yaw, float translationAccuracy, float rotationAccuracy); - void setGlobalPos(const PoseStamped& currentPose); + void setGlobalPos(const PlatformPose& currentPose); protected: