26 #include <VirtualRobot/RobotNodeSet.h>
33 using namespace MotionControlGroup;
36 CartesianPositionControl::SubClassRegistry
50 int timeout = in.getTimeout();
54 setTimeoutEvent(timeout, createEventTimeout());
58 if (isInputParameterSet(
"TcpTargetPosition") && isInputParameterSet(
"TcpTargetOrientation"))
60 if (in.getTcpTargetPosition()->frame != in.getTcpTargetOrientation()->frame)
62 ARMARX_WARNING <<
"Frame mismatch between target position and target orientation"
69 if (!isInputParameterSet(
"TcpTargetPosition") && !isInputParameterSet(
"TcpTargetOrientation"))
84 if (in.isTcpTargetPositionSet())
87 getContext<MotionControlGroupStatechartContext>();
89 auto robot = context->
getRobot()->clone();
90 Eigen::Vector3f
target = in.getTcpTargetPosition()->toRootEigen(robot);
91 Eigen::Vector3f currentTcpPosition = robot->getRobotNodeSet(in.getKinematicChainName())
93 ->getPoseInRootFrame()
97 <<
", current TCP position: " << currentTcpPosition
98 <<
", target: " <<
target <<
"(in root frame)";