diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp index 6016f68207af9112ab5835774e786593a404e336..f443dcd41d964b8de996e473de7edfd47bac6a44 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; }