29 using namespace MotionControlGroup;
43 if (!in.isTcpRelativeOrientationSet() && !in.isTcpRelativePositionSet())
45 ARMARX_ERROR <<
"TcpRelativeOrientation and/or TcpRelativePosition has to be set, but none has been set.";
52 Eigen::Matrix4f currentTcpPose = robot->getRobotNodeSet(in.getKinematicChainName())->getTCP()->getPoseInRootFrame();
53 std::string rootFrameName = robot->getRootNode()->getName();
54 std::string agentName = robot->getName();
58 auto localRobot = robot->clone();
59 if (in.isTcpRelativePositionSet())
61 Eigen::Vector3f positionOffset = in.getTcpRelativePosition()->toRootEigen(localRobot);
62 Eigen::Vector3f targetPosition = currentTcpPose.block<3, 1>(0, 3) + positionOffset;
64 local.setTcpTargetPosition(targetPositionPtr);
67 if (in.isTcpRelativeOrientationSet())
69 Eigen::Matrix3f orientationOffset = in.getTcpRelativeOrientation()->toRootEigen(localRobot);
70 Eigen::Matrix3f targetOrientation = currentTcpPose.block<3, 3>(0, 0) * orientationOffset;
72 local.setTcpTargetOrientation(targetOrientationPtr);
100 Eigen::Matrix4f currentTcpPose = robot->getRobotNodeSet(in.getKinematicChainName())->getTCP()->getPoseInRootFrame();